Removing unused code-snippets dir

This commit is contained in:
Sana Javed 2023-06-08 10:10:22 +02:00
parent 1b3a03eac1
commit 29686849ae
4 changed files with 0 additions and 85 deletions

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}