Skip to content

Commit 41b8a62

Browse files
committed
fix: allow display contents
1 parent 96f5ce2 commit 41b8a62

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/__tests__/vendor/tailwind/layout.test.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ describe("Layout - Display", () => {
209209
props: { style: { display: "none" } },
210210
});
211211
});
212+
test("contents", async () => {
213+
expect(await renderCurrentTest()).toStrictEqual({
214+
props: { style: { display: "contents" } },
215+
});
216+
});
212217
test("block", async () => {
213218
expect(await renderCurrentTest()).toStrictEqual({
214219
props: {},
@@ -311,12 +316,6 @@ describe("Layout - Display", () => {
311316
warnings: { values: { display: "inline-grid" } },
312317
});
313318
});
314-
test("contents", async () => {
315-
expect(await renderCurrentTest()).toStrictEqual({
316-
props: {},
317-
warnings: { values: { display: "contents" } },
318-
});
319-
});
320319
test("list-item", async () => {
321320
expect(await renderCurrentTest()).toStrictEqual({
322321
props: {},

src/compiler/declarations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2407,7 +2407,7 @@ export function parseDisplay(
24072407
builder: StylesheetBuilder,
24082408
) {
24092409
if (value.type === "keyword") {
2410-
if (value.value === "none") {
2410+
if (value.value === "none" || value.value === "contents") {
24112411
return value.value;
24122412
} else {
24132413
builder.addWarning("value", value.value);

0 commit comments

Comments
 (0)