Skip to content

Commit

Permalink
Merge pull request #925 from mgreter/indent-sass-specs
Browse files Browse the repository at this point in the history
Add more sass spec tests
  • Loading branch information
mgreter authored Sep 24, 2016
2 parents cc51bd9 + 613eff4 commit 0738c42
Show file tree
Hide file tree
Showing 12 changed files with 183 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/sass/bem/expected_output.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.testing {
margin-bottom: 32px;
margin-foobar-bar: 1px;
margin-foobar-baz: 2px;
margin-hover-baz: 3px;
end: 4px; }
9 changes: 9 additions & 0 deletions spec/sass/bem/input.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.testing
:margin
:bottom 32px
:foobar
:bar 1px
:baz 2px
:hover
:baz 3px
:end 4px
13 changes: 13 additions & 0 deletions spec/sass/extend/expected_output.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.error, .seriousError, .criticalError {
border: 1px #f00;
background-color: #fdd; }

.seriousError, .criticalError {
border-width: 3px; }

.criticalError {
position: fixed;
top: 10%;
bottom: 10%;
left: 10%;
right: 10%; }
15 changes: 15 additions & 0 deletions spec/sass/extend/input.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.error
border: 1px #f00
background-color: #fdd

.seriousError
@extend .error
border-width: 3px

.criticalError
@extend .seriousError
position: fixed
top: 10%
bottom: 10%
left: 10%
right: 10%
2 changes: 2 additions & 0 deletions spec/sass/functions/expected_output.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#sidebar {
width: 240px; }
8 changes: 8 additions & 0 deletions spec/sass/functions/input.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$grid-width: 40px
$gutter-width: 10px

@function grid-width($n)
@return $n * $grid-width + ($n - 1) * $gutter-width

#sidebar
width: grid-width(5)
18 changes: 18 additions & 0 deletions spec/sass/mixins/expected_output.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
input {
color: blue;
background: red; }

* html #logo {
background-image: url(/logo.gif); }

.a + .c, .a + .b {
margin: 10px;
mix: in; }

.a {
mix: in; }
.a + b .c, .a + b .b {
margin: 10px; }

.a > .c, .a > .b {
margin: 10px; }
35 changes: 35 additions & 0 deletions spec/sass/mixins/input.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
=mixme
color: blue

input
+mixme
background: red

=apply-to-ie6-only
* html
@content

+apply-to-ie6-only
#logo
background-image: url(/logo.gif)

@mixin inc()
mix: in

.a
+
.c, .b
margin: 10px
+inc

.a
+inc
+ b
.c, .b
margin: 10px


.a
>
.c, .b
margin: 10px
23 changes: 23 additions & 0 deletions spec/sass/pseudo/expected_output.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
::selection {
color: rebeccapurple; }

::-webkit-selection {
color: rebeccapurple; }

::-webkit-selection, ::selection {
color: rebeccapurple; }

:-webkit-selection {
color: rebeccapurple; }

:hover TD {
color: red; }

:color red {
foo: bar; }

:left DF {
hover-foo: bar; }

:nth-child(2n+1) SPAN {
foo: bar; }
18 changes: 18 additions & 0 deletions spec/sass/pseudo/input.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
::selection
color: rebeccapurple
::-webkit-selection
color: rebeccapurple
::-webkit-selection, ::selection
color: rebeccapurple
\:-webkit-selection
color: rebeccapurple

\:hover TD
color: red
\:color red
foo: bar
\:left DF
:hover
foo: bar
\:nth-child(2n+1) SPAN
foo: bar
15 changes: 15 additions & 0 deletions spec/sass/selectors/expected_output.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.test {
foo: bar; }
.test ~ {
tilde: true; }
.test + {
adjancent: true; }
.test > {
child: true; }
.test * {
universal: true; }
.test [foo] {
attribute: true; }

.selector-0 + .selector-1 {
color: rebeccapurple; }
21 changes: 21 additions & 0 deletions spec/sass/selectors/input.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.test
foo: bar
~
tilde: true
+
adjancent: true
>
child: true
*
universal: true
[foo]
attribute: true

@mixin selector-2()
foo: bar

.selector-0
+ .selector-1
color: rebeccapurple
= selector-2
color: yellow

0 comments on commit 0738c42

Please # to comment.