Skip to content

Commit 92bcc93

Browse files
committed
Fjern tailwind preflight & spesifiser css
1 parent b0dec7e commit 92bcc93

File tree

6 files changed

+53
-6
lines changed

6 files changed

+53
-6
lines changed

bun.lockb

952 Bytes
Binary file not shown.

packages/internarbeidsflate-decorator-v3/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"concurrently": "^9.0.0",
3434
"msw": "^2.2.13",
3535
"postcss": "^8.4.38",
36+
"postcss-import": "^16.1.0",
3637
"react": "^18.2.0",
3738
"react-dom": "^18.2.0",
3839
"tailwindcss": "^3.4.3",
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
module.exports = () => ({
2-
plugins: [require('tailwindcss')(), require('autoprefixer')()],
2+
plugins: [
3+
require('postcss-import')(),
4+
require('tailwindcss/nesting')(),
5+
require('tailwindcss')(),
6+
require('autoprefixer')(),
7+
],
38
});

packages/internarbeidsflate-decorator-v3/src/index.css

+39-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
@import 'tailwindcss/base';
2-
@import '@navikt/ds-css';
3-
@import 'tailwindcss/components';
4-
@import 'tailwindcss/utilities';
1+
@layer tw-base, aksel-dr, tw-dr;
2+
@import 'tailwindcss/base' layer(tw-base-dr);
3+
@import '@navikt/ds-css' layer(aksel-dr);
4+
@import 'tailwindcss/components' layer(tw-dr);
5+
@import 'tailwindcss/utilities' layer(tw-dr);
56

67
[data-theme='internarbeidsflatedecorator-theme'] {
78
--ac-select-bg: var(--a-gray-900);
@@ -22,3 +23,37 @@
2223
--ac-button-tertiary-neutral-text: var(--a-gray-900);
2324
--a-shadow-focus-inverted: 0 0 0 3px var(--a-orange-500);
2425
}
26+
27+
.dekorator {
28+
@layer tw-base {
29+
h1,
30+
h2,
31+
h3,
32+
h4,
33+
h5,
34+
h6 {
35+
font-size: inherit;
36+
font-weight: inherit;
37+
}
38+
39+
ol,
40+
ul {
41+
list-style: none;
42+
margin: 0;
43+
padding: 0;
44+
}
45+
46+
*,
47+
::before,
48+
::after {
49+
border-width: 0;
50+
border-style: solid;
51+
border-color: theme('borderColor.DEFAULT', currentColor);
52+
}
53+
54+
::before,
55+
::after {
56+
--tw-content: '';
57+
}
58+
}
59+
}

packages/internarbeidsflate-decorator-v3/src/wrapper/Wrapper.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ const Wrapper: React.FC = () => {
5555
<div className="dr-w-full dr-top-0">
5656
<Decorator
5757
appName="Test app"
58-
markup={{ etterSokefelt: '<button>Min knapp</button>' }}
58+
markup={{
59+
etterSokefelt:
60+
'<button class="dr-font-black dr-bg-none dr-border-none">Min knapp</button>',
61+
}}
5962
enableHotkeys
6063
showEnheter={true}
6164
showSearchArea={true}

packages/internarbeidsflate-decorator-v3/tailwind.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ export default {
2121
},
2222
},
2323
},
24+
corePlugins: {
25+
preflight: false,
26+
},
2427
presets: [dsTailwind],
2528
plugins: [],
2629
};

0 commit comments

Comments
 (0)