-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for functions and conditions
- Loading branch information
1 parent
c8de9e7
commit b8e0bd8
Showing
21 changed files
with
423 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"insertColons": true, | ||
"insertSemicolons": true, | ||
"insertBraces": true, | ||
"insertNewLineBetweenGroups": 1, | ||
"insertNewLineBetweenSelectors": false, | ||
"insertNewLineBetweenElseIf": true, | ||
"insertSpaceBeforeComments": true, | ||
"insertSpaceAfterComments": true, | ||
"insertParenthesisAroundConditions": true, | ||
"indentChar": "\t", | ||
"newLineChar": "\r\n", | ||
"sortProperties": false, | ||
"alwaysUseImport": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"insertColons": true, | ||
"insertSemicolons": true, | ||
"insertBraces": false, | ||
"insertNewLineBetweenGroups": 1, | ||
"insertNewLineBetweenSelectors": false, | ||
"insertNewLineBetweenElseIf": true, | ||
"insertSpaceBeforeComments": true, | ||
"insertSpaceAfterComments": true, | ||
"insertParenthesisAroundConditions": true, | ||
"indentChar": "\t", | ||
"newLineChar": "\r\n", | ||
"sortProperties": false, | ||
"alwaysUseImport": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"insertColons": true, | ||
"insertSemicolons": true, | ||
"insertBraces": true, | ||
"insertNewLineBetweenGroups": 1, | ||
"insertNewLineBetweenSelectors": false, | ||
"insertNewLineBetweenElseIf": false, | ||
"insertSpaceBeforeComments": true, | ||
"insertSpaceAfterComments": true, | ||
"insertParenthesisAroundConditions": true, | ||
"indentChar": "\t", | ||
"newLineChar": "\r\n", | ||
"sortProperties": false, | ||
"alwaysUseImport": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
add(a,b) | ||
a=unit(a,px) | ||
b=unit(b,px) | ||
a+b | ||
body | ||
padding add(10px,5) | ||
|
||
func(x,y=unit(a,px)) | ||
x**y | ||
func(x:10,y:25) | ||
alias=func | ||
|
||
multi-returned-value-func() | ||
10px 25px | ||
|
||
anonymous-func=@(a,b) { | ||
a > b | ||
} | ||
|
||
body | ||
color mix(#000,#fff,30%) | ||
|
||
+prefix-classes('foo-') | ||
.bar | ||
width 10px | ||
|
||
box-shadow(a,args...) | ||
box-shadow args | ||
border-radius arguments |
Oops, something went wrong.