Skip to content

Commit 9785ab1

Browse files
authored
Merge branch 'main' into allow-position-static
2 parents 538fdf0 + 0d2922e commit 9785ab1

File tree

4 files changed

+65
-13
lines changed

4 files changed

+65
-13
lines changed

src/__tests__/vendor/tailwind/flexbox-grid.test.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -599,12 +599,12 @@ describe("Flexbox & Grid - Align Content", () => {
599599
});
600600
test("content-evenly", async () => {
601601
expect(await renderCurrentTest()).toStrictEqual({
602-
props: {},
603-
warnings: {
604-
values: {
605-
"align-content": "space-evenly",
606-
},
607-
},
602+
props: { style: { alignContent: "space-evenly" } },
603+
});
604+
});
605+
test("content-stretch", async () => {
606+
expect(await renderCurrentTest()).toStrictEqual({
607+
props: { style: { alignContent: "stretch" } },
608608
});
609609
});
610610
});

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/__tests__/vendor/tailwind/sizing.test.tsx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,55 @@ describe("Sizing - Max Height", () => {
239239
});
240240
});
241241
});
242+
243+
describe("Sizing - Size", () => {
244+
test("size-0", async () => {
245+
expect(await renderCurrentTest()).toStrictEqual({
246+
props: { style: { width: 0, height: 0 } },
247+
});
248+
});
249+
test("size-px", async () => {
250+
expect(await renderCurrentTest()).toStrictEqual({
251+
props: { style: { width: 1, height: 1 } },
252+
});
253+
});
254+
test("size-1", async () => {
255+
expect(await renderCurrentTest()).toStrictEqual({
256+
props: { style: { width: 3.5, height: 3.5 } },
257+
});
258+
});
259+
test("size-1/2", async () => {
260+
expect(await renderCurrentTest()).toStrictEqual({
261+
props: { style: { width: "50%", height: "50%" } },
262+
});
263+
});
264+
test("size-full", async () => {
265+
expect(await renderCurrentTest()).toStrictEqual({
266+
props: { style: { width: "100%", height: "100%" } },
267+
});
268+
});
269+
test("size-auto", async () => {
270+
expect(await renderCurrentTest()).toStrictEqual({
271+
props: {},
272+
warnings: { values: { width: "auto", height: "auto" } },
273+
});
274+
});
275+
test("size-min", async () => {
276+
expect(await renderCurrentTest()).toStrictEqual({
277+
props: {},
278+
warnings: { values: { width: "min-content", height: "min-content" } },
279+
});
280+
});
281+
test("size-max", async () => {
282+
expect(await renderCurrentTest()).toStrictEqual({
283+
props: {},
284+
warnings: { values: { width: "max-content", height: "max-content" } },
285+
});
286+
});
287+
test("size-fit", async () => {
288+
expect(await renderCurrentTest()).toStrictEqual({
289+
props: {},
290+
warnings: { values: { width: "fit-content", height: "fit-content" } },
291+
});
292+
});
293+
});

src/compiler/declarations.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1828,6 +1828,7 @@ export function parseAlignContent(
18281828
"stretch",
18291829
"space-between",
18301830
"space-around",
1831+
"space-evenly",
18311832
]);
18321833

18331834
let value: string | undefined;
@@ -2411,7 +2412,7 @@ export function parseDisplay(
24112412
builder: StylesheetBuilder,
24122413
) {
24132414
if (value.type === "keyword") {
2414-
if (value.value === "none") {
2415+
if (value.value === "none" || value.value === "contents") {
24152416
return value.value;
24162417
} else {
24172418
builder.addWarning("value", value.value);

0 commit comments

Comments
 (0)