调整M3的导出格式。
This commit is contained in:
parent
f3f259fd1c
commit
7fba372d08
|
@ -153,7 +153,7 @@ impl SchemeExport for MaterialDesign3Scheme {
|
|||
swatch
|
||||
.to_javascript_object_fields(name)
|
||||
.into_iter()
|
||||
.map(|s| format!(" {}", s)),
|
||||
.map(|s| format!(" {}", s)),
|
||||
);
|
||||
}
|
||||
js_object.push(" }".to_string());
|
||||
|
|
|
@ -25,6 +25,7 @@ impl M3PaletteSwatch {
|
|||
|
||||
pub fn to_css_variables(&self, name: &str) -> Vec<String> {
|
||||
let mut variable_lines = Vec::new();
|
||||
let name = name.replace('_', "-").to_lowercase();
|
||||
|
||||
for &tone in SWATCH_TONES.iter() {
|
||||
let color = self.0.get(&tone).unwrap();
|
||||
|
@ -36,6 +37,7 @@ impl M3PaletteSwatch {
|
|||
|
||||
pub fn to_scss_variables(&self, name: &str) -> Vec<String> {
|
||||
let mut variable_lines = Vec::new();
|
||||
let name = name.replace('_', "-").to_lowercase();
|
||||
|
||||
for &tone in SWATCH_TONES.iter() {
|
||||
let color = self.0.get(&tone).unwrap();
|
||||
|
|
Loading…
Reference in New Issue
Block a user