svnlabs / google-caja

Automatically exported from code.google.com/p/google-caja
0 stars 1 forks source link

Whitelist HSL color notation in CSS #1920

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What revision of the cajoler exhibits the problem?  On what browser and OS?

Caja Playground
Rev 5643 built on 2013-12-05 14:54:08.
ChromeOS
Versie 35.0.1916.69
Platform 5712.35.0 (Official Build) stable-channel stumpy
Firmware Google_Stumpy.2.102.0

What steps will reproduce the problem?
1. Change backgroundcolor using HSL values with Javascript
2. document.getElementById("myDIV").style.backgroundColor = "hsl(59,100%,50%)";
3. Console gives error "bad value `hsl(59,100%,50%)` for CSS property 
backgroundColor "

What is the expected output? 
- Changing background color

Setting colors using HSL is very easy programmatically, i.e. a color bar. 
Cannot be used using HTMLService in GAS.

What do you see instead?
- Error message in console

Please provide any additional information below.

--- source ----

<style> 
#myDIV
{
width:300px;
height:300px;
background-color:coral;
color:white;
}
</style>
<div id="myDIV">
<h1>Hello</h1>
</div>
<script>
document.getElementById("myDIV").style.backgroundColor = "hsl(59,100%,50%)";
</script>

​

Original issue reported on code.google.com by r...@zzapps.nl on 16 May 2014 at 8:21

GoogleCodeExporter commented 9 years ago

Original comment by kpreid@google.com on 19 May 2014 at 2:22