修复Swatch中顺序的保持。
This commit is contained in:
parent
21b538af99
commit
3b0600e64a
|
@ -1,5 +1,4 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use linked_hash_map::LinkedHashMap;
|
||||
use palette::Oklch;
|
||||
|
||||
use crate::convert::map_oklch_to_srgb_hex;
|
||||
|
@ -96,8 +95,8 @@ impl Swatch {
|
|||
variables
|
||||
}
|
||||
|
||||
pub fn to_css_auto_scheme_collection(&self, name: &str) -> HashMap<String, String> {
|
||||
let mut collection = HashMap::new();
|
||||
pub fn to_css_auto_scheme_collection(&self, name: &str) -> LinkedHashMap<String, String> {
|
||||
let mut collection = LinkedHashMap::new();
|
||||
for (i, color) in self.swatch().iter().enumerate() {
|
||||
collection.insert(
|
||||
format!("{}-{}", name, i * 100),
|
||||
|
|
Loading…
Reference in New Issue
Block a user