fix: 将自定义颜色名称转换为小写以保持一致性
This commit is contained in:
parent
61ff3eff5c
commit
034f12c99b
@ -334,7 +334,8 @@ impl Baseline {
|
||||
));
|
||||
|
||||
for (name, color_unit) in &self.custom_colors {
|
||||
css_variables.extend(color_unit.to_css_variables(scheme_mode, name));
|
||||
let lowercased_name = name.to_lowercase();
|
||||
css_variables.extend(color_unit.to_css_variables(scheme_mode, &lowercased_name));
|
||||
}
|
||||
|
||||
css_variables
|
||||
@ -373,7 +374,8 @@ impl Baseline {
|
||||
);
|
||||
|
||||
for (name, color) in &self.custom_colors {
|
||||
css_variables.extend(color.to_css_auto_scheme_collection(name));
|
||||
let lowercased_name = name.to_lowercase();
|
||||
css_variables.extend(color.to_css_auto_scheme_collection(&lowercased_name));
|
||||
}
|
||||
|
||||
css_variables
|
||||
@ -422,6 +424,11 @@ impl Baseline {
|
||||
map_oklch_to_srgb_hex(&self.outline_variant)
|
||||
));
|
||||
|
||||
for (name, color) in &self.custom_colors {
|
||||
let lowercased_name = name.to_lowercase();
|
||||
scss_variables.extend(color.to_scss_variables(scheme_mode, &lowercased_name));
|
||||
}
|
||||
|
||||
scss_variables
|
||||
}
|
||||
|
||||
@ -502,7 +509,8 @@ impl Baseline {
|
||||
));
|
||||
|
||||
for (name, color) in &self.custom_colors {
|
||||
let color_lines = color.to_javascript_fields(name);
|
||||
let lowercased_name = name.to_lowercase();
|
||||
let color_lines = color.to_javascript_fields(&lowercased_name);
|
||||
javascript_fields.extend(color_lines.iter().map(|s| format!("{indent}{s}")));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user