Class: Sass::Supports::Declaration
- Inherits:
-
Condition
- Object
- Condition
- Sass::Supports::Declaration
- Defined in:
- .ruby-sass/lib/sass/supports.rb
Overview
A declaration condition (e.g. `(feature: value)`).
Instance Attribute Summary (collapse)
-
#name ⇒ Sass::Script::Tree::Node
The feature name.
-
#resolved_name ⇒ String
The name of the feature after any SassScript has been resolved.
-
#resolved_value ⇒ String
The value of the feature after any SassScript has been resolved.
-
#value ⇒ Sass::Script::Tree::Node
The feature value.
Instance Method Summary (collapse)
- #deep_copy ⇒ Object
-
#initialize(name, value) ⇒ Declaration
constructor
A new instance of Declaration.
- #options=(options) ⇒ Object
- #perform(env) ⇒ Object
- #to_css ⇒ Object
- #to_src(options) ⇒ Object
Constructor Details
#initialize(name, value) ⇒ Declaration
Returns a new instance of Declaration
155 156 157 158 |
# File '.ruby-sass/lib/sass/supports.rb', line 155 def initialize(name, value) @name = name @value = value end |
Constructor Details
#initialize(name, value) ⇒ Declaration
Returns a new instance of Declaration
155 156 157 158 |
# File '.ruby-sass/lib/sass/supports.rb', line 155 def initialize(name, value) @name = name @value = value end |
Instance Attribute Details
#name ⇒ Sass::Script::Tree::Node
Returns The feature name.
135 136 137 |
# File '.ruby-sass/lib/sass/supports.rb', line 135 def name @name end |
#resolved_name ⇒ String
The name of the feature after any SassScript has been resolved. Only set once Tree::Visitors::Perform has been run.
142 143 144 |
# File '.ruby-sass/lib/sass/supports.rb', line 142 def resolved_name @resolved_name end |
#resolved_value ⇒ String
The value of the feature after any SassScript has been resolved. Only set once Tree::Visitors::Perform has been run.
153 154 155 |
# File '.ruby-sass/lib/sass/supports.rb', line 153 def resolved_value @resolved_value end |
#value ⇒ Sass::Script::Tree::Node
The feature value.
147 148 149 |
# File '.ruby-sass/lib/sass/supports.rb', line 147 def value @value end |
Instance Method Details
#deep_copy ⇒ Object
173 174 175 176 177 178 |
# File '.ruby-sass/lib/sass/supports.rb', line 173 def deep_copy copy = dup copy.name = @name.deep_copy copy.value = @value.deep_copy copy end |
#options=(options) ⇒ Object
180 181 182 183 |
# File '.ruby-sass/lib/sass/supports.rb', line 180 def () @name. = @value. = end |
#perform(env) ⇒ Object
160 161 162 163 |
# File '.ruby-sass/lib/sass/supports.rb', line 160 def perform(env) @resolved_name = name.perform(env) @resolved_value = value.perform(env) end |
#to_css ⇒ Object
165 166 167 |
# File '.ruby-sass/lib/sass/supports.rb', line 165 def to_css "(#{@resolved_name}: #{@resolved_value})" end |
#to_src(options) ⇒ Object
169 170 171 |
# File '.ruby-sass/lib/sass/supports.rb', line 169 def to_src() "(#{@name.to_sass()}: #{@value.to_sass()})" end |