mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Sass] [SCSS] Add some tests for invalid CSS that we still want to support.
This commit is contained in:
parent
4e6cfb9ccd
commit
ccb07d5ccf
1 changed files with 30 additions and 0 deletions
|
@ -167,6 +167,18 @@ foo {
|
||||||
SCSS
|
SCSS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_ms_filter_syntax
|
||||||
|
assert_equal <<CSS, render(<<SCSS)
|
||||||
|
foo {
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); }
|
||||||
|
CSS
|
||||||
|
foo {
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000);
|
||||||
|
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); }
|
||||||
|
SCSS
|
||||||
|
end
|
||||||
|
|
||||||
## Directives
|
## Directives
|
||||||
|
|
||||||
def test_charset_directive
|
def test_charset_directive
|
||||||
|
@ -440,6 +452,24 @@ SCSS
|
||||||
assert_selector_parses("E, F\nG, H")
|
assert_selector_parses("E, F\nG, H")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_expression_fallback_selectors
|
||||||
|
assert_selector_parses('0%')
|
||||||
|
assert_selector_parses('60%')
|
||||||
|
assert_selector_parses('100%')
|
||||||
|
assert_selector_parses('12px')
|
||||||
|
assert_selector_parses('"foo"')
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_functional_pseudo_selectors
|
||||||
|
assert_selector_parses(':foo("bar")')
|
||||||
|
assert_selector_parses(':foo(bar)')
|
||||||
|
assert_selector_parses(':foo(12px)')
|
||||||
|
assert_selector_parses(':foo(+)')
|
||||||
|
assert_selector_parses(':foo(-)')
|
||||||
|
assert_selector_parses(':foo(+"bar")')
|
||||||
|
assert_selector_parses(':foo(-++--baz-"bar"12px)')
|
||||||
|
end
|
||||||
|
|
||||||
## Errors
|
## Errors
|
||||||
|
|
||||||
def test_invalid_directives
|
def test_invalid_directives
|
||||||
|
|
Loading…
Add table
Reference in a new issue