Skip to content

Commit

Permalink
feat: background-attachment
Browse files Browse the repository at this point in the history
  • Loading branch information
ifiokjr committed May 3, 2023
1 parent dcdcb7c commit 37b8b6d
Show file tree
Hide file tree
Showing 6 changed files with 462 additions and 311 deletions.
12 changes: 12 additions & 0 deletions crates/skribble_preset/src/data/aliases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,5 +483,17 @@ lazy_static! {
"whitespace:$nowrap"
])
.build(),
Alias::builder()
.name("bg-fixed")
.classes(vec!["bg-attachment:$fixed"])
.build(),
Alias::builder()
.name("bg-local")
.classes(vec!["bg-attachment:$local"])
.build(),
Alias::builder()
.name("bg-scroll")
.classes(vec!["bg-attachment:$scroll"])
.build(),
];
}
17 changes: 12 additions & 5 deletions crates/skribble_preset/src/data/atoms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,6 @@ lazy_static! {
.values(vec!["direction"])
.styles(indexmap! { "direction" => none })
.build(),
Atom::builder()
.name("bg")
.values(LinkedValues::Color)
.styles(indexmap! { "background-color" => none })
.build(),
Atom::builder()
.name("opacity")
.values(vec!["opacity"])
Expand Down Expand Up @@ -1162,6 +1157,18 @@ lazy_static! {
.values(vec!["none"])
.styles(indexmap! { "content" => none })
.build(),

// Backgrounds
Atom::builder()
.name("bg-attachment")
.values(vec!["background-attachment"])
.styles(indexmap! { "background-attachment" => none })
.build(),
Atom::builder()
.name("bg")
.values(LinkedValues::Color)
.styles(indexmap! { "background-color" => none })
.build(),
]
};
}
8 changes: 8 additions & 0 deletions crates/skribble_preset/src/data/value_sets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,14 @@ lazy_static! {
.name("hyphens")
.values(indexmap! { "manual" => "manual" })
.build(),
ValueSet::builder()
.name("background-attachment")
.values(indexmap! {
"fixed" => "fixed",
"local" => "local",
"scroll" => "scroll",
})
.build(),
]
};
}

0 comments on commit 37b8b6d

Please sign in to comment.