mirror of
https://github.com/danog/sass-site.git
synced 2024-12-02 17:38:26 +01:00
42 lines
723 B
Plaintext
42 lines
723 B
Plaintext
|
<% example do %>
|
||
|
@mixin syntax-colors($args...) {
|
||
|
@debug keywords($args); // (string: #080, comment: #800, $variable: $60b)
|
||
|
|
||
|
@each $name, $color in keywords($args) {
|
||
|
pre span.stx-#{$name} {
|
||
|
color: $color;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@include syntax-colors(
|
||
|
$string: #080,
|
||
|
$comment: #800,
|
||
|
$variable: #60b,
|
||
|
)
|
||
|
===
|
||
|
@mixin syntax-colors($args...)
|
||
|
@debug keywords($args) // (string: #080, comment: #800, $variable: $60b)
|
||
|
|
||
|
@each $name, $color in keywords($args)
|
||
|
pre span.stx-#{$name}
|
||
|
color: $color
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
@include syntax-colors($string: #080, $comment: #800, $variable: #60b);
|
||
|
===
|
||
|
pre span.stx-string {
|
||
|
color: #080;
|
||
|
}
|
||
|
|
||
|
pre span.stx-comment {
|
||
|
color: #800;
|
||
|
}
|
||
|
|
||
|
pre span.stx-variable {
|
||
|
color: #60b;
|
||
|
}
|
||
|
<% end %>
|