Skip to content

Commit acaf3f2

Browse files
authored
hsl and hsla (#216)
1 parent af0ca83 commit acaf3f2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/main/java/org/owasp/html/CssSchema.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Property forKey(String propertyName) {
293293
ImmutableSet<String> mozOutlineLiterals3 = ImmutableSet.of(
294294
"hidden", "inherit", "inset", "invert", "medium", "none");
295295
ImmutableMap<String, String> mozOutlineFunctions =
296-
ImmutableMap.<String, String>of("rgb(", "rgb()", "rgba(", "rgba()");
296+
ImmutableMap.<String, String>of("rgb(", "rgb()", "rgba(", "rgba()","hsl(","hsl()","hsla(","hsla()");
297297
ImmutableSet<String> mozOutlineColorLiterals0 =
298298
ImmutableSet.of("inherit", "invert");
299299
ImmutableSet<String> mozOutlineStyleLiterals0 =
@@ -323,7 +323,7 @@ Property forKey(String propertyName) {
323323
.put("radial-gradient(", "radial-gradient()")
324324
.put("repeating-linear-gradient(", "repeating-linear-gradient()")
325325
.put("repeating-radial-gradient(", "repeating-radial-gradient()")
326-
.put("rgb(", "rgb()").put("rgba(", "rgba()")
326+
.put("rgb(", "rgb()").put("rgba(", "rgba()").put("hsl(", "hsl()").put("hsla(","hsla()")
327327
.build();
328328
ImmutableSet<String> backgroundAttachmentLiterals0 =
329329
ImmutableSet.of(",", "fixed", "local", "scroll");
@@ -467,6 +467,8 @@ Property forKey(String propertyName) {
467467
ImmutableSet<String> wordWrapLiterals0 = ImmutableSet.of(
468468
"break-word", "normal");
469469
ImmutableSet<String> rgb$FunLiterals0 = ImmutableSet.of(",");
470+
471+
470472
ImmutableSet<String> linearGradient$FunLiterals0 = ImmutableSet.of(
471473
",", "to");
472474
ImmutableSet<String> radialGradient$FunLiterals0 = ImmutableSet.of(
@@ -742,6 +744,9 @@ Property forKey(String propertyName) {
742744
builder.put("zoom", new Property(1, fontStretchLiterals1, zeroFns));
743745
Property rgb$Fun = new Property(1, rgb$FunLiterals0, zeroFns);
744746
builder.put("rgb()", rgb$Fun);
747+
748+
builder.put("hsl()", rgb$Fun);
749+
builder.put("hsla()", rgb$Fun);
745750
@SuppressWarnings("unchecked")
746751
Property image$Fun = new Property(
747752
18, union(mozOutlineLiterals0, rgb$FunLiterals0), mozOutlineFunctions);
@@ -961,6 +966,8 @@ private static <T> ImmutableSet<T> union(
961966
"repeating-radial-gradient()",
962967
"rgb()",
963968
"rgba()",
969+
"hsl()",
970+
"hsla()",
964971
"richness",
965972
"speak",
966973
"speak-header",

0 commit comments

Comments
 (0)