Skip to content

Commit 2ff63e8

Browse files
committed
More simple prefixes
1 parent 15098b6 commit 2ff63e8

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/properties/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ define_properties! {
198198
"background-origin": BackgroundOrigin(SmallVec<[BackgroundBox; 1]>),
199199
"background": Background(SmallVec<[Background; 1]>),
200200

201-
"box-shadow": BoxShadow(SmallVec<[BoxShadow; 1]>),
201+
"box-shadow": BoxShadow(SmallVec<[BoxShadow; 1]>, VendorPrefix) / "webkit" / "moz",
202202
"opacity": Opacity(AlphaValue),
203203

204204
"color": Color(CssColor),
@@ -215,6 +215,7 @@ define_properties! {
215215
"min-inline-size": MinInlineSize(MinMaxSize),
216216
"max-block-size": MaxBlockSize(MinMaxSize),
217217
"max-inline-size": MaxInlineSize(MinMaxSize),
218+
"box-sizing": BoxSizing(BoxSizing, VendorPrefix) / "webkit" / "moz",
218219

219220
"top": Top(LengthPercentageOrAuto),
220221
"bottom": Bottom(LengthPercentageOrAuto),

src/properties/prefix_handler.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,6 @@ define_prefixes! {
9393
BackfaceVisibility,
9494
Perspective,
9595
PerspectiveOrigin,
96+
BoxShadow,
97+
BoxSizing,
9698
}

src/values/size.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use cssparser::*;
22
use crate::traits::{Parse, ToCss};
33
use crate::printer::Printer;
44
use super::length::LengthPercentage;
5+
use crate::macros::enum_property;
56

67
/// https://drafts.csswg.org/css-sizing-3/#specifying-sizes
78
@@ -140,3 +141,9 @@ fn parse_fit_content<'i, 't>(input: &mut Parser<'i, 't>) -> Result<LengthPercent
140141
input.expect_function_matching("fit-content")?;
141142
input.parse_nested_block(|input| LengthPercentage::parse(input))
142143
}
144+
145+
// https://drafts.csswg.org/css-sizing-3/#box-sizing
146+
enum_property!(BoxSizing,
147+
("content-box", ContentBox),
148+
("border-box", BorderBox)
149+
);

0 commit comments

Comments
 (0)