Skip to content
Merged
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
22 changes: 12 additions & 10 deletions source/_patterns/00-base/icons/_icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ Use the following SCSS mixin for setting an icon:
```scss
// schema
@mixin icon(
$glyph: "",
$size: $icon-size,
$style: $icon-style,
$position: "before"
$glyph: "",
$size: $icon-size,
$style: $icon-style,
$position: "before"
);

// example
@include icon(glyph(account), 20, "outline");
span.with-an-icon {
@include icon(glyph(account), 20, "outline");
}
```

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.
Expand Down Expand Up @@ -76,11 +78,11 @@ If you'd like to include the icon after the content/text, use the HTML attribute

```html
<a
href="#"
data-icon-after="alarm"
data-icon-variant-after="24-outline"
class="elm-link"
>Alarm</a
href="#"
data-icon-after="alarm"
data-icon-variant-after="24-outline"
class="elm-link"
>Alarm</a
>
```

Expand Down