Skip to content

Commit 88987da

Browse files
committed
Code review
1 parent 390758a commit 88987da

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

source/_includes/code_snippets/example-if-parent-selector.liquid

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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
}
@@ -13,7 +13,7 @@
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

source/assets/sass/layout/_grid-system.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
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 {

source/assets/sass/layout/_holy-grail.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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 {

source/documentation/at-rules/error.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

source/documentation/breaking-changes/if-function.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

source/documentation/values/booleans.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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' %}

0 commit comments

Comments
 (0)