File tree Expand file tree Collapse file tree 4 files changed +58
-0
lines changed
Expand file tree Collapse file tree 4 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -11352,6 +11352,44 @@ mod tests {
1135211352 );
1135311353 }
1135411354
11355+ #[test]
11356+ fn test_break() {
11357+ prefix_test(
11358+ r#"
11359+ .foo {
11360+ box-decoration-break: clone;
11361+ }
11362+ "#,
11363+ indoc! {r#"
11364+ .foo {
11365+ -webkit-box-decoration-break: clone;
11366+ box-decoration-break: clone;
11367+ }
11368+ "#},
11369+ Browsers {
11370+ safari: Some(15 << 16),
11371+ ..Browsers::default()
11372+ },
11373+ );
11374+
11375+ prefix_test(
11376+ r#"
11377+ .foo {
11378+ box-decoration-break: clone;
11379+ }
11380+ "#,
11381+ indoc! {r#"
11382+ .foo {
11383+ box-decoration-break: clone;
11384+ }
11385+ "#},
11386+ Browsers {
11387+ firefox: Some(95 << 16),
11388+ ..Browsers::default()
11389+ },
11390+ );
11391+ }
11392+
1135511393 #[test]
1135611394 fn test_position() {
1135711395 test(
Original file line number Diff line number Diff line change @@ -1071,6 +1071,9 @@ define_properties! {
10711071 "text-emphasis-position" : TextEmphasisPosition ( TextEmphasisPosition , VendorPrefix ) / WebKit ,
10721072 "text-shadow" : TextShadow ( SmallVec <[ TextShadow ; 1 ] >) ,
10731073
1074+ // https://www.w3.org/TR/css-break-3/
1075+ "box-decoration-break" : BoxDecorationBreak ( BoxDecorationBreak , VendorPrefix ) / WebKit ,
1076+
10741077 // https://www.w3.org/TR/2021/WD-css-ui-4-20210316
10751078 "resize" : Resize ( Resize ) ,
10761079 "cursor" : Cursor ( Cursor <' i>) ,
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ define_prefixes! {
9696 UserSelect ,
9797 Appearance ,
9898 ClipPath ,
99+ BoxDecorationBreak ,
99100}
100101
101102macro_rules! define_fallbacks {
Original file line number Diff line number Diff line change @@ -909,6 +909,22 @@ impl<'i> Parse<'i> for TextEmphasisPosition {
909909 }
910910}
911911
912+ enum_property ! {
913+ /// A value for the [box-decoration-break](https://www.w3.org/TR/css-break-3/#break-decoration) property.
914+ pub enum BoxDecorationBreak {
915+ /// The element is rendered with no breaks present, and then sliced by the breaks afterward.
916+ Slice ,
917+ /// Each box fragment is independently wrapped with the border, padding, and margin.
918+ Clone ,
919+ }
920+ }
921+
922+ impl Default for BoxDecorationBreak {
923+ fn default ( ) -> Self {
924+ BoxDecorationBreak :: Slice
925+ }
926+ }
927+
912928impl ToCss for TextEmphasisPosition {
913929 fn to_css < W > ( & self , dest : & mut Printer < W > ) -> Result < ( ) , PrinterError >
914930 where
You can’t perform that action at this time.
0 commit comments