Class Sass::Tree::PropNode
In: lib/sass/tree/prop_node.rb
Parent: Node

A static node representing a CSS property.

@see Sass::Tree

Methods

Attributes

name  [RW]  The name of the property, interspersed with {Sass::Script::Tree::Node}s representing `#{}`-interpolation. Any adjacent strings will be merged together.

@return [Array<String, Sass::Script::Tree::Node>]

name_source_range  [RW]  The source range in which the property name appears.

@return [Sass::Source::Range]

resolved_name  [RW]  The name of the property after any interpolated SassScript has been resolved. Only set once \{Tree::Visitors::Perform} has been run.

@return [String]

resolved_value  [RW]  The value of the property after any interpolated SassScript has been resolved. Only set once \{Tree::Visitors::Perform} has been run.

@return [String]

tabs  [RW]  How deep this property is indented relative to a normal property. This is only greater than 0 in the case that:
  • This node is in a CSS tree
  • The style is :nested
  • This is a child property of another property
  • The parent property has a value, and thus will be rendered

@return [Integer]

value  [RW]  The value of the property.

@return [Sass::Script::Tree::Node]

value_source_range  [RW]  The source range in which the property value appears.

@return [Sass::Source::Range]

Public Class methods

@param name [Array<String, Sass::Script::Tree::Node>] See \{name} @param value [Sass::Script::Tree::Node] See \{value} @param prop_syntax [Symbol] `:new` if this property uses `a: b`-style syntax,

  `:old` if it uses `:a b`-style syntax

Public Instance methods

Compares the names and values of two properties.

@param other [Object] The object to compare with @return [Boolean] Whether or not this node and the other object

  are the same

Computes the Sass or SCSS code for the variable declaration. This is like \{to_scss} or \{to_sass}, except it doesn‘t print any child properties or a trailing semicolon.

@param opts [{Symbol => Object}] The options hash for the tree. @param fmt [Symbol] `:scss` or `:sass`.

A property node is invisible if its value is empty.

@return [Boolean]

Returns a appropriate message indicating how to escape pseudo-class selectors. This only applies for old-style properties with no value, so returns the empty string if this is new-style.

@return [String] The message

[Validate]