encre_css/plugins/interactivity/scroll_margin/
mod.rs1#![doc = include_str!("README.md")]
2#![doc(alias = "interactivity")]
3use crate::prelude::build_plugin::*;
4
5type P = (StaticPlugin, StaticPlugin);
6
7const fn plugin(namespace: &'static str, prop: StaticPropertyName) -> P {
8 (
9 Plugin::Spacing(Spacing {
10 namespace,
11 prop,
12 ..Spacing::default()
13 }),
14 Plugin::Arbitrary(Arbitrary {
15 namespace,
16 prop,
17 ..Arbitrary::default()
18 }),
19 )
20}
21
22pub(crate) const PLUGIN: P = plugin("scroll-m", SingleProp("scroll-margin"));
23pub(crate) const PLUGIN_X: P = plugin("scroll-mx", SingleProp("scroll-margin-inline"));
24pub(crate) const PLUGIN_Y: P = plugin("scroll-my", SingleProp("scroll-margin-block"));
25pub(crate) const PLUGIN_START: P = plugin("scroll-ms", SingleProp("scroll-margin-inline-start"));
26pub(crate) const PLUGIN_END: P = plugin("scroll-me", SingleProp("scroll-margin-inline-end"));
27pub(crate) const PLUGIN_TOP: P = plugin("scroll-mt", SingleProp("scroll-margin-top"));
28pub(crate) const PLUGIN_BOTTOM: P = plugin("scroll-mb", SingleProp("scroll-margin-bottom"));
29pub(crate) const PLUGIN_LEFT: P = plugin("scroll-ml", SingleProp("scroll-margin-left"));
30pub(crate) const PLUGIN_RIGHT: P = plugin("scroll-mr", SingleProp("scroll-margin-right"));