Skip to content

Commit

Permalink
Allow ! in custom property values
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Mar 22, 2018
1 parent 21d6f2a commit 6fa8d9f
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 25 deletions.
3 changes: 0 additions & 3 deletions spec/css/custom_properties/error/bang_in_ident/error

This file was deleted.

This file was deleted.

Empty file.
3 changes: 0 additions & 3 deletions spec/css/custom_properties/error/bang_in_ident/input.scss

This file was deleted.

1 change: 0 additions & 1 deletion spec/css/custom_properties/error/bang_in_ident/status

This file was deleted.

3 changes: 0 additions & 3 deletions spec/css/custom_properties/error/top_level_bang/error

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions spec/css/custom_properties/error/top_level_bang/error-libsass

This file was deleted.

Empty file.
3 changes: 0 additions & 3 deletions spec/css/custom_properties/error/top_level_bang/input.scss

This file was deleted.

1 change: 0 additions & 1 deletion spec/css/custom_properties/error/top_level_bang/status

This file was deleted.

8 changes: 8 additions & 0 deletions spec/css/custom_properties/exclamation/expected_output.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.exclamation {
--important: value !important;
--multiple: !important !important;
--other-word: !something;
--in-identifier: foo!bar;
--just-exclam: !;
--just-exclams: !!!!!!!;
}
14 changes: 14 additions & 0 deletions spec/css/custom_properties/exclamation/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.exclamation {
// `!` is technically not allowed at the top-level of a custom property, but
// that's only because `!important` is filtered out before the custom property
// is parsed by the CSS parser. As far as Sass is concerned, it's fine.
--important: value !important;

// We even allow constructions like these for forwards-compatibility with
// additional flags or syntax CSS might add.
--multiple: !important !important;
--other-word: !something;
--in-identifier: foo!bar;
--just-exclam: !;
--just-exclams: !!!!!!!;
}
3 changes: 3 additions & 0 deletions spec/css/custom_properties/exclamation/options.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
:todo:
- libsass

0 comments on commit 6fa8d9f

Please sign in to comment.