File tree Expand file tree Collapse file tree 6 files changed +14
-14
lines changed
Expand file tree Collapse file tree 6 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 11{% codeExample 'if-parent-selector' %}
22 @mixin app-background($color) {
3- #{if(sass(& ): '& .app-background'; '.app-background')} {
3+ #{if(sass(& ): '& .app-background'; else: '.app-background')} {
44 background-color: $color;
55 color: rgba(#fff, 0.75);
66 }
1313 }
1414 ===
1515 @mixin app-background($color)
16- #{if(sass(& ): '& .app-background'; '.app-background')}
16+ #{if(sass(& ): '& .app-background'; else: '.app-background')}
1717 background-color: $color
1818 color: rgba(#fff, 0.75)
1919
Original file line number Diff line number Diff line change 1818}
1919
2020@each $breakpoint , $size in config .$sl-breakpoints {
21- $prefix : if (sass ($breakpoint == ' none' ): ' ' ; ' #{$breakpoint } -' );
21+ $prefix : if (sass ($breakpoint == ' none' ): ' ' ; else: ' #{$breakpoint } -' );
2222
2323 @include config .sl-breakpoint-set ($breakpoint , $size ) {
2424 .sl-l-#{$prefix } grid {
Original file line number Diff line number Diff line change 11@use ' ../config' ;
22
33@each $breakpoint , $size in config .$sl-breakpoints {
4- $prefix : if (sass ($breakpoint == ' none' ): ' ' ; ' #{$breakpoint } -' );
4+ $prefix : if (sass ($breakpoint == ' none' ): ' ' ; else: ' #{$breakpoint } -' );
55
66 @include config .sl-breakpoint-set ($breakpoint , $size ) {
77 .sl-l-#{$prefix } holy-grail {
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ whatever system is running it that an error occurred.
2222 @error "Property #{$property} must be either left or right.";
2323 }
2424
25- $left-value: if(sass($property == right): initial; $value);
26- $right-value: if(sass($property == right): $value; initial);
25+ $left-value: if(sass($property == right): initial; else: $value);
26+ $right-value: if(sass($property == right): $value; else: initial);
2727
2828 left: $left-value;
2929 right: $right-value;
@@ -44,8 +44,8 @@ whatever system is running it that an error occurred.
4444 @error "Property #{$property} must be either left or right."
4545
4646
47- $left-value: if(sass($property == right): initial; $value)
48- $right-value: if(sass($property == right): $value; initial)
47+ $left-value: if(sass($property == right): initial; else: $value)
48+ $right-value: if(sass($property == right): $value; else: initial)
4949
5050 left: $left-value
5151 right: $right-value
Original file line number Diff line number Diff line change @@ -41,15 +41,15 @@ function to the CSS `if()` syntax.
4141 @use 'sass: meta ';
4242
4343 // Instead of if(true, 10px, 15px)
44- @debug if(sass(true): 10px; 15px);
44+ @debug if(sass(true): 10px; else: 15px);
4545
4646 // Instead of if(meta.variable-defined($var), $var, null)
4747 @debug if(sass(meta.variable-defined($var)): $var);
4848 ===
4949 @use 'sass: meta '
5050
5151 // Instead of if(true, 10px, 15px)
52- @debug if(sass(true): 10px; 15px)
52+ @debug if(sass(true): 10px; else: 15px)
5353
5454 // Instead of if(meta.variable-defined($var), $var, null)
5555 @debug if(sass(meta.variable-defined($var)): $var)
Original file line number Diff line number Diff line change @@ -67,11 +67,11 @@ if its argument is `false`:
6767[ `if()` function ] : /documentation/syntax/special-functions#if
6868
6969{% codeExample 'if-function', false %}
70- @debug if(true: 10px; 30px); // 10px
71- @debug if(false: 10px; 30px); // 30px
70+ @debug if(true: 10px; else: 30px); // 10px
71+ @debug if(false: 10px; else: 30px); // 30px
7272 ===
73- @debug if(true: 10px; 30px) // 10px
74- @debug if(false: 10px; 30px) // 30px
73+ @debug if(true: 10px; else: 30px) // 10px
74+ @debug if(false: 10px; else: 30px) // 30px
7575{% endcodeExample %}
7676
7777{% render 'doc_snippets/truthiness-and-falsiness' %}
You can’t perform that action at this time.
0 commit comments