From 31cedd25477b2ca131d989228ca359192120e20f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Mon, 10 Feb 2025 22:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=94=9F=E6=88=90=E7=9A=84CS?= =?UTF-8?q?S=20Variables=E5=BC=95=E5=AF=BC=E7=AC=A6=E5=8F=B7=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/schemes/material_design_3/surface.rs | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/color-module/src/schemes/material_design_3/surface.rs b/color-module/src/schemes/material_design_3/surface.rs index ad62315..972687c 100644 --- a/color-module/src/schemes/material_design_3/surface.rs +++ b/color-module/src/schemes/material_design_3/surface.rs @@ -84,43 +84,43 @@ impl M3SurfaceSet { pub fn to_css_variables(&self, prefix: &str) -> Vec { let mut css_variables = Vec::new(); - css_variables.push(format!("--color-{}-surface: ${};", prefix, self.root)); - css_variables.push(format!("--color-{}-surface-dim: ${};", prefix, self.dim)); + css_variables.push(format!("--color-{}-surface: #{};", prefix, self.root)); + css_variables.push(format!("--color-{}-surface-dim: #{};", prefix, self.dim)); css_variables.push(format!( - "--color-{}-surface-bright: ${};", + "--color-{}-surface-bright: #{};", prefix, self.bright )); css_variables.push(format!( - "--color-{}-surface-container: ${};", + "--color-{}-surface-container: #{};", prefix, self.container )); css_variables.push(format!( - "--color-{}-surface-container-lowest: ${};", + "--color-{}-surface-container-lowest: #{};", prefix, self.container_lowest )); css_variables.push(format!( - "--color-{}-surface-container-low: ${};", + "--color-{}-surface-container-low: #{};", prefix, self.container_low )); css_variables.push(format!( - "--color-{}-surface-container-high: ${};", + "--color-{}-surface-container-high: #{};", prefix, self.container_high )); css_variables.push(format!( - "--color-{}-surface-container-highest: ${};", + "--color-{}-surface-container-highest: #{};", prefix, self.container_highest )); - css_variables.push(format!("--color-{}-on-surface: ${};", prefix, self.on_root)); + css_variables.push(format!("--color-{}-on-surface: #{};", prefix, self.on_root)); css_variables.push(format!( - "--color-{}-on-surface-variant: ${};", + "--color-{}-on-surface-variant: #{};", prefix, self.on_root_variant )); css_variables.push(format!( - "--color-{}-inverse-surface: ${};", + "--color-{}-inverse-surface: #{};", prefix, self.inverse )); css_variables.push(format!( - "--color-{}-inverse-on-surface: ${};", + "--color-{}-inverse-on-surface: #{};", prefix, self.on_inverse )); @@ -130,43 +130,43 @@ impl M3SurfaceSet { pub fn to_scss_variables(&self, prefix: &str) -> Vec { let mut scss_variables = Vec::new(); - scss_variables.push(format!("$color-{}-surface: ${};", prefix, self.root)); - scss_variables.push(format!("$color-{}-surface-dim: ${};", prefix, self.dim)); + scss_variables.push(format!("$color-{}-surface: #{};", prefix, self.root)); + scss_variables.push(format!("$color-{}-surface-dim: #{};", prefix, self.dim)); scss_variables.push(format!( - "$color-{}-surface-bright: ${};", + "$color-{}-surface-bright: #{};", prefix, self.bright )); scss_variables.push(format!( - "$color-{}-surface-container: ${};", + "$color-{}-surface-container: #{};", prefix, self.container )); scss_variables.push(format!( - "$color-{}-surface-container-lowest: ${};", + "$color-{}-surface-container-lowest: #{};", prefix, self.container_lowest )); scss_variables.push(format!( - "$color-{}-surface-container-low: ${};", + "$color-{}-surface-container-low: #{};", prefix, self.container_low )); scss_variables.push(format!( - "$color-{}-surface-container-high: ${};", + "$color-{}-surface-container-high: #{};", prefix, self.container_high )); scss_variables.push(format!( - "$color-{}-surface-container-highest: ${};", + "$color-{}-surface-container-highest: #{};", prefix, self.container_highest )); - scss_variables.push(format!("$color-{}-on-surface: ${};", prefix, self.on_root)); + scss_variables.push(format!("$color-{}-on-surface: #{};", prefix, self.on_root)); scss_variables.push(format!( - "$color-{}-on-surface-variant: ${};", + "$color-{}-on-surface-variant: #{};", prefix, self.on_root_variant )); scss_variables.push(format!( - "$color-{}-inverse-surface: ${};", + "$color-{}-inverse-surface: #{};", prefix, self.inverse )); scss_variables.push(format!( - "$color-{}-inverse-on-surface: ${};", + "$color-{}-inverse-on-surface: #{};", prefix, self.on_inverse ));