Skip to main content

encre_css/plugins/border/ring_offset_width/
mod.rs

1#![doc = include_str!("README.md")]
2#![doc(alias = "border")]
3use crate::prelude::build_plugin::*;
4
5pub(crate) const RING_OFFSET_SHADOW: &str = "--en-ring-offset-shadow: var(--en-ring-inset) 0 0 0 var(--en-ring-offset-width) var(--en-ring-offset-color);";
6
7pub(crate) const PLUGIN: StaticPlugin = Plugin::Number(Number {
8    namespace: "ring-offset",
9    prop: SingleProp("--en-ring-offset-width"),
10    extra_rule_css: Some(&[RING_OFFSET_SHADOW]),
11    template: Some(SingleProp("{}px")),
12    ..Number::default()
13});
14
15pub(crate) const PLUGIN_ARBITRARY: StaticPlugin = Plugin::Arbitrary(Arbitrary {
16    namespace: "ring-offset",
17    prop: SingleProp("--en-ring-offset-width"),
18    disambiguate: Some(ArbitraryDisambiguate {
19        matched: &[CssType::Length],
20        separation: ArbitraryDisambiguateSeparation::None,
21    }),
22    extra_rule_css: Some(&[RING_OFFSET_SHADOW]),
23    ..Arbitrary::default()
24});