Skip to content

Commit

Permalink
Add specs for empty custom properties (#1259)
Browse files Browse the repository at this point in the history
Unlike #1249, this forbids empty custom properties.

Closes #1249
  • Loading branch information
nex3 committed Jun 1, 2018
1 parent f3b0113 commit c0bfb5b
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 3 deletions.
4 changes: 4 additions & 0 deletions spec/css/custom_properties/error/empty/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Error: Expected token.
--property:;
^
/sass/spec/css/custom_properties/error/empty/input.scss 3:14 root stylesheet
Empty file.
4 changes: 4 additions & 0 deletions spec/css/custom_properties/error/empty/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// CSS requires at least one token in a custom property.
.empty {
--property:;
}
4 changes: 4 additions & 0 deletions spec/css/custom_properties/error/empty/options.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
:todo:
- ruby-sass # sass/ruby-sass#63
- libsass # sass/ruby-sass#63
1 change: 1 addition & 0 deletions spec/css/custom_properties/error/empty/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
4 changes: 4 additions & 0 deletions spec/css/custom_properties/error/empty_interpolation/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Error: Custom property values may not be empty.
--property:#{""};
^^^^^
/sass/spec/css/custom_properties/error/empty_interpolation/input.scss 3:14 root stylesheet
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// CSS requires at least one token in a custom property.
.empty {
--property:#{""};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
:todo:
- ruby-sass # sass/ruby-sass#63
- libsass # sass/ruby-sass#63
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Error: Nothing may be indented beneath a custom property.
bar: baz
baz: qux
^
spec/css/custom_properties/error/no_nesting/input.sass 3:5 root stylesheet
4 changes: 2 additions & 2 deletions spec/css/custom_properties/error/no_nesting/input.sass
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.no-nesting
--foo:
bar: baz
--foo: bar
baz: qux

0 comments on commit c0bfb5b

Please sign in to comment.