sass-site/source/code-snippets/_example-use-with.html.erb
Natalie Weizenbaum 8f093ba74b Document the @use rule
Closes #361
2019-09-02 13:45:40 -07:00

35 lines
727 B
Plaintext

<% example do %>
// _library.scss
$black: #000 !default;
$border-radius: 0.25rem !default;
$box-shadow: 0 0.5rem 1rem rgba($black, 0.15) !default;
code {
border-radius: $border-radius;
box-shadow: $box-shadow;
}
---
// style.scss
@use 'library' with (
$black: #222,
$border-radius: 0.1rem
);
===
// _library.sass
$black: #000 !default
$border-radius: 0.25rem !default
$box-shadow: 0 0.5rem 1rem rgba($black, 0.15) !default
code
border-radius: $border-radius
box-shadow: $box-shadow
---
// style.sass
@use 'library' with ($black: #222, $border-radius: 0.1rem)
===
code {
border-radius: 0.1rem;
box-shadow: 0 0.5rem 1rem rgba(#222, 0.15);
}
<% end %>