mirror of
https://github.com/danog/sass-site.git
synced 2024-11-30 04:29:17 +01:00
Removing unused code-snippets dir
This commit is contained in:
parent
1b3a03eac1
commit
29686849ae
@ -1,58 +0,0 @@
|
||||
<!-- TODO(nweiz): auto-generate this CSS once we're compiling with Dart Sass -->
|
||||
|
||||
{% codeExample 'first-class-function' %}
|
||||
@use "sass:list";
|
||||
@use "sass:meta";
|
||||
@use "sass:string";
|
||||
|
||||
/// Return a copy of $list with all elements for which $condition returns `true`
|
||||
/// removed.
|
||||
@function remove-where($list, $condition) {
|
||||
$new-list: ();
|
||||
$separator: list.separator($list);
|
||||
@each $element in $list {
|
||||
@if not meta.call($condition, $element) {
|
||||
$new-list: list.append($new-list, $element, $separator: $separator);
|
||||
}
|
||||
}
|
||||
@return $new-list;
|
||||
}
|
||||
|
||||
$fonts: Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
|
||||
content {
|
||||
@function contains-helvetica($string) {
|
||||
@return string.index($string, "Helvetica");
|
||||
}
|
||||
font-family: remove-where($fonts, meta.get-function("contains-helvetica"));
|
||||
}
|
||||
===
|
||||
@use "sass:list"
|
||||
@use "sass:meta"
|
||||
@use "sass:string"
|
||||
|
||||
/// Return a copy of $list with all elements for which $condition returns `true`
|
||||
/// removed.
|
||||
@function remove-where($list, $condition)
|
||||
$new-list: ()
|
||||
$separator: list.separator($list)
|
||||
@each $element in $list
|
||||
@if not meta.call($condition, $element)
|
||||
$new-list: list.append($new-list, $element, $separator: $separator)
|
||||
|
||||
|
||||
@return $new-list
|
||||
|
||||
|
||||
$fonts: Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif
|
||||
|
||||
.content
|
||||
@function contains-helvetica($string)
|
||||
@return string.index($string, "Helvetica")
|
||||
|
||||
font-family: remove-where($fonts, meta.get-function("contains-helvetica"))
|
||||
===
|
||||
.content {
|
||||
font-family: Tahoma, Geneva, Arial, sans-serif;
|
||||
}
|
||||
{% endcodeExample %}
|
@ -1,9 +0,0 @@
|
||||
{% codeExample 'list-index', false %}
|
||||
@debug list.index(1px solid red, 1px); // 1
|
||||
@debug list.index(1px solid red, solid); // 2
|
||||
@debug list.index(1px solid red, dashed); // null
|
||||
===
|
||||
@debug list.index(1px solid red, 1px) // 1
|
||||
@debug list.index(1px solid red, solid) // 2
|
||||
@debug list.index(1px solid red, dashed) // null
|
||||
{% endcodeExample %}
|
@ -1,7 +0,0 @@
|
||||
{% codeExample 'list-nth', false %}
|
||||
@debug list.nth(10px 12px 16px, 2); // 12px
|
||||
@debug list.nth([line1, line2, line3], -1); // line3
|
||||
===
|
||||
@debug list.nth(10px 12px 16px, 2) // 12px
|
||||
@debug list.nth([line1, line2, line3], -1) // line3
|
||||
{% endcodeExample %}
|
@ -1,11 +0,0 @@
|
||||
{% codeExample 'map-get', false %}
|
||||
$font-weights: ("regular": 400, "medium": 500, "bold": 700);
|
||||
|
||||
@debug map.get($font-weights, "medium"); // 500
|
||||
@debug map.get($font-weights, "extra-bold"); // null
|
||||
===
|
||||
$font-weights: ("regular": 400, "medium": 500, "bold": 700)
|
||||
|
||||
@debug map.get($font-weights, "medium") // 500
|
||||
@debug map.get($font-weights, "extra-bold") // null
|
||||
{% endcodeExample %}
|
Loading…
Reference in New Issue
Block a user