Skip to content

Commit 9959c87

Browse files
hukpomarklawlor
andauthored
fix: allow static position (#140)
Co-authored-by: Mark Lawlor <mwlawlor@gmail.com>
1 parent 0d2922e commit 9959c87

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ describe("Accessibility - Screen Readers", () => {
2929
margin: 0,
3030
overflow: "visible",
3131
padding: 0,
32+
position: "static",
3233
},
3334
},
3435
warnings: {
3536
properties: ["clip", "white-space"],
3637
values: {
37-
position: "static",
3838
width: "auto",
3939
height: "auto",
4040
},

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,7 @@ describe("Layout - Position", () => {
666666
});
667667
test("static", async () => {
668668
expect(await renderCurrentTest()).toStrictEqual({
669-
props: {},
670-
warnings: { values: { position: "static" } },
669+
props: { style: { position: "static" } },
671670
});
672671
});
673672
test("fixed", async () => {

src/compiler/declarations.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2048,7 +2048,11 @@ export function parsePosition(
20482048
{ value }: DeclarationType<"position">,
20492049
builder: StylesheetBuilder,
20502050
) {
2051-
if (value.type === "absolute" || value.type === "relative") {
2051+
if (
2052+
value.type === "absolute" ||
2053+
value.type === "relative" ||
2054+
value.type === "static"
2055+
) {
20522056
return value.type;
20532057
}
20542058

0 commit comments

Comments
 (0)