Skip to content

Commit

Permalink
CSSColorUnits now render between " when used inside javascript.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julián Maestri committed Apr 4, 2017
1 parent da4a91c commit 259c227
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ testBasicConstantws
assert: CssConstants none equals: 'none';
assert: CssConstants odd equals: 'odd';
assert: CssConstants show equals: 'show';
assert: CssConstants vertical equals: 'vertical'
assert: CssConstants vertical equals: 'vertical';
assert: CssConstants initial equals: 'initial'
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%)"'
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)"'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Converting
javascriptOn: aStream

aStream nextPut: $".
self cssContentOn: aStream.
aStream nextPut: $"
4 changes: 4 additions & 0 deletions source/RenoirSt.package/CssConstants.class/class/initial.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Accessing
initial

^'initial'

0 comments on commit 259c227

Please sign in to comment.