forked from gcotelli/RenoirSt
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CSSColorUnits now render between " when used inside javascript.
- Loading branch information
Julián Maestri
committed
Apr 4, 2017
1 parent
da4a91c
commit 259c227
Showing
5 changed files
with
28 additions
and
1 deletion.
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
8 changes: 8 additions & 0 deletions
8
source/RenoirSt-Tests.package/CssHSLColorTest.class/instance/testJavascriptOn.st
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,8 @@ | ||
Tests | ||
testJavascriptOn | ||
|
||
| color | | ||
|
||
color := CssHSLColor hue: 120 saturation: 100 percent lightness: 50 percent. | ||
|
||
self assert: color asJavascript equals: '"hsl(120,100%,50%)"' |
8 changes: 8 additions & 0 deletions
8
source/RenoirSt-Tests.package/CssRGBColorTest.class/instance/testJavascriptOn.st
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,8 @@ | ||
Tests | ||
testJavascriptOn | ||
|
||
| color | | ||
|
||
color := (CssRGBColor red: 255 green: 0 blue: 0 alpha: 0.5). | ||
|
||
self assert: color asJavascript equals: '"rgba(255,0,0,0.5)"' |
6 changes: 6 additions & 0 deletions
6
source/RenoirSt.package/CssColorUnit.class/instance/javascriptOn..st
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,6 @@ | ||
Converting | ||
javascriptOn: aStream | ||
|
||
aStream nextPut: $". | ||
self cssContentOn: aStream. | ||
aStream nextPut: $" |
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,4 @@ | ||
Accessing | ||
initial | ||
|
||
^'initial' |