Skip to content

Commit

Permalink
Added support for @Keyframes
Browse files Browse the repository at this point in the history
  • Loading branch information
Anantachai Saothong (Manta) committed Apr 3, 2017
1 parent 276f40b commit a6e8c7a
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/condition-new-line/output.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ body {
if (x == y) {
margin: 1;
}

if (x > y) {
padding: x;
}
Expand All @@ -11,6 +12,7 @@ body {
else {
padding: 0;
}

unless (x == y) {
display: none;
}
Expand Down
2 changes: 2 additions & 0 deletions spec/condition-no-braces/output.styl
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
body
if (x == y)
margin: 1;

if (x > y)
padding: x;
else if (x < y)
padding: x;
else
padding: 0;

unless (x == y)
display: none;
3 changes: 3 additions & 0 deletions spec/condition/output.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@ body {
if (x == y) {
margin: 1;
}

if (x > y) {
padding: x;
} else if (x < y) {
padding: x;
} else {
padding: 0;
}

unless (x == y) {
display: none;
}
}

negative(n) {
error('invalid number') unless (n is a 'unit');

return yes if (n < 0);

no;
Expand Down
13 changes: 13 additions & 0 deletions spec/keyframe/formattingOptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"insertColons": true,
"insertSemicolons": true,
"insertBraces": true,
"insertNewLineBetweenGroups": 1,
"insertNewLineBetweenSelectors": false,
"insertSpaceBeforeComments": true,
"insertSpaceAfterComments": true,
"indentChar": "\t",
"newLineChar": "\r\n",
"sortProperties": false,
"alwaysUseImport": false
}
11 changes: 11 additions & 0 deletions spec/keyframe/input.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$keyframe-name = pulse
@keyframes {$keyframe-name}
for i in 0..10
{10% * i}
opacity (i/10)

@keyframes foo
from
color: black
to
color: white
19 changes: 19 additions & 0 deletions spec/keyframe/output.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
$keyframe-name = pulse;

@keyframes {$keyframe-name} {
for i in 0 .. 10 {
{10% * i} {
opacity: i / 10;
}
}
}

@keyframes foo {
from {
color: black;
}

to {
color: white;
}
}
1 change: 1 addition & 0 deletions spec/media/output.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@media screen {
display: none;
}

@media print and (min-width: 600px), (max-width: 500px) and (max-{foo}: bar) {
padding: 20px;
}

0 comments on commit a6e8c7a

Please sign in to comment.