Class | Sass::Selector::CommaSequence |
In: |
lib/sass/selector/comma_sequence.rb
|
Parent: | AbstractSequence |
A comma-separated sequence of selectors.
members | [R] |
The comma-separated selector sequences represented by this class.
@return [Array<Sequence>] |
Returns whether there‘s a {Parent} selector anywhere in this sequence.
@return [Boolean]
Non-destrucively extends this selector with the extensions specified in a hash (which should come from {Sass::Tree::Visitors::Cssize}).
@todo Link this to the reference documentation on `@extend`
when such a thing exists.
@param extends [Sass::Util::SubsetMap{Selector::Simple =>
Sass::Tree::Visitors::Cssize::Extend}] The extensions to perform on this selector
@param parent_directives [Array<Sass::Tree::DirectiveNode>]
The directives containing this selector.
@param replace [Boolean]
Whether to replace the original selector entirely or include it in the result.
@param seen [Set<Array<Selector::Simple>>]
The set of simple sequences that are currently being replaced.
@param original [Boolean]
Whether this is the original selector being extended, as opposed to the result of a previous extension that's being re-extended.
@return [CommaSequence] A copy of this selector,
with extensions made according to `extends`
Returns a string representation of the sequence. This is basically the selector string.
@return [String]
Populates a subset map that can then be used to extend selectors. This registers an extension with this selector as the extender and `extendee` as the extendee.
@param extends [Sass::Util::SubsetMap{Selector::Simple =>
Sass::Tree::Visitors::Cssize::Extend}] The subset map representing the extensions to perform.
@param extendee [CommaSequence] The selector being extended. @param extend_node [Sass::Tree::ExtendNode]
The node that caused this extension.
@param parent_directives [Array<Sass::Tree::DirectiveNode>]
The parent directives containing `extend_node`.
@raise [Sass::SyntaxError] if this extension is invalid.
Resolves the {Parent} selectors within this selector by replacing them with the given parent selector, handling commas appropriately.
@param super_cseq [CommaSequence] The parent selector @param implicit_parent [Boolean] Whether the the parent
selector should automatically be prepended to the resolved selector if it contains no parent refs.
@return [CommaSequence] This selector, with parent references resolved @raise [Sass::SyntaxError] If a parent selector is invalid
Returns whether or not this selector matches all elements that the given selector matches (as well as possibly more).
@example
(.foo).superselector?(.foo.bar) #=> true (.foo).superselector?(.bar) #=> false
@param cseq [CommaSequence] @return [Boolean]
Returns a SassScript representation of this selector.
@return [Sass::Script::Value::List]
Unifies this with another comma selector to produce a selector that matches (a subset of) the intersection of the two inputs.
@param other [CommaSequence] @return [CommaSequence, nil] The unified selector, or nil if unification failed. @raise [Sass::SyntaxError] If this selector cannot be unified.
This will only ever occur when a dynamic selector, such as {Parent} or {Interpolation}, is used in unification. Since these selectors should be resolved by the time extension and unification happen, this exception will only ever be raised as a result of programmer error