Skip to content

Commit b3bb1d7

Browse files
hukpomarklawlor
andauthored
fix: allow display contents (#141)
Co-authored-by: Mark Lawlor <mwlawlor@gmail.com>
1 parent 35c34a2 commit b3bb1d7

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
@@ -2408,7 +2408,7 @@ export function parseDisplay(
24082408
builder: StylesheetBuilder,
24092409
) {
24102410
if (value.type === "keyword") {
2411-
if (value.value === "none") {
2411+
if (value.value === "none" || value.value === "contents") {
24122412
return value.value;
24132413
} else {
24142414
builder.addWarning("value", value.value);

0 commit comments

Comments
 (0)