Skip to content

Commit

Permalink
Correct and reformat sample codes (#488)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngdangtu-vn committed Oct 9, 2020
1 parent d98028e commit 7c39ec5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions source/code-snippets/_example-advanced-nesting.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ uses the [`selector.unify()` function][] to combine `&` with a user's selector.

.wrapper .field
@include unify-parent("input")
/* ...
/* ... */

@include unify-parent("select")
/* ...
/* ... */
===
.wrapper input.field {
/* ... */
Expand Down
8 changes: 6 additions & 2 deletions source/code-snippets/_example-if.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@
}
}

.square-av { @include avatar(100px, $circle: false); }
.circle-av { @include avatar(100px, $circle: true); }
.square-av {
@include avatar(100px, $circle: false);
}
.circle-av {
@include avatar(100px, $circle: true);
}
===
@mixin avatar($size, $circle: false)
width: $size
Expand Down
10 changes: 6 additions & 4 deletions source/documentation/at-rules/use.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,15 @@ another mixin to inject your styles.
$-box-shadow: $box-shadow !global


@include styles
@mixin styles
code
border-radius: $border-radius
box-shadow: $box-shadow
border-radius: $-border-radius
box-shadow: -box-shadow()
---
// style.sass
@use 'library' with ($black: #222, $border-radius: 0.1rem)
@use 'library'
@include library.configure($black: #222, $border-radius: 0.1rem)
@include library.styles
===
code {
border-radius: 0.1rem;
Expand Down
2 changes: 1 addition & 1 deletion source/documentation/snippets/_number-units.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ denominator.
@debug 4px * 6px // 24px*px (read "square pixels")
@debug 5px / 2s // 2.5px/s (read "pixels per second")
@debug 5px * 30deg / 2s / 24em // 3.125px*deg/s*em
// (read "pixel-degrees per second-em")
// (read "pixel-degrees per second-em")

$degrees-per-second: 20deg/1s
@debug $degrees-per-second // 20deg/s
Expand Down
2 changes: 1 addition & 1 deletion source/documentation/values/booleans.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ introduction: >
@debug 10px < 3px; // false
@debug math.comparable(100px, 3in); // true
===
@use "sass:math";
@use "sass:math"

@debug 1px == 2px // false
@debug 1px == 1px // true
Expand Down

0 comments on commit 7c39ec5

Please sign in to comment.