Skip to content

Commit

Permalink
Add more css properties
Browse files Browse the repository at this point in the history
  • Loading branch information
lucyxiang committed Jan 23, 2023
1 parent f8df852 commit d386bb2
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion lib/loofah/html5/safelist.rb
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

0 comments on commit d386bb2

Please sign in to comment.