Class: Sass::Selector::Placeholder
- Defined in:
- lib/sass/selector.rb
Overview
A placeholder selector (e.g. %foo
).
This exists to be replaced via @extend
.
Rulesets using this selector will not be printed, but can be extended.
Otherwise, this acts just like a class selector.
Instance Attribute Summary collapse
-
#name ⇒ Array<String, Sass::Script::Node>
readonly
The placeholder name.
Attributes inherited from Simple
Instance Method Summary collapse
-
#initialize(name) ⇒ Placeholder
constructor
A new instance of Placeholder.
- #specificity
- #to_a
Methods inherited from Simple
#eql?, #hash, #inspect, #to_s, #unify, #unify_namespaces
Constructor Details
#initialize(name) ⇒ Placeholder
Returns a new instance of Placeholder.
112 113 114 |
# File 'lib/sass/selector.rb', line 112
def initialize(name)
@name = name
end
|
Instance Attribute Details
#name ⇒ Array<String, Sass::Script::Node> (readonly)
The placeholder name.
109 110 111 |
# File 'lib/sass/selector.rb', line 109
def name
@name
end
|
Instance Method Details
#specificity
122 123 124 |
# File 'lib/sass/selector.rb', line 122
def specificity
0
end
|
#to_a
117 118 119 |
# File 'lib/sass/selector.rb', line 117
def to_a
["%", *@name]
end
|