Skip to content

Commit fc24872

Browse files
authored
docs(icons): optimized example (#87)
1 parent 751aa61 commit fc24872

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

source/_patterns/00-base/icons/_icons.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,16 @@ Use the following SCSS mixin for setting an icon:
2828
```scss
2929
// schema
3030
@mixin icon(
31-
$glyph: "",
32-
$size: $icon-size,
33-
$style: $icon-style,
34-
$position: "before"
31+
$glyph: "",
32+
$size: $icon-size,
33+
$style: $icon-style,
34+
$position: "before"
3535
);
3636

3737
// example
38-
@include icon(glyph(account), 20, "outline");
38+
span.with-an-icon {
39+
@include icon(glyph(account), 20, "outline");
40+
}
3941
```
4042

4143
As both `$icon-size` and `$icon-style` are available to get configured with default values, and `$position` is only a variant (explained in the next paragraph) only the first one is really mandatory.
@@ -76,11 +78,11 @@ If you'd like to include the icon after the content/text, use the HTML attribute
7678

7779
```html
7880
<a
79-
href="#"
80-
data-icon-after="alarm"
81-
data-icon-variant-after="24-outline"
82-
class="elm-link"
83-
>Alarm</a
81+
href="#"
82+
data-icon-after="alarm"
83+
data-icon-variant-after="24-outline"
84+
class="elm-link"
85+
>Alarm</a
8486
>
8587
```
8688

0 commit comments

Comments
 (0)