feat: (s)css multiline support

This commit is contained in:
Nils 2023-04-24 20:53:36 +02:00 committed by Lewis Russell
parent 388fceb5e9
commit fb445fa2ae
4 changed files with 80 additions and 36 deletions

View file

@ -1,10 +1,23 @@
(rule_set) @context
([
(rule_set)
(keyframe_block)
(keyframes_statement)
(media_statement)
(supports_statement)
(at_rule)
] @context)
(keyframe_block
(block (_) @context.end)
) @context
(at_rule
(block (_) @context.end)
) @context
(supports_statement
(block (_) @context.end)
) @context
(keyframes_statement
(keyframe_block_list (_) @context.end)
) @context
(media_statement
(block (_) @context.end)
) @context
(rule_set
(block (_) @context.end)
)@context

View file

@ -1,13 +1,31 @@
; inherits: css
([
(mixin_statement)
(function_statement)
(each_statement)
(for_statement)
(while_statement)
(if_clause)
(else_if_clause)
(else_clause)
] @context)
(if_statement) @context
(else_if_clause
(block (_) @context.end)
) @context
(else_clause
(block (_) @context.end)
) @context
(while_statement
(block (_) @context.end)
) @context
(for_statement
(block (_) @context.end)
) @context
(each_statement
(block (_) @context.end)
) @context
(mixin_statement
(block (_) @context.end)
) @context
(function_statement
(block (_) @context.end)
) @context

View file

@ -21,7 +21,8 @@
}
@color-profile --swop5c {
@color-profile
--swop5c {
@ -75,7 +76,9 @@
}
}
@media (prefers-reduced-motion: reduce) {
@media (
prefers-reduced-motion: reduce) {
@ -86,6 +89,22 @@
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}

View file

@ -21,6 +21,9 @@ $sizes: 40px, 50px, 80px;
}
}
@each $size in $sizes {
}
@each $size in $sizes {
.foo-#{$size} {
@ -42,19 +45,8 @@ $sizes: 40px, 50px, 80px;
.foo-#{$i} {
width: $i * 10px;
}
// only works if something is here
}
@ -67,7 +59,7 @@ $sizes: 40px, 50px, 80px;
// comment
@ -137,7 +129,8 @@ $sizes: 40px, 50px, 80px;
}
@mixin FooMixin($a, $b) {
@mixin FooMixin($a,
$b) {
@if $a > $b {
color: red;
@ -189,7 +182,8 @@ $sizes: 40px, 50px, 80px;
@function add($a, $b) {
@function add($a,
$b) {