Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct and reformat sample codes #488

Merged
merged 4 commits into from
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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