Class | Sass::Script::Tree::Interpolation |
In: |
lib/sass/script/tree/interpolation.rb
|
Parent: | Node |
A SassScript object representing `#{}` interpolation outside a string.
@see StringInterpolation
after | [R] | @return [Node] The SassScript after the interpolation |
before | [R] | @return [Node] The SassScript before the interpolation |
deprecation | [R] |
The type of interpolation deprecation for this node.
This can be `:none`, indicating that the node doesn‘t use deprecated interpolation; `:immediate`, indicating that a deprecation warning should be emitted as soon as possible; or `:potential`, indicating that a deprecation warning should be emitted if the resulting string is used in a way that would distinguish it from a list. @return [Symbol] |
mid | [R] | @return [Node] The SassScript within the interpolation |
originally_text | [R] |
@return [Boolean] Whether the original format of the interpolation was
plain text, not an interpolation. This is used when converting back to SassScript. |
warn_for_color | [R] |
@return [Boolean] Whether a color value passed to the interpolation should
generate a warning. |
whitespace_after | [R] | @return [Boolean] Whether there was whitespace between `}` and `after` |
whitespace_before | [R] | @return [Boolean] Whether there was whitespace between `before` and `#{` |
Interpolation in a property is of the form `before #{mid} after`.
@param before [Node] See {Interpolation#before} @param mid [Node] See {Interpolation#mid} @param after [Node] See {Interpolation#after} @param wb [Boolean] See {Interpolation#whitespace_before} @param wa [Boolean] See {Interpolation#whitespace_after} @param originally_text [Boolean] See {Interpolation#originally_text} @param warn_for_color [Boolean] See {Interpolation#warn_for_color} @comment
rubocop:disable ParameterLists
Returns the three components of the interpolation, `before`, `mid`, and `after`.
@return [Array<Node>] @see initialize @see Node#children
Returns an `unquote()` expression that will evaluate to the same value as this interpolation.
@return [Sass::Script::Tree::Node]
Converts a script node into a corresponding string interpolation expression.
@param node_or_interp [Sass::Script::Tree::Node] @return [Sass::Script::Tree::StringInterpolation]