diff --git a/color-module/src/schemes/q_style_2/baseline.rs b/color-module/src/schemes/q_style_2/baseline.rs index b4c9d74..ab76a85 100644 --- a/color-module/src/schemes/q_style_2/baseline.rs +++ b/color-module/src/schemes/q_style_2/baseline.rs @@ -49,7 +49,10 @@ impl ColorUnit { let mut css_variables = Vec::new(); css_variables.extend(self.root.to_css_variables(prefix, name)); - css_variables.extend(self.surface.to_css_variables(prefix, name)); + css_variables.extend( + self.surface + .to_css_variables(prefix, &format!("{name}-surface")), + ); css_variables.extend(self.swatch.to_css_variables(prefix, name)); css_variables @@ -59,7 +62,10 @@ impl ColorUnit { let mut css_auto_scheme_collection = LinkedHashMap::new(); css_auto_scheme_collection.extend(self.root.to_css_auto_scheme_collection(name)); - css_auto_scheme_collection.extend(self.surface.to_css_auto_scheme_collection(name)); + css_auto_scheme_collection.extend( + self.surface + .to_css_auto_scheme_collection(&format!("{name}-surface")), + ); css_auto_scheme_collection.extend(self.swatch.to_css_auto_scheme_collection(name)); css_auto_scheme_collection @@ -69,7 +75,10 @@ impl ColorUnit { let mut scss_variables = Vec::new(); scss_variables.extend(self.root.to_scss_variables(prefix, name)); - scss_variables.extend(self.surface.to_scss_variables(prefix, name)); + scss_variables.extend( + self.surface + .to_scss_variables(prefix, &format!("{name}-surface")), + ); scss_variables.extend(self.swatch.to_scss_variables(prefix, name)); scss_variables @@ -79,7 +88,7 @@ impl ColorUnit { let mut js_object_fields = Vec::new(); js_object_fields.extend(self.root.to_javascript_fields(name)); - js_object_fields.extend(self.surface.to_javascript_fields(name)); + js_object_fields.extend(self.surface.to_javascript_fields(&format!("{name}Surface"))); js_object_fields.extend(self.swatch.to_javascript_fields(name)); js_object_fields