Skip to content

Commit

Permalink
fix: 🐛 theme imports should be correct
Browse files Browse the repository at this point in the history
  • Loading branch information
mimarz committed Aug 5, 2024
1 parent cb0e42e commit 3ba3061
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@
"html-css-class-completion.includeGlobPattern": "packages/css/**/*.{css,html}",
"[github-actions-workflow]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
2 changes: 1 addition & 1 deletion packages/cli/src/tokens/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const makeEntryFile: Action = {

const generateImportUrls = R.pipe(
sortLightmodeFirst,
R.map((file): string => `@import url('./${theme}/${file.toString()}');`),
R.map((file): string => `@import url('${theme}/${file.toString()}');`),
R.join('\n'),
);

Expand Down
10 changes: 5 additions & 5 deletions packages/theme/brand/altinn.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

@layer ds.reset, ds.theme, ds.base, ds.utilities, ds.components;

@import url('./altinn/color-mode/light.css');
@import url('./altinn/typography/secondary.css');
@import url('./altinn/semantic.css');
@import url('./altinn/color-mode/dark.css');
@import url('./altinn/typography/primary.css');
@import url('altinn/color-mode/light.css');
@import url('altinn/typography/secondary.css');
@import url('altinn/semantic.css');
@import url('altinn/color-mode/dark.css');
@import url('altinn/typography/primary.css');
10 changes: 5 additions & 5 deletions packages/theme/brand/digdir.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

@layer ds.reset, ds.theme, ds.base, ds.utilities, ds.components;

@import url('./digdir/color-mode/light.css');
@import url('./digdir/typography/secondary.css');
@import url('./digdir/semantic.css');
@import url('./digdir/color-mode/dark.css');
@import url('./digdir/typography/primary.css');
@import url('digdir/color-mode/light.css');
@import url('digdir/typography/secondary.css');
@import url('digdir/semantic.css');
@import url('digdir/color-mode/dark.css');
@import url('digdir/typography/primary.css');
10 changes: 5 additions & 5 deletions packages/theme/brand/portal.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

@layer ds.reset, ds.theme, ds.base, ds.utilities, ds.components;

@import url('./portal/color-mode/light.css');
@import url('./portal/typography/secondary.css');
@import url('./portal/semantic.css');
@import url('./portal/color-mode/dark.css');
@import url('./portal/typography/primary.css');
@import url('portal/color-mode/light.css');
@import url('portal/typography/secondary.css');
@import url('portal/semantic.css');
@import url('portal/typography/primary.css');
@import url('portal/color-mode/dark.css');
10 changes: 5 additions & 5 deletions packages/theme/brand/uutilsynet.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

@layer ds.reset, ds.theme, ds.base, ds.utilities, ds.components;

@import url('./uutilsynet/color-mode/light.css');
@import url('./uutilsynet/typography/secondary.css');
@import url('./uutilsynet/semantic.css');
@import url('./uutilsynet/color-mode/dark.css');
@import url('./uutilsynet/typography/primary.css');
@import url('uutilsynet/color-mode/light.css');
@import url('uutilsynet/typography/secondary.css');
@import url('uutilsynet/semantic.css');
@import url('uutilsynet/color-mode/dark.css');
@import url('uutilsynet/typography/primary.css');
20 changes: 20 additions & 0 deletions packages/theme/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!doctype html>
<html lang="nb">
<head>
<title>My Website</title>
<link
rel="stylesheet"
type="text/css"
href="brand/digdir.css"
/>
<style>
body {
background: var(--ds-color-accent-base-default);
}
</style>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is the default index.html file.</p>
</body>
</html>

0 comments on commit 3ba3061

Please sign in to comment.