Skip to content

Commit

Permalink
add more css properties, shorthands
Browse files Browse the repository at this point in the history
  • Loading branch information
lucyxiang committed Jan 19, 2023
1 parent f8df852 commit a006f1e
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion lib/loofah/html5/safelist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -623,11 +623,12 @@ module SafeList
])

ACCEPTABLE_CSS_PROPERTIES = Set.new([
"azimuth",
"accent-color",
"align-content",
"align-items",
"align-self",
"aspect-ratio",
"azimuth",
"background-color",
"border-bottom-color",
"border-collapse",
Expand Down Expand Up @@ -661,7 +662,10 @@ module SafeList
"line-height",
"list-style",
"list-style-type",
"max-height",
"max-width",
"min-height",
"min-width",
"order",
"overflow",
"overflow-x",
Expand All @@ -674,22 +678,45 @@ module SafeList
"pause-before",
"pitch",
"pitch-range",
"position",
"richness",
"speak",
"speak-header",
"speak-numeral",
"speak-punctuation",
"speech-rate",
"stress",
"scroll-margin",
"scroll-padding",
"text-align",
"text-decoration",
"text-decoration-color",
"text-decoration-line",
"text-decoration-skip",
"text-decoration-skip-ink",
"text-decoration-style",
"text-decoration-thickness",
"text-emphasis",
"text-emphasis-color",
"text-emphasis-position",
"text-emphasis-style",
"text-indent",
"text-justify",
"text-orientation",
"text-overflow",
"text-rendering",
"text-shadow",
"text-size-adjust",
"text-transform",
"text-underline-offset",
"text-underline-position",
"unicode-bidi",
"vertical-align",
"voice-family",
"volume",
"white-space",
"width",
"z-index",
])

ACCEPTABLE_CSS_KEYWORDS = Set.new([
Expand All @@ -712,16 +739,22 @@ module SafeList
"italic",
"left",
"medium",
"no-repeat"
"none",
"normal",
"nowrap",
"outset",
"pointer",
"repeat",
"repeat-x",
"repeat-y",
"revert",
"ridge",
"right",
"round",
"separate",
"solid",
"space",
"thick",
"thin",
"top",
Expand Down Expand Up @@ -957,10 +990,16 @@ module SafeList
])

SHORTHAND_CSS_PROPERTIES = Set.new([
"all",
"animation",
"background",
"border",
"columns",
"flex",
"font",
"margin",
"padding",
"transition"
])

ACCEPTABLE_SVG_PROPERTIES = Set.new([
Expand Down

0 comments on commit a006f1e

Please sign in to comment.