File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
__tests__/vendor/tailwind Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -188,14 +188,12 @@ describe("Layout - Box Decoration Break", () => {
188188describe ( "Layout - Box Sizing" , ( ) => {
189189 test ( "box-border" , async ( ) => {
190190 expect ( await renderCurrentTest ( ) ) . toStrictEqual ( {
191- props : { } ,
192- warnings : { properties : [ "box-sizing" ] } ,
191+ props : { style : { boxSizing : "border-box" } } ,
193192 } ) ;
194193 } ) ;
195194 test ( "box-content" , async ( ) => {
196195 expect ( await renderCurrentTest ( ) ) . toStrictEqual ( {
197- props : { } ,
198- warnings : { properties : [ "box-sizing" ] } ,
196+ props : { style : { boxSizing : "content-box" } } ,
199197 } ) ;
200198 } ) ;
201199} ) ;
Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ const parsers: {
148148 "border-width" : parseBorderWidth ,
149149 "bottom" : parseSizeDeclaration ,
150150 "box-shadow" : parseBoxShadow ,
151+ "box-sizing" : parseBoxSizing ,
151152 "caret-color" : parseColorOrAutoDeclaration ,
152153 "color" : parseFontColorDeclaration ,
153154 "column-gap" : parseGap ,
@@ -2360,6 +2361,18 @@ export function parseBoxShadow(
23602361 }
23612362}
23622363
2364+ export function parseBoxSizing (
2365+ declaration : DeclarationType < "box-sizing" > ,
2366+ builder : StylesheetBuilder ,
2367+ ) {
2368+ if ( [ "border-box" , "content-box" ] . includes ( declaration . value ) ) {
2369+ return declaration . value ;
2370+ }
2371+
2372+ builder . addWarning ( "value" , declaration . value ) ;
2373+ return undefined ;
2374+ }
2375+
23632376export function parseDisplay (
23642377 { value } : DeclarationType < "display" > ,
23652378 builder : StylesheetBuilder ,
You can’t perform that action at this time.
0 commit comments