diff options
Diffstat (limited to 'src/_props.scss')
-rw-r--r-- | src/_props.scss | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/_props.scss b/src/_props.scss index 86a2215..5577f3a 100644 --- a/src/_props.scss +++ b/src/_props.scss | |||
@@ -77,7 +77,7 @@ $iro-props-namespace-context-id: 'namespace' !default; | |||
77 | /// | 77 | /// |
78 | /// Get the current namespace name. | 78 | /// Get the current namespace name. |
79 | /// | 79 | /// |
80 | @function iro-props-ns-name() { | 80 | @function iro-props-namespace() { |
81 | $noop: iro-context-assert-stack-must-contain($iro-props-namespace-context-id, 'namespace'); | 81 | $noop: iro-context-assert-stack-must-contain($iro-props-namespace-context-id, 'namespace'); |
82 | 82 | ||
83 | $data: nth(iro-context-get($iro-props-namespace-context-id, 'namespace'), 2); | 83 | $data: nth(iro-context-get($iro-props-namespace-context-id, 'namespace'), 2); |
@@ -172,7 +172,7 @@ $iro-props-namespace-context-id: 'namespace' !default; | |||
172 | /// | 172 | /// |
173 | /// @throw If there was no match for $key and $default is null | 173 | /// @throw If there was no match for $key and $default is null |
174 | /// | 174 | /// |
175 | @function iro-props-get($key: (), $tree: $iro-props-default-tree, $default: null, $global: false) { | 175 | @function iro-props-get-static($key: (), $tree: $iro-props-default-tree, $default: null, $global: false) { |
176 | @if not map-has-key($iro-props-trees, $tree) { | 176 | @if not map-has-key($iro-props-trees, $tree) { |
177 | @error 'Unknown tree "#{$tree}".'; | 177 | @error 'Unknown tree "#{$tree}".'; |
178 | } | 178 | } |
@@ -205,9 +205,9 @@ $iro-props-namespace-context-id: 'namespace' !default; | |||
205 | 205 | ||
206 | @if type-of($result) == list and nth($result, 1) == 'iro-prop-ref' { | 206 | @if type-of($result) == list and nth($result, 1) == 'iro-prop-ref' { |
207 | @if length($result) == 2 { | 207 | @if length($result) == 2 { |
208 | $result: iro-props-get($tree: nth($result, 2), $global: true); | 208 | $result: iro-props-get-static($tree: nth($result, 2), $global: true); |
209 | } @else { | 209 | } @else { |
210 | $result: iro-props-get(nth($result, 3), nth($result, 2), $global: true); | 210 | $result: iro-props-get-static(nth($result, 3), nth($result, 2), $global: true); |
211 | } | 211 | } |
212 | } | 212 | } |
213 | } @else { | 213 | } @else { |
@@ -223,9 +223,9 @@ $iro-props-namespace-context-id: 'namespace' !default; | |||
223 | 223 | ||
224 | @if type-of($result) == list and nth($result, 1) == 'iro-prop-ref' { | 224 | @if type-of($result) == list and nth($result, 1) == 'iro-prop-ref' { |
225 | @if length($result) == 2 { | 225 | @if length($result) == 2 { |
226 | $result: iro-props-get($tree: nth($result, 2), $global: true); | 226 | $result: iro-props-get-static($tree: nth($result, 2), $global: true); |
227 | } @else { | 227 | } @else { |
228 | $result: iro-props-get(nth($result, 3), nth($result, 2), $global: true); | 228 | $result: iro-props-get-static(nth($result, 3), nth($result, 2), $global: true); |
229 | } | 229 | } |
230 | } | 230 | } |
231 | } | 231 | } |
@@ -250,9 +250,9 @@ $iro-props-namespace-context-id: 'namespace' !default; | |||
250 | /// | 250 | /// |
251 | /// @return {string} var() | 251 | /// @return {string} var() |
252 | /// | 252 | /// |
253 | @function iro-props-get-native($key, $tree: null, $default: null, $global: false) { | 253 | @function iro-props-get($key, $tree: $iro-props-default-tree, $default: null, $global: false) { |
254 | @if $tree != null { | 254 | @if $tree != null { |
255 | $noop: iro-props-get($key, $tree, $default); | 255 | $noop: iro-props-get-static($key, $tree, $default); |
256 | } | 256 | } |
257 | 257 | ||
258 | @if not $global { | 258 | @if not $global { |
@@ -295,8 +295,8 @@ $iro-props-namespace-context-id: 'namespace' !default; | |||
295 | /// @param {string} $tree [$iro-props-default-tree] - ID of the property tree to use | 295 | /// @param {string} $tree [$iro-props-default-tree] - ID of the property tree to use |
296 | /// @param {string} $root [()] - Sub-tree to use for assignment | 296 | /// @param {string} $root [()] - Sub-tree to use for assignment |
297 | /// | 297 | /// |
298 | @mixin iro-props-assign-native($tree: $iro-props-default-tree, $root: (), $skip: (), $prefix: '', $global: false) { | 298 | @mixin iro-props-assign($tree: $iro-props-default-tree, $root: (), $skip: (), $prefix: '', $global: false) { |
299 | $map: iro-props-get($root, $tree); | 299 | $map: iro-props-get-static($root, $tree); |
300 | $map: map-remove($map, $skip...); | 300 | $map: map-remove($map, $skip...); |
301 | 301 | ||
302 | @if type-of($prefix) == list { | 302 | @if type-of($prefix) == list { |
@@ -311,22 +311,22 @@ $iro-props-namespace-context-id: 'namespace' !default; | |||
311 | } | 311 | } |
312 | } | 312 | } |
313 | 313 | ||
314 | @include iro-props-assign-native-internal($map, $prefix); | 314 | @include iro-props-assign-internal($map, $prefix); |
315 | } | 315 | } |
316 | 316 | ||
317 | /// | 317 | /// |
318 | /// @access private | 318 | /// @access private |
319 | /// | 319 | /// |
320 | @mixin iro-props-assign-native-internal($map, $prefix: '', $ref-depth: $iro-props-native-assing-max-depth) { | 320 | @mixin iro-props-assign-internal($map, $prefix: '', $ref-depth: $iro-props-native-assing-max-depth) { |
321 | @each $key, $value in $map { | 321 | @each $key, $value in $map { |
322 | $rd: $ref-depth; | 322 | $rd: $ref-depth; |
323 | @if type-of($value) == list and nth($value, 1) == 'iro-prop-ref' { | 323 | @if type-of($value) == list and nth($value, 1) == 'iro-prop-ref' { |
324 | @if $ref-depth != 0 { | 324 | @if $ref-depth != 0 { |
325 | $rd: $rd - 1; | 325 | $rd: $rd - 1; |
326 | @if length($value) == 2 { | 326 | @if length($value) == 2 { |
327 | $value: iro-props-get($tree: nth($value, 2)); | 327 | $value: iro-props-get-static($tree: nth($value, 2)); |
328 | } @else { | 328 | } @else { |
329 | $value: iro-props-get(nth($value, 3), nth($value, 2)); | 329 | $value: iro-props-get-static(nth($value, 3), nth($value, 2)); |
330 | } | 330 | } |
331 | } @else { | 331 | } @else { |
332 | $value: null; | 332 | $value: null; |
@@ -335,7 +335,7 @@ $iro-props-namespace-context-id: 'namespace' !default; | |||
335 | @if type-of($value) != map { | 335 | @if type-of($value) != map { |
336 | #{$prefix + $key}: #{$value}; | 336 | #{$prefix + $key}: #{$value}; |
337 | } @else { | 337 | } @else { |
338 | @include iro-props-assign-native-internal($value, $prefix + $key, $rd); | 338 | @include iro-props-assign-internal($value, $prefix + $key, $rd); |
339 | } | 339 | } |
340 | } | 340 | } |
341 | } | 341 | } |