Skip to content

Commit

Permalink
Fixed Tailwind 4 migration bugs, broken build (#3532)
Browse files Browse the repository at this point in the history
* 🧪 Added tw-reset to compare chromatic

* 🐛 ExpansionCard button had dynamic padding

* 📝 Added changeset, removed old stories from Tag
  • Loading branch information
KenAJoh authored Jan 31, 2025
1 parent 83960d7 commit c73db43
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/gentle-points-greet-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@navikt/ds-css": patch
---

ExpansionCard: Removed dynamic padding on button-element.
5 changes: 5 additions & 0 deletions .changeset/gentle-points-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@navikt/ds-css": patch
---

Modal: Defaults to `margin: auto` for tailwind 4 support.
11 changes: 11 additions & 0 deletions @navikt/core/css/baseline/_inline-reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ html,
box-sizing: inherit;
}

*,
::after,
::before,
::backdrop,
::file-selector-button {
box-sizing: border-box;
margin: 0;
padding: 0;
border: 0 solid;
}

button,
input,
optgroup,
Expand Down
1 change: 1 addition & 0 deletions @navikt/core/css/expansioncard.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
min-width: 3rem;
font-size: 1.5rem;
align-self: flex-start;
padding: 0;
}

.navds-expansioncard--small > :where(.navds-expansioncard__header) > :where(.navds-expansioncard__header-button) {
Expand Down
1 change: 1 addition & 0 deletions @navikt/core/css/modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/* In case Modal is opened with `show()`, in eg. Vergic screensharing */
inset: 0;
z-index: 9999;
margin: auto;
}

.navds-modal[open] {
Expand Down
6 changes: 0 additions & 6 deletions @navikt/core/react/src/tag/tag.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ const variants: TagProps["variant"][] = [
"alt1",
"alt2",
"alt3",
"meta-1",
"meta-2",
"warning-filled",
"error-filled",
"info-filled",
Expand All @@ -25,8 +23,6 @@ const variants: TagProps["variant"][] = [
"alt1-filled",
"alt2-filled",
"alt3-filled",
"meta-1-filled",
"meta-2-filled",
"warning-moderate",
"error-moderate",
"info-moderate",
Expand All @@ -35,8 +31,6 @@ const variants: TagProps["variant"][] = [
"alt1-moderate",
"alt2-moderate",
"alt3-moderate",
"meta-1-moderate",
"meta-2-moderate",
];

export default {
Expand Down

0 comments on commit c73db43

Please sign in to comment.