sass-site/source/code-snippets/_example-use-with.html.erb
Natalie Weizenbaum 502f512478
Document @forward ... with (#417)
See sass/sass#2744
Closes #383
2019-12-20 12:07:52 -08:00

35 lines
733 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(34, 34, 34, 0.15);
}
<% end %>