on master help sign in
Replace SCSS example with unlicensed one
commit894d3f1722f8d2ab760da0a1ea01e1f263ae16fd authorEthan P <eth-p+git@hidden.email> dateMon 5 Oct 2020, 18:59 (6 years ago) parent83d96e2
3 files changed+162−61
tests/syntax-tests/highlighted/SCSS/example.scss+82−19 tests/syntax-tests/source/SCSS/LICENSE.md−25 tests/syntax-tests/source/SCSS/example.scss+80−17
tests/syntax-tests/highlighted/SCSS/example.scss+82−19
@@ -1,19 +1,82 @@
1−@mixin button-base() {
2− @include typography(button);
3− @include ripple-surface;
4− @include ripple-radius-bounded;
5−
6− display: inline-flex;
7− position: relative;
8− height: $button-height;
9− border: none;
10− vertical-align: middle;
11−
12− &:hover { cursor: pointer; }
13−
14− &:disabled {
15− color: $mdc-button-disabled-ink-color;
16− cursor: default;
17− pointer-events: none;
18− }
19−}
1+@import 'fonts';
2+
3+$theme_dark: (
4+ "background-color": null,
5+);
6+$theme_main: (
7+ "text-size": 3em,
8+ "text-color": black,
9+ "text-shadow": #36ad 0px 0px 3px,
10+ "card-background": #d6f,
11+ "card-shadow": #11121212 0px 0px 2px 1px,
12+ "card-padding": 1rem,
13+ "card-margin": 0.5in,
14+ "image-width": 600px,
15+ "image-height": 100vh,
16+ "background-color": #dedbef,
17+ "i-ran-out-of-placeholders-for-units": (1vw 100% 60pt),
18+);
19+
20+$current_theme: $theme_main;
21+
22+@mixin themed() {
23+ $current_theme: $theme_main !global;
24+ @content;
25+
26+ @media (prefers-color-scheme: dark) {
27+ $current_theme: $theme_dark !global;
28+ @content;
29+ }
30+ 
31+ .#{"dark"} & {
32+ $current_theme: $theme_dark !global;
33+ @content;
34+ }
35+}
36+
37+@function theme($variable) {
38+ @if map-has_key($current_theme, $variable) {
39+ @return map-get($current_theme, $variable);
40+ } @else {
41+ @error "Unknown theme variable: #{$variable}";
42+ }
43+}
44+
45+body {
46+ @include themed {
47+ background-color: theme('background-color');
48+ background-image: url("https://github.com/sharkdp/bat/raw/master/doc/logo-header.svg");
49+ }
50+ 
51+ header[data-selectable="false"] {
52+ -webkit-user-select: none;
53+ -moz-user-select: none;
54+ -ms-user-select: /* CSS comment */ none;
55+ cursor: default !important; // SCSS comment
56+ }
57+ 
58+ > div {
59+ border: #04f 1px solid;
60+ 
61+ &::after {
62+ content: 'Pseudo';
63+ color: #2F5F7F;
64+ box-sizing: border-box;
65+ }
66+ }
67+}
68+
69+@keyframes rotate {
70+ 0% {
71+ transform: rotate(0deg);
72+ }
73+ 50% {
74+ transform: rotate(180deg)}
75+ 100% {transform: rotate(0rad);}
76+}
77+
78+@font-face {
79+ font-family: 'Example Font';
80+ src: url(example.ttf) format('ttf');
81+ src: local('Comic Sans MS');
82+}
tests/syntax-tests/source/SCSS/LICENSE.mddeleted−25
@@ -1,25 +0,0 @@
1−This file has been copied from https://sass-lang.com/documentation/syntax
2−
3−
4−LICENSE:
5−
6−
7−Copyright (c) 2006-2018 Hampton Catlin, Natalie Weizenbaum, Chris Eppstein, and
8−Jina Anne
9−
10−Permission is hereby granted, free of charge, to any person obtaining a copy of
11−this software and associated documentation files (the "Software"), to deal in
12−the Software without restriction, including without limitation the rights to
13−use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
14−the Software, and to permit persons to whom the Software is furnished to do so,
15−subject to the following conditions:
16−
17−The above copyright notice and this permission notice shall be included in all
18−copies or substantial portions of the Software.
19−
20−THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21−IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
22−FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
23−COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24−IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25−CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
tests/syntax-tests/source/SCSS/example.scss+80−17
@@ -1,19 +1,82 @@
1−@mixin button-base() {
2− @include typography(button);
3− @include ripple-surface;
4− @include ripple-radius-bounded;
5−
6− display: inline-flex;
7− position: relative;
8− height: $button-height;
9− border: none;
10− vertical-align: middle;
11−
12− &:hover { cursor: pointer; }
13−
14− &:disabled {
15− color: $mdc-button-disabled-ink-color;
16− cursor: default;
17− pointer-events: none;
1+@import 'fonts';
2+
3+$theme_dark: (
4+ "background-color": null,
5+);
6+$theme_main: (
7+ "text-size": 3em,
8+ "text-color": black,
9+ "text-shadow": #36ad 0px 0px 3px,
10+ "card-background": #d6f,
11+ "card-shadow": #11121212 0px 0px 2px 1px,
12+ "card-padding": 1rem,
13+ "card-margin": 0.5in,
14+ "image-width": 600px,
15+ "image-height": 100vh,
16+ "background-color": #dedbef,
17+ "i-ran-out-of-placeholders-for-units": (1vw 100% 60pt),
18+);
19+
20+$current_theme: $theme_main;
21+
22+@mixin themed() {
23+ $current_theme: $theme_main !global;
24+ @content;
25+
26+ @media (prefers-color-scheme: dark) {
27+ $current_theme: $theme_dark !global;
28+ @content;
29+ }
30+
31+ .#{"dark"} & {
32+ $current_theme: $theme_dark !global;
33+ @content;
34+ }
35+}
36+
37+@function theme($variable) {
38+ @if map-has_key($current_theme, $variable) {
39+ @return map-get($current_theme, $variable);
40+ } @else {
41+ @error "Unknown theme variable: #{$variable}";
42+ }
43+}
44+
45+body {
46+ @include themed {
47+ background-color: theme('background-color');
48+ background-image: url("https://github.com/sharkdp/bat/raw/master/doc/logo-header.svg");
49+ }
50+
51+ header[data-selectable="false"] {
52+ -webkit-user-select: none;
53+ -moz-user-select: none;
54+ -ms-user-select: /* CSS comment */ none;
55+ cursor: default !important; // SCSS comment
1856 }
57+
58+ > div {
59+ border: #04f 1px solid;
60+
61+ &::after {
62+ content: 'Pseudo';
63+ color: #2F5F7F;
64+ box-sizing: border-box;
65+ }
66+ }
67+}
68+
69+@keyframes rotate {
70+ 0% {
71+ transform: rotate(0deg);
72+ }
73+ 50% {
74+ transform: rotate(180deg)}
75+ 100% {transform: rotate(0rad);}
76+}
77+
78+@font-face {
79+ font-family: 'Example Font';
80+ src: url(example.ttf) format('ttf');
81+ src: local('Comic Sans MS');
1982}