File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -353,12 +353,10 @@ def _prepare_color_vars(
353353 mapped [pal_name ] = pal_color
354354
355355 # Create Sass and CSS variables for the brand color palette
356- color_var = sanitize_sass_var_name (pal_name )
357-
358356 # => Sass var: `$brand-{name}: {value}`
359- brand_sass_vars .update ({f"brand-{ color_var } " : pal_color })
357+ brand_sass_vars .update ({f"brand-{ pal_name } " : pal_color })
360358 # => CSS var: `--brand-{name}: {value}`
361- brand_css_vars .append (f"--brand-{ color_var } : { pal_color } ;" )
359+ brand_css_vars .append (f"--brand-{ pal_name } : { pal_color } ;" )
362360
363361 # We keep Sass and Brand vars separate so we can ensure Brand Sass vars come
364362 # first in the compiled Sass definitions.
@@ -565,11 +563,6 @@ def _html_dependencies(self) -> list[HTMLDependency]:
565563 return [fonts_dep , * theme_deps ]
566564
567565
568- def sanitize_sass_var_name (x : str ) -> str :
569- x = re .sub (r"""['"]""" , "" , x )
570- return re .sub (r"[^a-zA-Z0-9_-]+" , "-" , x )
571-
572-
573566def maybe_convert_font_size_to_rem (x : str ) -> CssUnit :
574567 """
575568 Convert a font size to rem
You can’t perform that action at this time.
0 commit comments