From 259c22744cacdd2e07e2ea8c9387cba2aaf50aff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Maestri?= Date: Tue, 4 Apr 2017 11:06:22 -0300 Subject: [PATCH 1/3] CSSColorUnits now render between " when used inside javascript. --- .../instance/testBasicConstantws.st | 3 ++- .../CssHSLColorTest.class/instance/testJavascriptOn.st | 8 ++++++++ .../CssRGBColorTest.class/instance/testJavascriptOn.st | 8 ++++++++ .../CssColorUnit.class/instance/javascriptOn..st | 6 ++++++ .../RenoirSt.package/CssConstants.class/class/initial.st | 4 ++++ 5 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 source/RenoirSt-Tests.package/CssHSLColorTest.class/instance/testJavascriptOn.st create mode 100644 source/RenoirSt-Tests.package/CssRGBColorTest.class/instance/testJavascriptOn.st create mode 100644 source/RenoirSt.package/CssColorUnit.class/instance/javascriptOn..st create mode 100644 source/RenoirSt.package/CssConstants.class/class/initial.st diff --git a/source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstantws.st b/source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstantws.st index 44d3812..ec4b321 100644 --- a/source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstantws.st +++ b/source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstantws.st @@ -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' \ No newline at end of file + assert: CssConstants vertical equals: 'vertical'; + assert: CssConstants initial equals: 'initial' \ No newline at end of file diff --git a/source/RenoirSt-Tests.package/CssHSLColorTest.class/instance/testJavascriptOn.st b/source/RenoirSt-Tests.package/CssHSLColorTest.class/instance/testJavascriptOn.st new file mode 100644 index 0000000..115c833 --- /dev/null +++ b/source/RenoirSt-Tests.package/CssHSLColorTest.class/instance/testJavascriptOn.st @@ -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%)"' \ No newline at end of file diff --git a/source/RenoirSt-Tests.package/CssRGBColorTest.class/instance/testJavascriptOn.st b/source/RenoirSt-Tests.package/CssRGBColorTest.class/instance/testJavascriptOn.st new file mode 100644 index 0000000..a36d469 --- /dev/null +++ b/source/RenoirSt-Tests.package/CssRGBColorTest.class/instance/testJavascriptOn.st @@ -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)"' \ No newline at end of file diff --git a/source/RenoirSt.package/CssColorUnit.class/instance/javascriptOn..st b/source/RenoirSt.package/CssColorUnit.class/instance/javascriptOn..st new file mode 100644 index 0000000..bc426dc --- /dev/null +++ b/source/RenoirSt.package/CssColorUnit.class/instance/javascriptOn..st @@ -0,0 +1,6 @@ +Converting +javascriptOn: aStream + + aStream nextPut: $". + self cssContentOn: aStream. + aStream nextPut: $" \ No newline at end of file diff --git a/source/RenoirSt.package/CssConstants.class/class/initial.st b/source/RenoirSt.package/CssConstants.class/class/initial.st new file mode 100644 index 0000000..806dff3 --- /dev/null +++ b/source/RenoirSt.package/CssConstants.class/class/initial.st @@ -0,0 +1,4 @@ +Accessing +initial + + ^'initial' \ No newline at end of file From 3e3a76537c45ead1925eb4d3501a9ffe403f6fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Maestri?= Date: Tue, 4 Apr 2017 17:46:43 -0300 Subject: [PATCH 2/3] Revert "CSSColorUnits now render between " when used inside javascript." This reverts commit 259c22744cacdd2e07e2ea8c9387cba2aaf50aff. --- .../instance/testBasicConstantws.st | 3 +-- .../CssHSLColorTest.class/instance/testJavascriptOn.st | 8 -------- .../CssRGBColorTest.class/instance/testJavascriptOn.st | 8 -------- .../CssColorUnit.class/instance/javascriptOn..st | 6 ------ .../RenoirSt.package/CssConstants.class/class/initial.st | 4 ---- 5 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 source/RenoirSt-Tests.package/CssHSLColorTest.class/instance/testJavascriptOn.st delete mode 100644 source/RenoirSt-Tests.package/CssRGBColorTest.class/instance/testJavascriptOn.st delete mode 100644 source/RenoirSt.package/CssColorUnit.class/instance/javascriptOn..st delete mode 100644 source/RenoirSt.package/CssConstants.class/class/initial.st diff --git a/source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstantws.st b/source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstantws.st index ec4b321..44d3812 100644 --- a/source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstantws.st +++ b/source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstantws.st @@ -9,5 +9,4 @@ testBasicConstantws assert: CssConstants none equals: 'none'; assert: CssConstants odd equals: 'odd'; assert: CssConstants show equals: 'show'; - assert: CssConstants vertical equals: 'vertical'; - assert: CssConstants initial equals: 'initial' \ No newline at end of file + assert: CssConstants vertical equals: 'vertical' \ No newline at end of file diff --git a/source/RenoirSt-Tests.package/CssHSLColorTest.class/instance/testJavascriptOn.st b/source/RenoirSt-Tests.package/CssHSLColorTest.class/instance/testJavascriptOn.st deleted file mode 100644 index 115c833..0000000 --- a/source/RenoirSt-Tests.package/CssHSLColorTest.class/instance/testJavascriptOn.st +++ /dev/null @@ -1,8 +0,0 @@ -Tests -testJavascriptOn - - | color | - - color := CssHSLColor hue: 120 saturation: 100 percent lightness: 50 percent. - - self assert: color asJavascript equals: '"hsl(120,100%,50%)"' \ No newline at end of file diff --git a/source/RenoirSt-Tests.package/CssRGBColorTest.class/instance/testJavascriptOn.st b/source/RenoirSt-Tests.package/CssRGBColorTest.class/instance/testJavascriptOn.st deleted file mode 100644 index a36d469..0000000 --- a/source/RenoirSt-Tests.package/CssRGBColorTest.class/instance/testJavascriptOn.st +++ /dev/null @@ -1,8 +0,0 @@ -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)"' \ No newline at end of file diff --git a/source/RenoirSt.package/CssColorUnit.class/instance/javascriptOn..st b/source/RenoirSt.package/CssColorUnit.class/instance/javascriptOn..st deleted file mode 100644 index bc426dc..0000000 --- a/source/RenoirSt.package/CssColorUnit.class/instance/javascriptOn..st +++ /dev/null @@ -1,6 +0,0 @@ -Converting -javascriptOn: aStream - - aStream nextPut: $". - self cssContentOn: aStream. - aStream nextPut: $" \ No newline at end of file diff --git a/source/RenoirSt.package/CssConstants.class/class/initial.st b/source/RenoirSt.package/CssConstants.class/class/initial.st deleted file mode 100644 index 806dff3..0000000 --- a/source/RenoirSt.package/CssConstants.class/class/initial.st +++ /dev/null @@ -1,4 +0,0 @@ -Accessing -initial - - ^'initial' \ No newline at end of file From 81e40546c8401e7876b0c91c1321bf09b6331daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Maestri?= Date: Tue, 4 Apr 2017 19:03:06 -0300 Subject: [PATCH 3/3] CssColors now render between quotes (") when used in Javascript Added 'initial' constant --- .../instance/testJavascriptOn.st | 8 ++++++++ .../CssHSLColorTest.extension/methodProperties.json | 5 +++++ .../CssHSLColorTest.extension/properties.json | 2 ++ .../instance/testJavascriptOn.st | 8 ++++++++ .../CssRGBColorTest.extension/methodProperties.json | 5 +++++ .../CssRGBColorTest.extension/properties.json | 2 ++ .../CssColorUnit.extension/instance/javascriptOn..st | 6 ++++++ .../CssColorUnit.extension/methodProperties.json | 5 +++++ .../CssColorUnit.extension/properties.json | 2 ++ .../{testBasicConstantws.st => testBasicConstants.st} | 5 +++-- .../RenoirSt.package/CssConstants.class/class/initial.st | 4 ++++ 11 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 source/RenoirSt-Seaside-Tests.package/CssHSLColorTest.extension/instance/testJavascriptOn.st create mode 100644 source/RenoirSt-Seaside-Tests.package/CssHSLColorTest.extension/methodProperties.json create mode 100644 source/RenoirSt-Seaside-Tests.package/CssHSLColorTest.extension/properties.json create mode 100644 source/RenoirSt-Seaside-Tests.package/CssRGBColorTest.extension/instance/testJavascriptOn.st create mode 100644 source/RenoirSt-Seaside-Tests.package/CssRGBColorTest.extension/methodProperties.json create mode 100644 source/RenoirSt-Seaside-Tests.package/CssRGBColorTest.extension/properties.json create mode 100644 source/RenoirSt-Seaside.package/CssColorUnit.extension/instance/javascriptOn..st create mode 100644 source/RenoirSt-Seaside.package/CssColorUnit.extension/methodProperties.json create mode 100644 source/RenoirSt-Seaside.package/CssColorUnit.extension/properties.json rename source/RenoirSt-Tests.package/CssConstantsTest.class/instance/{testBasicConstantws.st => testBasicConstants.st} (73%) create mode 100644 source/RenoirSt.package/CssConstants.class/class/initial.st diff --git a/source/RenoirSt-Seaside-Tests.package/CssHSLColorTest.extension/instance/testJavascriptOn.st b/source/RenoirSt-Seaside-Tests.package/CssHSLColorTest.extension/instance/testJavascriptOn.st new file mode 100644 index 0000000..367b20e --- /dev/null +++ b/source/RenoirSt-Seaside-Tests.package/CssHSLColorTest.extension/instance/testJavascriptOn.st @@ -0,0 +1,8 @@ +*RenoirSt-Seaside-Tests +testJavascriptOn + + | color | + + color := CssHSLColor hue: 120 saturation: 100 percent lightness: 50 percent. + + self assert: color asJavascript equals: '"hsl(120,100%,50%)"' \ No newline at end of file diff --git a/source/RenoirSt-Seaside-Tests.package/CssHSLColorTest.extension/methodProperties.json b/source/RenoirSt-Seaside-Tests.package/CssHSLColorTest.extension/methodProperties.json new file mode 100644 index 0000000..d0c9ab3 --- /dev/null +++ b/source/RenoirSt-Seaside-Tests.package/CssHSLColorTest.extension/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + }, + "instance" : { + "testJavascriptOn" : "JulianMaestri 4/1/2017 12:05" } } diff --git a/source/RenoirSt-Seaside-Tests.package/CssHSLColorTest.extension/properties.json b/source/RenoirSt-Seaside-Tests.package/CssHSLColorTest.extension/properties.json new file mode 100644 index 0000000..7679fe7 --- /dev/null +++ b/source/RenoirSt-Seaside-Tests.package/CssHSLColorTest.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "CssHSLColorTest" } diff --git a/source/RenoirSt-Seaside-Tests.package/CssRGBColorTest.extension/instance/testJavascriptOn.st b/source/RenoirSt-Seaside-Tests.package/CssRGBColorTest.extension/instance/testJavascriptOn.st new file mode 100644 index 0000000..54215f9 --- /dev/null +++ b/source/RenoirSt-Seaside-Tests.package/CssRGBColorTest.extension/instance/testJavascriptOn.st @@ -0,0 +1,8 @@ +*RenoirSt-Seaside-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)"' \ No newline at end of file diff --git a/source/RenoirSt-Seaside-Tests.package/CssRGBColorTest.extension/methodProperties.json b/source/RenoirSt-Seaside-Tests.package/CssRGBColorTest.extension/methodProperties.json new file mode 100644 index 0000000..d0c9ab3 --- /dev/null +++ b/source/RenoirSt-Seaside-Tests.package/CssRGBColorTest.extension/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + }, + "instance" : { + "testJavascriptOn" : "JulianMaestri 4/1/2017 12:05" } } diff --git a/source/RenoirSt-Seaside-Tests.package/CssRGBColorTest.extension/properties.json b/source/RenoirSt-Seaside-Tests.package/CssRGBColorTest.extension/properties.json new file mode 100644 index 0000000..597f86f --- /dev/null +++ b/source/RenoirSt-Seaside-Tests.package/CssRGBColorTest.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "CssRGBColorTest" } diff --git a/source/RenoirSt-Seaside.package/CssColorUnit.extension/instance/javascriptOn..st b/source/RenoirSt-Seaside.package/CssColorUnit.extension/instance/javascriptOn..st new file mode 100644 index 0000000..d710f4a --- /dev/null +++ b/source/RenoirSt-Seaside.package/CssColorUnit.extension/instance/javascriptOn..st @@ -0,0 +1,6 @@ +*RenoirSt-Seaside +javascriptOn: aStream + + aStream nextPut: $". + self cssContentOn: aStream. + aStream nextPut: $" \ No newline at end of file diff --git a/source/RenoirSt-Seaside.package/CssColorUnit.extension/methodProperties.json b/source/RenoirSt-Seaside.package/CssColorUnit.extension/methodProperties.json new file mode 100644 index 0000000..22bac1f --- /dev/null +++ b/source/RenoirSt-Seaside.package/CssColorUnit.extension/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + }, + "instance" : { + "javascriptOn:" : "JulianMaestri 4/1/2017 12:01" } } diff --git a/source/RenoirSt-Seaside.package/CssColorUnit.extension/properties.json b/source/RenoirSt-Seaside.package/CssColorUnit.extension/properties.json new file mode 100644 index 0000000..3854dc3 --- /dev/null +++ b/source/RenoirSt-Seaside.package/CssColorUnit.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "CssColorUnit" } diff --git a/source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstantws.st b/source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstants.st similarity index 73% rename from source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstantws.st rename to source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstants.st index 44d3812..81d8e1e 100644 --- a/source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstantws.st +++ b/source/RenoirSt-Tests.package/CssConstantsTest.class/instance/testBasicConstants.st @@ -1,5 +1,5 @@ Tests -testBasicConstantws +testBasicConstants self assert: CssConstants auto equals: 'auto'; @@ -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' \ No newline at end of file + assert: CssConstants vertical equals: 'vertical'; + assert: CssConstants initial equals: 'initial' \ No newline at end of file diff --git a/source/RenoirSt.package/CssConstants.class/class/initial.st b/source/RenoirSt.package/CssConstants.class/class/initial.st new file mode 100644 index 0000000..806dff3 --- /dev/null +++ b/source/RenoirSt.package/CssConstants.class/class/initial.st @@ -0,0 +1,4 @@ +Accessing +initial + + ^'initial' \ No newline at end of file