修正生成的CSS Variables引导符号错误问题。
This commit is contained in:
		@@ -84,43 +84,43 @@ impl M3SurfaceSet {
 | 
				
			|||||||
    pub fn to_css_variables(&self, prefix: &str) -> Vec<String> {
 | 
					    pub fn to_css_variables(&self, prefix: &str) -> Vec<String> {
 | 
				
			||||||
        let mut css_variables = Vec::new();
 | 
					        let mut css_variables = Vec::new();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        css_variables.push(format!("--color-{}-surface: ${};", prefix, self.root));
 | 
					        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-dim: #{};", prefix, self.dim));
 | 
				
			||||||
        css_variables.push(format!(
 | 
					        css_variables.push(format!(
 | 
				
			||||||
            "--color-{}-surface-bright: ${};",
 | 
					            "--color-{}-surface-bright: #{};",
 | 
				
			||||||
            prefix, self.bright
 | 
					            prefix, self.bright
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        css_variables.push(format!(
 | 
					        css_variables.push(format!(
 | 
				
			||||||
            "--color-{}-surface-container: ${};",
 | 
					            "--color-{}-surface-container: #{};",
 | 
				
			||||||
            prefix, self.container
 | 
					            prefix, self.container
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        css_variables.push(format!(
 | 
					        css_variables.push(format!(
 | 
				
			||||||
            "--color-{}-surface-container-lowest: ${};",
 | 
					            "--color-{}-surface-container-lowest: #{};",
 | 
				
			||||||
            prefix, self.container_lowest
 | 
					            prefix, self.container_lowest
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        css_variables.push(format!(
 | 
					        css_variables.push(format!(
 | 
				
			||||||
            "--color-{}-surface-container-low: ${};",
 | 
					            "--color-{}-surface-container-low: #{};",
 | 
				
			||||||
            prefix, self.container_low
 | 
					            prefix, self.container_low
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        css_variables.push(format!(
 | 
					        css_variables.push(format!(
 | 
				
			||||||
            "--color-{}-surface-container-high: ${};",
 | 
					            "--color-{}-surface-container-high: #{};",
 | 
				
			||||||
            prefix, self.container_high
 | 
					            prefix, self.container_high
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        css_variables.push(format!(
 | 
					        css_variables.push(format!(
 | 
				
			||||||
            "--color-{}-surface-container-highest: ${};",
 | 
					            "--color-{}-surface-container-highest: #{};",
 | 
				
			||||||
            prefix, self.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!(
 | 
					        css_variables.push(format!(
 | 
				
			||||||
            "--color-{}-on-surface-variant: ${};",
 | 
					            "--color-{}-on-surface-variant: #{};",
 | 
				
			||||||
            prefix, self.on_root_variant
 | 
					            prefix, self.on_root_variant
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        css_variables.push(format!(
 | 
					        css_variables.push(format!(
 | 
				
			||||||
            "--color-{}-inverse-surface: ${};",
 | 
					            "--color-{}-inverse-surface: #{};",
 | 
				
			||||||
            prefix, self.inverse
 | 
					            prefix, self.inverse
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        css_variables.push(format!(
 | 
					        css_variables.push(format!(
 | 
				
			||||||
            "--color-{}-inverse-on-surface: ${};",
 | 
					            "--color-{}-inverse-on-surface: #{};",
 | 
				
			||||||
            prefix, self.on_inverse
 | 
					            prefix, self.on_inverse
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -130,43 +130,43 @@ impl M3SurfaceSet {
 | 
				
			|||||||
    pub fn to_scss_variables(&self, prefix: &str) -> Vec<String> {
 | 
					    pub fn to_scss_variables(&self, prefix: &str) -> Vec<String> {
 | 
				
			||||||
        let mut scss_variables = Vec::new();
 | 
					        let mut scss_variables = Vec::new();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        scss_variables.push(format!("$color-{}-surface: ${};", prefix, self.root));
 | 
					        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-dim: #{};", prefix, self.dim));
 | 
				
			||||||
        scss_variables.push(format!(
 | 
					        scss_variables.push(format!(
 | 
				
			||||||
            "$color-{}-surface-bright: ${};",
 | 
					            "$color-{}-surface-bright: #{};",
 | 
				
			||||||
            prefix, self.bright
 | 
					            prefix, self.bright
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        scss_variables.push(format!(
 | 
					        scss_variables.push(format!(
 | 
				
			||||||
            "$color-{}-surface-container: ${};",
 | 
					            "$color-{}-surface-container: #{};",
 | 
				
			||||||
            prefix, self.container
 | 
					            prefix, self.container
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        scss_variables.push(format!(
 | 
					        scss_variables.push(format!(
 | 
				
			||||||
            "$color-{}-surface-container-lowest: ${};",
 | 
					            "$color-{}-surface-container-lowest: #{};",
 | 
				
			||||||
            prefix, self.container_lowest
 | 
					            prefix, self.container_lowest
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        scss_variables.push(format!(
 | 
					        scss_variables.push(format!(
 | 
				
			||||||
            "$color-{}-surface-container-low: ${};",
 | 
					            "$color-{}-surface-container-low: #{};",
 | 
				
			||||||
            prefix, self.container_low
 | 
					            prefix, self.container_low
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        scss_variables.push(format!(
 | 
					        scss_variables.push(format!(
 | 
				
			||||||
            "$color-{}-surface-container-high: ${};",
 | 
					            "$color-{}-surface-container-high: #{};",
 | 
				
			||||||
            prefix, self.container_high
 | 
					            prefix, self.container_high
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        scss_variables.push(format!(
 | 
					        scss_variables.push(format!(
 | 
				
			||||||
            "$color-{}-surface-container-highest: ${};",
 | 
					            "$color-{}-surface-container-highest: #{};",
 | 
				
			||||||
            prefix, self.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!(
 | 
					        scss_variables.push(format!(
 | 
				
			||||||
            "$color-{}-on-surface-variant: ${};",
 | 
					            "$color-{}-on-surface-variant: #{};",
 | 
				
			||||||
            prefix, self.on_root_variant
 | 
					            prefix, self.on_root_variant
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        scss_variables.push(format!(
 | 
					        scss_variables.push(format!(
 | 
				
			||||||
            "$color-{}-inverse-surface: ${};",
 | 
					            "$color-{}-inverse-surface: #{};",
 | 
				
			||||||
            prefix, self.inverse
 | 
					            prefix, self.inverse
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
        scss_variables.push(format!(
 | 
					        scss_variables.push(format!(
 | 
				
			||||||
            "$color-{}-inverse-on-surface: ${};",
 | 
					            "$color-{}-inverse-on-surface: #{};",
 | 
				
			||||||
            prefix, self.on_inverse
 | 
					            prefix, self.on_inverse
 | 
				
			||||||
        ));
 | 
					        ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user