Skip to content

Commit

Permalink
Add missing curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
larseirikhansen authored Jan 9, 2025
1 parent 1327635 commit b3dc1d5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions @navikt/core/react/src/layout/utilities/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,15 @@ const translateTokenStringToCSS = (
.split(" ")
.map((propValue, _, arr) => {
// Handle special layout cases
if (specialLayout === "margin-inline" && propValue === "full")
if (specialLayout === "margin-inline" && propValue === "full") {
return `calc((100vw - ${100 / arr.length}%)/-2)`;
if (specialLayout === "padding-inline" && propValue === "full")
}
if (specialLayout === "padding-inline" && propValue === "full") {
return `calc((100vw - ${100 / arr.length}%)/2)`;
if (["mi", "mb"].includes(specialLayout) && propValue === "auto")
}
if (["mi", "mb"].includes(specialLayout) && propValue === "auto") {
return "auto";
}

// Handle exceptions and space tokens
let output = `var(--${prefix}-${tokenSubgroup}-${propValue})`;
Expand Down

0 comments on commit b3dc1d5

Please sign in to comment.