-
+
{isSimple && (
(
className={cl(
classes.input,
utilityClasses.focusable,
- classes[size],
isSimple && classes.simple,
!isSimple && classes.withSearchButton,
)}
diff --git a/packages/react/src/components/form/Switch/Switch.module.css b/packages/react/src/components/form/Switch/Switch.module.css
index aef3af494d..6369497b07 100644
--- a/packages/react/src/components/form/Switch/Switch.module.css
+++ b/packages/react/src/components/form/Switch/Switch.module.css
@@ -102,22 +102,22 @@
.small,
.small .label {
- min-height: var(--fds-sizing-8);
+ min-height: var(--fds-sizing-6);
}
.medium,
.medium .label {
- min-height: var(--fds-sizing-10);
+ min-height: var(--fds-sizing-7);
}
.large,
.large .label {
- min-height: var(--fds-sizing-12);
+ min-height: var(--fds-sizing-8);
}
.small {
- --fds-switch-height: 1.5rem;
- --fds-switch-width: 2.5rem;
+ --fds-switch-height: var(--fds-sizing-6);
+ --fds-switch-width: var(--fds-sizing-11);
}
.small .input {
@@ -126,8 +126,8 @@
}
.medium {
- --fds-switch-height: 1.75rem;
- --fds-switch-width: 3rem;
+ --fds-switch-height: var(--fds-sizing-7);
+ --fds-switch-width: var(--fds-sizing-13);
}
.medium .input {
@@ -136,8 +136,8 @@
}
.large {
- --fds-switch-height: 2rem;
- --fds-switch-width: 3.5rem;
+ --fds-switch-height: var(--fds-sizing-8);
+ --fds-switch-width: var(--fds-sizing-15);
}
.large .input {
diff --git a/packages/react/src/components/form/Switch/Switch.stories.tsx b/packages/react/src/components/form/Switch/Switch.stories.tsx
index bed717bea4..54015977f3 100644
--- a/packages/react/src/components/form/Switch/Switch.stories.tsx
+++ b/packages/react/src/components/form/Switch/Switch.stories.tsx
@@ -18,6 +18,7 @@ export const Preview: Story = {
readOnly: false,
size: 'medium',
position: 'left',
+ description: '',
},
};
diff --git a/packages/react/src/components/form/Textfield/Textfield.module.css b/packages/react/src/components/form/Textfield/Textfield.module.css
index 132afdae0d..88ef87eca5 100644
--- a/packages/react/src/components/form/Textfield/Textfield.module.css
+++ b/packages/react/src/components/form/Textfield/Textfield.module.css
@@ -52,27 +52,27 @@
}
.formField.small .adornment {
- padding: 6.5px var(--fds-spacing-3);
+ padding: var(--fds-sizing-2) var(--fds-spacing-3);
}
.formField.medium .adornment {
- padding: 9px var(--fds-spacing-4);
+ padding: 0.65rem var(--fds-spacing-4);
}
.formField.large .adornment {
- padding: 11px var(--fds-spacing-5);
+ padding: 0.85rem var(--fds-spacing-5);
}
.formField.small .field {
- height: var(--fds-sizing-8);
+ height: var(--fds-sizing-10);
}
.formField.medium .field {
- height: var(--fds-sizing-10);
+ height: var(--fds-sizing-12);
}
.formField.large .field {
- height: var(--fds-sizing-12);
+ height: var(--fds-sizing-14);
}
.label {
diff --git a/packages/react/stories/testing.stories.tsx b/packages/react/stories/testing.stories.tsx
index d2d151ed68..40074956dc 100644
--- a/packages/react/stories/testing.stories.tsx
+++ b/packages/react/stories/testing.stories.tsx
@@ -9,6 +9,7 @@ import {
Radio,
Tag,
Combobox,
+ Chip,
type ButtonProps,
} from '../src/components';
@@ -37,11 +38,7 @@ export const MediumRow: StoryFn<{
prefix='prefix'
suffix='suffix'
/>
- Switch
-
+
@@ -50,6 +47,7 @@ export const MediumRow: StoryFn<{
Sogndal
+ Stavanger
@@ -62,6 +60,15 @@ export const MediumRow: StoryFn<{
flexDirection: direction,
}}
>
+
Switch
+
+
Toggle
+
Removable
+
Tag
+
- Tag
>
);
diff --git a/packages/theme/CHANGELOG.md b/packages/theme/CHANGELOG.md
index 33cc94dc43..2ebde88e37 100644
--- a/packages/theme/CHANGELOG.md
+++ b/packages/theme/CHANGELOG.md
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [0.15.1-alpha.1](https://github.com/digdir/designsystemet/compare/@digdir/designsystemet-theme@0.15.0...@digdir/designsystemet-theme@0.15.1-alpha.1) (2024-04-04)
+
+### Reverts
+
+- Revert "🍱 Generated new package tokens" ([afa9a47](https://github.com/digdir/designsystemet/commit/afa9a476483612bd162f23d371d4e467755774c8))
+
+## [0.15.1-alpha.0](https://github.com/digdir/designsystemet/compare/@digdir/designsystemet-theme@0.15.0...@digdir/designsystemet-theme@0.15.1-alpha.0) (2024-03-21)
+
+### Reverts
+
+- Revert "🍱 Generated new package tokens" ([106c9c7](https://github.com/digdir/designsystemet/commit/106c9c74463696c22846725c67c3ac08e43249b0))
+
# [0.15.0](https://github.com/digdir/designsystemet/compare/@digdir/designsystemet-theme@0.14.1...@digdir/designsystemet-theme@0.15.0) (2024-03-20)
### Features
diff --git a/packages/theme/brand/altinn/tokens.css b/packages/theme/brand/altinn/tokens.css
index 5969797e4b..a72c02e693 100644
--- a/packages/theme/brand/altinn/tokens.css
+++ b/packages/theme/brand/altinn/tokens.css
@@ -39,7 +39,6 @@
--fds-colors-grey-400: #bcbfc5;
--fds-colors-red-800: #5a121d;
--fds-colors-purple-700: #7a1265;
- --fds-font-size-f0: clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem);
/** Tokens */
--fds-brand-alt1-100: #E6EFF8;
@@ -220,35 +219,37 @@
--fds-semantic-text-visited-default: var(--fds-colors-purple-700);
--fds-semantic-background-default: var(--fds-colors-white);
--fds-semantic-background-subtle: var(--fds-colors-grey-100);
- --fds-typography-heading-3xlarge: 500 clamp(1.94rem, calc(1.88vw + 1.56rem), 3.16rem)/1.3 'Inter';
- --fds-typography-heading-2xlarge: 500 clamp(1.78rem, calc(1.44vw + 1.49rem), 2.72rem)/1.3 'Inter';
- --fds-typography-heading-xlarge: 500 clamp(1.59rem, calc(1.15vw + 1.36rem), 2.34rem)/1.3 'Inter';
- --fds-typography-heading-large: 500 clamp(1.47rem, calc(0.86vw + 1.30rem), 2.03rem)/1.3 'Inter';
- --fds-typography-heading-medium: 500 clamp(1.34rem, calc(0.63vw + 1.22rem), 1.75rem)/1.3 'Inter';
- --fds-typography-heading-small: 500 clamp(1.22rem, calc(0.43vw + 1.13rem), 1.50rem)/1.3 'Inter';
- --fds-typography-heading-xsmall: 500 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-heading-xxsmall: 500 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-ingress-medium: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.6 'Inter';
- --fds-typography-paragraph-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.5 'Inter';
- --fds-typography-paragraph-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.5 'Inter';
- --fds-typography-paragraph-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.5 'Inter';
- --fds-typography-paragraph-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.5 'Inter';
- --fds-typography-paragraph-short-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-paragraph-short-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-paragraph-short-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.3 'Inter';
- --fds-typography-paragraph-short-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.3 'Inter';
- --fds-typography-paragraph-long-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.7 'Inter';
- --fds-typography-paragraph-long-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.7 'Inter';
- --fds-typography-paragraph-long-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.7 'Inter';
- --fds-typography-paragraph-long-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.7 'Inter';
- --fds-typography-label-large: 500 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-label-medium: 500 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-label-small: 500 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.3 'Inter';
- --fds-typography-label-xsmall: 500 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.3 'Inter';
- --fds-typography-error_message-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-error_message-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-error_message-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.3 'Inter';
- --fds-typography-error_message-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.3 'Inter';
+ --fds-typography-heading-2xlarge: 500 3.75rem/1.3 'Inter';
+ --fds-typography-heading-xlarge: 500 3rem/1.3 'Inter';
+ --fds-typography-heading-large: 500 2.25rem/1.3 'Inter';
+ --fds-typography-heading-medium: 500 1.875rem/1.3 'Inter';
+ --fds-typography-heading-small: 500 1.5rem/1.3 'Inter';
+ --fds-typography-heading-xsmall: 500 1.3125rem/1.3 'Inter';
+ --fds-typography-heading-xxsmall: 500 1.125rem/1.3 'Inter';
+ --fds-typography-ingress-large: 400 1.875rem/1.6 'Inter';
+ --fds-typography-ingress-medium: 400 1.5rem/1.6 'Inter';
+ --fds-typography-ingress-small: 400 1.3125rem/1.6 'Inter';
+ --fds-typography-ingress-xsmall: 400 1.125rem/1.6 'Inter';
+ --fds-typography-paragraph-large: 400 1.3125rem/1.5 'Inter';
+ --fds-typography-paragraph-medium: 400 1.125rem/1.5 'Inter';
+ --fds-typography-paragraph-small: 400 1rem/1.5 'Inter';
+ --fds-typography-paragraph-xsmall: 400 0.875rem/1.5 'Inter';
+ --fds-typography-paragraph-short-large: 400 1.3125rem/1.3 'Inter';
+ --fds-typography-paragraph-short-medium: 400 1.125rem/1.3 'Inter';
+ --fds-typography-paragraph-short-small: 400 1rem/1.3 'Inter';
+ --fds-typography-paragraph-short-xsmall: 400 0.875rem/1.3 'Inter';
+ --fds-typography-paragraph-long-large: 400 1.125rem/1.7 'Inter';
+ --fds-typography-paragraph-long-medium: 400 1rem/1.7 'Inter';
+ --fds-typography-paragraph-long-small: 400 0.875rem/1.7 'Inter';
+ --fds-typography-paragraph-long-xsmall: 400 0.8125rem/1.7 'Inter';
+ --fds-typography-label-large: 500 1.3125rem/1.3 'Inter';
+ --fds-typography-label-medium: 500 1.125rem/1.3 'Inter';
+ --fds-typography-label-small: 500 1rem/1.3 'Inter';
+ --fds-typography-label-xsmall: 500 0.875rem/1.3 'Inter';
+ --fds-typography-error_message-large: 400 1.3125rem/1.3 'Inter';
+ --fds-typography-error_message-medium: 400 1.125rem/1.3 'Inter';
+ --fds-typography-error_message-small: 400 1rem/1.3 'Inter';
+ --fds-typography-error_message-xsmall: 400 0.875rem/1.3 'Inter';
--fds-typography-interactive-large: 400 1.5rem/1.3 'Inter';
--fds-typography-interactive-medium: 400 1.125rem/1.3 'Inter';
--fds-typography-interactive-small: 400 1rem/1.3 'Inter';
@@ -262,38 +263,47 @@
--fds-border_radius-xxxlarge: 24px;
--fds-border_radius-xxxxlarge: 32px;
--fds-border_radius-full: 9999px;
- --fds-spacing-0: calc(0);
- --fds-spacing-1: calc(var(--fds-base_spacing)/16*var(--fds-font-size-f0));
- --fds-spacing-2: calc(var(--fds-base_spacing)*2/16*var(--fds-font-size-f0));
- --fds-spacing-3: calc(var(--fds-base_spacing)*3/16*var(--fds-font-size-f0));
- --fds-spacing-4: calc(var(--fds-base_spacing)*4/16*var(--fds-font-size-f0));
- --fds-spacing-5: calc(var(--fds-base_spacing)*5/16*var(--fds-font-size-f0));
- --fds-spacing-6: calc(var(--fds-base_spacing)*6/16*var(--fds-font-size-f0));
- --fds-spacing-7: calc(var(--fds-base_spacing)*7/16*var(--fds-font-size-f0));
- --fds-spacing-8: calc((var(--fds-base_spacing)*8/16)*var(--fds-font-size-f0));
- --fds-spacing-10: calc((var(--fds-base_spacing)*10/16)*var(--fds-font-size-f0));
- --fds-spacing-12: calc((var(--fds-base_spacing)*12/16)*var(--fds-font-size-f0));
- --fds-spacing-14: calc((var(--fds-base_spacing)*14/16)*var(--fds-font-size-f0));
- --fds-spacing-18: calc((var(--fds-base_spacing)*18/16)*var(--fds-font-size-f0));
- --fds-spacing-22: calc((var(--fds-base_spacing)*22/16)*var(--fds-font-size-f0));
- --fds-spacing-26: calc((var(--fds-base_spacing)*26/16)*var(--fds-font-size-f0));
- --fds-spacing-30: calc((var(--fds-base_spacing)*30/16)*var(--fds-font-size-f0));
+ --fds-spacing-0: 0rem;
+ --fds-spacing-1: 0.25rem;
+ --fds-spacing-2: 0.5rem;
+ --fds-spacing-3: 0.75rem;
+ --fds-spacing-4: 1rem;
+ --fds-spacing-5: 1.25rem;
+ --fds-spacing-6: 1.5rem;
+ --fds-spacing-7: 1.75rem;
+ --fds-spacing-8: 2rem;
+ --fds-spacing-9: 2.25rem;
+ --fds-spacing-10: 2.5rem;
+ --fds-spacing-11: 2.75rem;
+ --fds-spacing-12: 3rem;
+ --fds-spacing-13: 3.25rem;
+ --fds-spacing-14: 3.5rem;
+ --fds-spacing-15: 3.75rem;
+ --fds-spacing-18: 4.5rem;
+ --fds-spacing-22: 5.5rem;
+ --fds-spacing-26: 6.5rem;
+ --fds-spacing-30: 7.5rem;
--fds-base_spacing: 4;
- --fds-sizing-1: calc(var(--fds-base_sizing)/16*var(--fds-font-size-f0));
- --fds-sizing-2: calc(var(--fds-base_sizing)*2/16*var(--fds-font-size-f0));
- --fds-sizing-3: calc(var(--fds-base_sizing)*3/16*var(--fds-font-size-f0));
- --fds-sizing-4: calc(var(--fds-base_sizing)*4/16*var(--fds-font-size-f0));
- --fds-sizing-5: calc(var(--fds-base_sizing)*5/16*var(--fds-font-size-f0));
- --fds-sizing-6: calc(var(--fds-base_sizing)*6/16*var(--fds-font-size-f0));
- --fds-sizing-7: calc(var(--fds-base_sizing)*7/16*var(--fds-font-size-f0));
- --fds-sizing-8: calc(var(--fds-base_sizing)*8/16*var(--fds-font-size-f0));
- --fds-sizing-10: calc(var(--fds-base_sizing)*10/16*var(--fds-font-size-f0));
- --fds-sizing-12: calc((var(--fds-base_sizing)*12/16)*var(--fds-font-size-f0));
- --fds-sizing-14: calc((var(--fds-base_sizing)*14/16)*var(--fds-font-size-f0));
- --fds-sizing-18: calc((var(--fds-base_sizing)*18/16)*var(--fds-font-size-f0));
- --fds-sizing-22: calc((var(--fds-base_sizing)*22/16)*var(--fds-font-size-f0));
- --fds-sizing-26: calc((var(--fds-base_sizing)*26/16)*var(--fds-font-size-f0));
- --fds-sizing-30: calc((var(--fds-base_sizing)*30/16)*var(--fds-font-size-f0));
+ --fds-sizing-0: 0rem;
+ --fds-sizing-1: 0.25rem;
+ --fds-sizing-2: 0.5rem;
+ --fds-sizing-3: 0.75rem;
+ --fds-sizing-4: 1rem;
+ --fds-sizing-5: 1.25rem;
+ --fds-sizing-6: 1.5rem;
+ --fds-sizing-7: 1.75rem;
+ --fds-sizing-8: 2rem;
+ --fds-sizing-9: 2.25rem;
+ --fds-sizing-10: 2.5rem;
+ --fds-sizing-11: 2.75rem;
+ --fds-sizing-12: 3rem;
+ --fds-sizing-13: 3.25rem;
+ --fds-sizing-14: 3.5rem;
+ --fds-sizing-15: 3.75rem;
+ --fds-sizing-18: 4.5rem;
+ --fds-sizing-22: 5.5rem;
+ --fds-sizing-26: 6.5rem;
+ --fds-sizing-30: 7.5rem;
--fds-base_sizing: 4;
--fds-border_width-default: 1px;
--fds-border_width-active: 2px;
diff --git a/packages/theme/brand/brreg/tokens.css b/packages/theme/brand/brreg/tokens.css
index 9bd270a6f5..4476f25063 100644
--- a/packages/theme/brand/brreg/tokens.css
+++ b/packages/theme/brand/brreg/tokens.css
@@ -39,7 +39,6 @@
--fds-colors-grey-400: #bcbfc5;
--fds-colors-red-800: #5a121d;
--fds-colors-purple-700: #7a1265;
- --fds-font-size-f0: clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem);
/** Tokens */
--fds-brand-alt1-50: #FFFFFF;
@@ -226,35 +225,37 @@
--fds-semantic-text-visited-default: var(--fds-colors-purple-700);
--fds-semantic-background-default: var(--fds-colors-white);
--fds-semantic-background-subtle: var(--fds-colors-grey-100);
- --fds-typography-heading-3xlarge: 500 clamp(1.94rem, calc(1.88vw + 1.56rem), 3.16rem)/1.3 'Inter';
- --fds-typography-heading-2xlarge: 500 clamp(1.78rem, calc(1.44vw + 1.49rem), 2.72rem)/1.3 'Inter';
- --fds-typography-heading-xlarge: 500 clamp(1.59rem, calc(1.15vw + 1.36rem), 2.34rem)/1.3 'Inter';
- --fds-typography-heading-large: 500 clamp(1.47rem, calc(0.86vw + 1.30rem), 2.03rem)/1.3 'Inter';
- --fds-typography-heading-medium: 500 clamp(1.34rem, calc(0.63vw + 1.22rem), 1.75rem)/1.3 'Inter';
- --fds-typography-heading-small: 500 clamp(1.22rem, calc(0.43vw + 1.13rem), 1.50rem)/1.3 'Inter';
- --fds-typography-heading-xsmall: 500 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-heading-xxsmall: 500 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-ingress-medium: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.6 'Inter';
- --fds-typography-paragraph-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.5 'Inter';
- --fds-typography-paragraph-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.5 'Inter';
- --fds-typography-paragraph-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.5 'Inter';
- --fds-typography-paragraph-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.5 'Inter';
- --fds-typography-paragraph-short-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-paragraph-short-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-paragraph-short-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.3 'Inter';
- --fds-typography-paragraph-short-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.3 'Inter';
- --fds-typography-paragraph-long-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.7 'Inter';
- --fds-typography-paragraph-long-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.7 'Inter';
- --fds-typography-paragraph-long-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.7 'Inter';
- --fds-typography-paragraph-long-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.7 'Inter';
- --fds-typography-label-large: 500 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-label-medium: 500 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-label-small: 500 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.3 'Inter';
- --fds-typography-label-xsmall: 500 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.3 'Inter';
- --fds-typography-error_message-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-error_message-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-error_message-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.3 'Inter';
- --fds-typography-error_message-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.3 'Inter';
+ --fds-typography-heading-2xlarge: 500 3.75rem/1.3 'Inter';
+ --fds-typography-heading-xlarge: 500 3rem/1.3 'Inter';
+ --fds-typography-heading-large: 500 2.25rem/1.3 'Inter';
+ --fds-typography-heading-medium: 500 1.875rem/1.3 'Inter';
+ --fds-typography-heading-small: 500 1.5rem/1.3 'Inter';
+ --fds-typography-heading-xsmall: 500 1.3125rem/1.3 'Inter';
+ --fds-typography-heading-xxsmall: 500 1.125rem/1.3 'Inter';
+ --fds-typography-ingress-large: 400 1.875rem/1.6 'Inter';
+ --fds-typography-ingress-medium: 400 1.5rem/1.6 'Inter';
+ --fds-typography-ingress-small: 400 1.3125rem/1.6 'Inter';
+ --fds-typography-ingress-xsmall: 400 1.125rem/1.6 'Inter';
+ --fds-typography-paragraph-large: 400 1.3125rem/1.5 'Inter';
+ --fds-typography-paragraph-medium: 400 1.125rem/1.5 'Inter';
+ --fds-typography-paragraph-small: 400 1rem/1.5 'Inter';
+ --fds-typography-paragraph-xsmall: 400 0.875rem/1.5 'Inter';
+ --fds-typography-paragraph-short-large: 400 1.3125rem/1.3 'Inter';
+ --fds-typography-paragraph-short-medium: 400 1.125rem/1.3 'Inter';
+ --fds-typography-paragraph-short-small: 400 1rem/1.3 'Inter';
+ --fds-typography-paragraph-short-xsmall: 400 0.875rem/1.3 'Inter';
+ --fds-typography-paragraph-long-large: 400 1.125rem/1.7 'Inter';
+ --fds-typography-paragraph-long-medium: 400 1rem/1.7 'Inter';
+ --fds-typography-paragraph-long-small: 400 0.875rem/1.7 'Inter';
+ --fds-typography-paragraph-long-xsmall: 400 0.8125rem/1.7 'Inter';
+ --fds-typography-label-large: 500 1.3125rem/1.3 'Inter';
+ --fds-typography-label-medium: 500 1.125rem/1.3 'Inter';
+ --fds-typography-label-small: 500 1rem/1.3 'Inter';
+ --fds-typography-label-xsmall: 500 0.875rem/1.3 'Inter';
+ --fds-typography-error_message-large: 400 1.3125rem/1.3 'Inter';
+ --fds-typography-error_message-medium: 400 1.125rem/1.3 'Inter';
+ --fds-typography-error_message-small: 400 1rem/1.3 'Inter';
+ --fds-typography-error_message-xsmall: 400 0.875rem/1.3 'Inter';
--fds-typography-interactive-large: 400 1.5rem/1.3 'Inter';
--fds-typography-interactive-medium: 400 1.125rem/1.3 'Inter';
--fds-typography-interactive-small: 400 1rem/1.3 'Inter';
@@ -268,38 +269,47 @@
--fds-border_radius-xxxlarge: 24px;
--fds-border_radius-xxxxlarge: 32px;
--fds-border_radius-full: 9999px;
- --fds-spacing-0: calc(0);
- --fds-spacing-1: calc(var(--fds-base_spacing)/16*var(--fds-font-size-f0));
- --fds-spacing-2: calc(var(--fds-base_spacing)*2/16*var(--fds-font-size-f0));
- --fds-spacing-3: calc(var(--fds-base_spacing)*3/16*var(--fds-font-size-f0));
- --fds-spacing-4: calc(var(--fds-base_spacing)*4/16*var(--fds-font-size-f0));
- --fds-spacing-5: calc(var(--fds-base_spacing)*5/16*var(--fds-font-size-f0));
- --fds-spacing-6: calc(var(--fds-base_spacing)*6/16*var(--fds-font-size-f0));
- --fds-spacing-7: calc(var(--fds-base_spacing)*7/16*var(--fds-font-size-f0));
- --fds-spacing-8: calc((var(--fds-base_spacing)*8/16)*var(--fds-font-size-f0));
- --fds-spacing-10: calc((var(--fds-base_spacing)*10/16)*var(--fds-font-size-f0));
- --fds-spacing-12: calc((var(--fds-base_spacing)*12/16)*var(--fds-font-size-f0));
- --fds-spacing-14: calc((var(--fds-base_spacing)*14/16)*var(--fds-font-size-f0));
- --fds-spacing-18: calc((var(--fds-base_spacing)*18/16)*var(--fds-font-size-f0));
- --fds-spacing-22: calc((var(--fds-base_spacing)*22/16)*var(--fds-font-size-f0));
- --fds-spacing-26: calc((var(--fds-base_spacing)*26/16)*var(--fds-font-size-f0));
- --fds-spacing-30: calc((var(--fds-base_spacing)*30/16)*var(--fds-font-size-f0));
+ --fds-spacing-0: 0rem;
+ --fds-spacing-1: 0.25rem;
+ --fds-spacing-2: 0.5rem;
+ --fds-spacing-3: 0.75rem;
+ --fds-spacing-4: 1rem;
+ --fds-spacing-5: 1.25rem;
+ --fds-spacing-6: 1.5rem;
+ --fds-spacing-7: 1.75rem;
+ --fds-spacing-8: 2rem;
+ --fds-spacing-9: 2.25rem;
+ --fds-spacing-10: 2.5rem;
+ --fds-spacing-11: 2.75rem;
+ --fds-spacing-12: 3rem;
+ --fds-spacing-13: 3.25rem;
+ --fds-spacing-14: 3.5rem;
+ --fds-spacing-15: 3.75rem;
+ --fds-spacing-18: 4.5rem;
+ --fds-spacing-22: 5.5rem;
+ --fds-spacing-26: 6.5rem;
+ --fds-spacing-30: 7.5rem;
--fds-base_spacing: 4;
- --fds-sizing-1: calc(var(--fds-base_sizing)/16*var(--fds-font-size-f0));
- --fds-sizing-2: calc(var(--fds-base_sizing)*2/16*var(--fds-font-size-f0));
- --fds-sizing-3: calc(var(--fds-base_sizing)*3/16*var(--fds-font-size-f0));
- --fds-sizing-4: calc(var(--fds-base_sizing)*4/16*var(--fds-font-size-f0));
- --fds-sizing-5: calc(var(--fds-base_sizing)*5/16*var(--fds-font-size-f0));
- --fds-sizing-6: calc(var(--fds-base_sizing)*6/16*var(--fds-font-size-f0));
- --fds-sizing-7: calc(var(--fds-base_sizing)*7/16*var(--fds-font-size-f0));
- --fds-sizing-8: calc(var(--fds-base_sizing)*8/16*var(--fds-font-size-f0));
- --fds-sizing-10: calc(var(--fds-base_sizing)*10/16*var(--fds-font-size-f0));
- --fds-sizing-12: calc((var(--fds-base_sizing)*12/16)*var(--fds-font-size-f0));
- --fds-sizing-14: calc((var(--fds-base_sizing)*14/16)*var(--fds-font-size-f0));
- --fds-sizing-18: calc((var(--fds-base_sizing)*18/16)*var(--fds-font-size-f0));
- --fds-sizing-22: calc((var(--fds-base_sizing)*22/16)*var(--fds-font-size-f0));
- --fds-sizing-26: calc((var(--fds-base_sizing)*26/16)*var(--fds-font-size-f0));
- --fds-sizing-30: calc((var(--fds-base_sizing)*30/16)*var(--fds-font-size-f0));
+ --fds-sizing-0: 0rem;
+ --fds-sizing-1: 0.25rem;
+ --fds-sizing-2: 0.5rem;
+ --fds-sizing-3: 0.75rem;
+ --fds-sizing-4: 1rem;
+ --fds-sizing-5: 1.25rem;
+ --fds-sizing-6: 1.5rem;
+ --fds-sizing-7: 1.75rem;
+ --fds-sizing-8: 2rem;
+ --fds-sizing-9: 2.25rem;
+ --fds-sizing-10: 2.5rem;
+ --fds-sizing-11: 2.75rem;
+ --fds-sizing-12: 3rem;
+ --fds-sizing-13: 3.25rem;
+ --fds-sizing-14: 3.5rem;
+ --fds-sizing-15: 3.75rem;
+ --fds-sizing-18: 4.5rem;
+ --fds-sizing-22: 5.5rem;
+ --fds-sizing-26: 6.5rem;
+ --fds-sizing-30: 7.5rem;
--fds-base_sizing: 4;
--fds-border_width-default: 1px;
--fds-border_width-active: 2px;
diff --git a/packages/theme/brand/digdir/tokens.css b/packages/theme/brand/digdir/tokens.css
index f77f2d84b2..7cdd2a6e5d 100644
--- a/packages/theme/brand/digdir/tokens.css
+++ b/packages/theme/brand/digdir/tokens.css
@@ -39,7 +39,6 @@
--fds-colors-grey-400: #bcbfc5;
--fds-colors-red-800: #5a121d;
--fds-colors-purple-700: #7a1265;
- --fds-font-size-f0: clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem);
/** Tokens */
--fds-brand-alt1-100: #feefef;
@@ -220,35 +219,37 @@
--fds-semantic-text-visited-default: var(--fds-colors-purple-700);
--fds-semantic-background-default: var(--fds-colors-white);
--fds-semantic-background-subtle: var(--fds-colors-grey-100);
- --fds-typography-heading-3xlarge: 500 clamp(1.94rem, calc(1.88vw + 1.56rem), 3.16rem)/1.3 'Inter';
- --fds-typography-heading-2xlarge: 500 clamp(1.78rem, calc(1.44vw + 1.49rem), 2.72rem)/1.3 'Inter';
- --fds-typography-heading-xlarge: 500 clamp(1.59rem, calc(1.15vw + 1.36rem), 2.34rem)/1.3 'Inter';
- --fds-typography-heading-large: 500 clamp(1.47rem, calc(0.86vw + 1.30rem), 2.03rem)/1.3 'Inter';
- --fds-typography-heading-medium: 500 clamp(1.34rem, calc(0.63vw + 1.22rem), 1.75rem)/1.3 'Inter';
- --fds-typography-heading-small: 500 clamp(1.22rem, calc(0.43vw + 1.13rem), 1.50rem)/1.3 'Inter';
- --fds-typography-heading-xsmall: 500 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-heading-xxsmall: 500 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-ingress-medium: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.6 'Inter';
- --fds-typography-paragraph-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.5 'Inter';
- --fds-typography-paragraph-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.5 'Inter';
- --fds-typography-paragraph-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.5 'Inter';
- --fds-typography-paragraph-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.5 'Inter';
- --fds-typography-paragraph-short-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-paragraph-short-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-paragraph-short-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.3 'Inter';
- --fds-typography-paragraph-short-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.3 'Inter';
- --fds-typography-paragraph-long-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.7 'Inter';
- --fds-typography-paragraph-long-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.7 'Inter';
- --fds-typography-paragraph-long-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.7 'Inter';
- --fds-typography-paragraph-long-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.7 'Inter';
- --fds-typography-label-large: 500 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-label-medium: 500 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-label-small: 500 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.3 'Inter';
- --fds-typography-label-xsmall: 500 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.3 'Inter';
- --fds-typography-error_message-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-error_message-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-error_message-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.3 'Inter';
- --fds-typography-error_message-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.3 'Inter';
+ --fds-typography-heading-2xlarge: 500 3.75rem/1.3 'Inter';
+ --fds-typography-heading-xlarge: 500 3rem/1.3 'Inter';
+ --fds-typography-heading-large: 500 2.25rem/1.3 'Inter';
+ --fds-typography-heading-medium: 500 1.875rem/1.3 'Inter';
+ --fds-typography-heading-small: 500 1.5rem/1.3 'Inter';
+ --fds-typography-heading-xsmall: 500 1.3125rem/1.3 'Inter';
+ --fds-typography-heading-xxsmall: 500 1.125rem/1.3 'Inter';
+ --fds-typography-ingress-large: 400 1.875rem/1.6 'Inter';
+ --fds-typography-ingress-medium: 400 1.5rem/1.6 'Inter';
+ --fds-typography-ingress-small: 400 1.3125rem/1.6 'Inter';
+ --fds-typography-ingress-xsmall: 400 1.125rem/1.6 'Inter';
+ --fds-typography-paragraph-large: 400 1.3125rem/1.5 'Inter';
+ --fds-typography-paragraph-medium: 400 1.125rem/1.5 'Inter';
+ --fds-typography-paragraph-small: 400 1rem/1.5 'Inter';
+ --fds-typography-paragraph-xsmall: 400 0.875rem/1.5 'Inter';
+ --fds-typography-paragraph-short-large: 400 1.3125rem/1.3 'Inter';
+ --fds-typography-paragraph-short-medium: 400 1.125rem/1.3 'Inter';
+ --fds-typography-paragraph-short-small: 400 1rem/1.3 'Inter';
+ --fds-typography-paragraph-short-xsmall: 400 0.875rem/1.3 'Inter';
+ --fds-typography-paragraph-long-large: 400 1.125rem/1.7 'Inter';
+ --fds-typography-paragraph-long-medium: 400 1rem/1.7 'Inter';
+ --fds-typography-paragraph-long-small: 400 0.875rem/1.7 'Inter';
+ --fds-typography-paragraph-long-xsmall: 400 0.8125rem/1.7 'Inter';
+ --fds-typography-label-large: 500 1.3125rem/1.3 'Inter';
+ --fds-typography-label-medium: 500 1.125rem/1.3 'Inter';
+ --fds-typography-label-small: 500 1rem/1.3 'Inter';
+ --fds-typography-label-xsmall: 500 0.875rem/1.3 'Inter';
+ --fds-typography-error_message-large: 400 1.3125rem/1.3 'Inter';
+ --fds-typography-error_message-medium: 400 1.125rem/1.3 'Inter';
+ --fds-typography-error_message-small: 400 1rem/1.3 'Inter';
+ --fds-typography-error_message-xsmall: 400 0.875rem/1.3 'Inter';
--fds-typography-interactive-large: 400 1.5rem/1.3 'Inter';
--fds-typography-interactive-medium: 400 1.125rem/1.3 'Inter';
--fds-typography-interactive-small: 400 1rem/1.3 'Inter';
@@ -262,38 +263,47 @@
--fds-border_radius-xxxlarge: 24px;
--fds-border_radius-xxxxlarge: 32px;
--fds-border_radius-full: 9999px;
- --fds-spacing-0: calc(0);
- --fds-spacing-1: calc(var(--fds-base_spacing)/16*var(--fds-font-size-f0));
- --fds-spacing-2: calc(var(--fds-base_spacing)*2/16*var(--fds-font-size-f0));
- --fds-spacing-3: calc(var(--fds-base_spacing)*3/16*var(--fds-font-size-f0));
- --fds-spacing-4: calc(var(--fds-base_spacing)*4/16*var(--fds-font-size-f0));
- --fds-spacing-5: calc(var(--fds-base_spacing)*5/16*var(--fds-font-size-f0));
- --fds-spacing-6: calc(var(--fds-base_spacing)*6/16*var(--fds-font-size-f0));
- --fds-spacing-7: calc(var(--fds-base_spacing)*7/16*var(--fds-font-size-f0));
- --fds-spacing-8: calc((var(--fds-base_spacing)*8/16)*var(--fds-font-size-f0));
- --fds-spacing-10: calc((var(--fds-base_spacing)*10/16)*var(--fds-font-size-f0));
- --fds-spacing-12: calc((var(--fds-base_spacing)*12/16)*var(--fds-font-size-f0));
- --fds-spacing-14: calc((var(--fds-base_spacing)*14/16)*var(--fds-font-size-f0));
- --fds-spacing-18: calc((var(--fds-base_spacing)*18/16)*var(--fds-font-size-f0));
- --fds-spacing-22: calc((var(--fds-base_spacing)*22/16)*var(--fds-font-size-f0));
- --fds-spacing-26: calc((var(--fds-base_spacing)*26/16)*var(--fds-font-size-f0));
- --fds-spacing-30: calc((var(--fds-base_spacing)*30/16)*var(--fds-font-size-f0));
+ --fds-spacing-0: 0rem;
+ --fds-spacing-1: 0.25rem;
+ --fds-spacing-2: 0.5rem;
+ --fds-spacing-3: 0.75rem;
+ --fds-spacing-4: 1rem;
+ --fds-spacing-5: 1.25rem;
+ --fds-spacing-6: 1.5rem;
+ --fds-spacing-7: 1.75rem;
+ --fds-spacing-8: 2rem;
+ --fds-spacing-9: 2.25rem;
+ --fds-spacing-10: 2.5rem;
+ --fds-spacing-11: 2.75rem;
+ --fds-spacing-12: 3rem;
+ --fds-spacing-13: 3.25rem;
+ --fds-spacing-14: 3.5rem;
+ --fds-spacing-15: 3.75rem;
+ --fds-spacing-18: 4.5rem;
+ --fds-spacing-22: 5.5rem;
+ --fds-spacing-26: 6.5rem;
+ --fds-spacing-30: 7.5rem;
--fds-base_spacing: 4;
- --fds-sizing-1: calc(var(--fds-base_sizing)/16*var(--fds-font-size-f0));
- --fds-sizing-2: calc(var(--fds-base_sizing)*2/16*var(--fds-font-size-f0));
- --fds-sizing-3: calc(var(--fds-base_sizing)*3/16*var(--fds-font-size-f0));
- --fds-sizing-4: calc(var(--fds-base_sizing)*4/16*var(--fds-font-size-f0));
- --fds-sizing-5: calc(var(--fds-base_sizing)*5/16*var(--fds-font-size-f0));
- --fds-sizing-6: calc(var(--fds-base_sizing)*6/16*var(--fds-font-size-f0));
- --fds-sizing-7: calc(var(--fds-base_sizing)*7/16*var(--fds-font-size-f0));
- --fds-sizing-8: calc(var(--fds-base_sizing)*8/16*var(--fds-font-size-f0));
- --fds-sizing-10: calc(var(--fds-base_sizing)*10/16*var(--fds-font-size-f0));
- --fds-sizing-12: calc((var(--fds-base_sizing)*12/16)*var(--fds-font-size-f0));
- --fds-sizing-14: calc((var(--fds-base_sizing)*14/16)*var(--fds-font-size-f0));
- --fds-sizing-18: calc((var(--fds-base_sizing)*18/16)*var(--fds-font-size-f0));
- --fds-sizing-22: calc((var(--fds-base_sizing)*22/16)*var(--fds-font-size-f0));
- --fds-sizing-26: calc((var(--fds-base_sizing)*26/16)*var(--fds-font-size-f0));
- --fds-sizing-30: calc((var(--fds-base_sizing)*30/16)*var(--fds-font-size-f0));
+ --fds-sizing-0: 0rem;
+ --fds-sizing-1: 0.25rem;
+ --fds-sizing-2: 0.5rem;
+ --fds-sizing-3: 0.75rem;
+ --fds-sizing-4: 1rem;
+ --fds-sizing-5: 1.25rem;
+ --fds-sizing-6: 1.5rem;
+ --fds-sizing-7: 1.75rem;
+ --fds-sizing-8: 2rem;
+ --fds-sizing-9: 2.25rem;
+ --fds-sizing-10: 2.5rem;
+ --fds-sizing-11: 2.75rem;
+ --fds-sizing-12: 3rem;
+ --fds-sizing-13: 3.25rem;
+ --fds-sizing-14: 3.5rem;
+ --fds-sizing-15: 3.75rem;
+ --fds-sizing-18: 4.5rem;
+ --fds-sizing-22: 5.5rem;
+ --fds-sizing-26: 6.5rem;
+ --fds-sizing-30: 7.5rem;
--fds-base_sizing: 4;
--fds-border_width-default: 1px;
--fds-border_width-active: 2px;
diff --git a/packages/theme/brand/tilsynet/tokens.css b/packages/theme/brand/tilsynet/tokens.css
index 7070942048..c3defca4a4 100644
--- a/packages/theme/brand/tilsynet/tokens.css
+++ b/packages/theme/brand/tilsynet/tokens.css
@@ -39,7 +39,6 @@
--fds-colors-grey-400: #bcbfc5;
--fds-colors-red-800: #5a121d;
--fds-colors-purple-700: #7a1265;
- --fds-font-size-f0: clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem);
/** Tokens */
--fds-brand-alt1-100: #efeffb;
@@ -220,35 +219,37 @@
--fds-semantic-text-visited-default: var(--fds-colors-purple-700);
--fds-semantic-background-default: var(--fds-colors-white);
--fds-semantic-background-subtle: var(--fds-colors-grey-100);
- --fds-typography-heading-3xlarge: 500 clamp(1.94rem, calc(1.88vw + 1.56rem), 3.16rem)/1.3 'Inter';
- --fds-typography-heading-2xlarge: 500 clamp(1.78rem, calc(1.44vw + 1.49rem), 2.72rem)/1.3 'Inter';
- --fds-typography-heading-xlarge: 500 clamp(1.59rem, calc(1.15vw + 1.36rem), 2.34rem)/1.3 'Inter';
- --fds-typography-heading-large: 500 clamp(1.47rem, calc(0.86vw + 1.30rem), 2.03rem)/1.3 'Inter';
- --fds-typography-heading-medium: 500 clamp(1.34rem, calc(0.63vw + 1.22rem), 1.75rem)/1.3 'Inter';
- --fds-typography-heading-small: 500 clamp(1.22rem, calc(0.43vw + 1.13rem), 1.50rem)/1.3 'Inter';
- --fds-typography-heading-xsmall: 500 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-heading-xxsmall: 500 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-ingress-medium: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.6 'Inter';
- --fds-typography-paragraph-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.5 'Inter';
- --fds-typography-paragraph-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.5 'Inter';
- --fds-typography-paragraph-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.5 'Inter';
- --fds-typography-paragraph-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.5 'Inter';
- --fds-typography-paragraph-short-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-paragraph-short-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-paragraph-short-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.3 'Inter';
- --fds-typography-paragraph-short-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.3 'Inter';
- --fds-typography-paragraph-long-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.7 'Inter';
- --fds-typography-paragraph-long-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.7 'Inter';
- --fds-typography-paragraph-long-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.7 'Inter';
- --fds-typography-paragraph-long-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.7 'Inter';
- --fds-typography-label-large: 500 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-label-medium: 500 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-label-small: 500 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.3 'Inter';
- --fds-typography-label-xsmall: 500 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.3 'Inter';
- --fds-typography-error_message-large: 400 clamp(1.09rem, calc(0.34vw + 1.03rem), 1.31rem)/1.3 'Inter';
- --fds-typography-error_message-medium: 400 clamp(1.00rem, calc(0.19vw + 0.96rem), 1.13rem)/1.3 'Inter';
- --fds-typography-error_message-small: 400 clamp(0.91rem, calc(0.10vw + 0.89rem), 0.97rem)/1.3 'Inter';
- --fds-typography-error_message-xsmall: 400 clamp(0.81rem, calc(0.05vw + 0.80rem), 0.84rem)/1.3 'Inter';
+ --fds-typography-heading-2xlarge: 500 3.75rem/1.3 'Inter';
+ --fds-typography-heading-xlarge: 500 3rem/1.3 'Inter';
+ --fds-typography-heading-large: 500 2.25rem/1.3 'Inter';
+ --fds-typography-heading-medium: 500 1.875rem/1.3 'Inter';
+ --fds-typography-heading-small: 500 1.5rem/1.3 'Inter';
+ --fds-typography-heading-xsmall: 500 1.3125rem/1.3 'Inter';
+ --fds-typography-heading-xxsmall: 500 1.125rem/1.3 'Inter';
+ --fds-typography-ingress-large: 400 1.875rem/1.6 'Inter';
+ --fds-typography-ingress-medium: 400 1.5rem/1.6 'Inter';
+ --fds-typography-ingress-small: 400 1.3125rem/1.6 'Inter';
+ --fds-typography-ingress-xsmall: 400 1.125rem/1.6 'Inter';
+ --fds-typography-paragraph-large: 400 1.3125rem/1.5 'Inter';
+ --fds-typography-paragraph-medium: 400 1.125rem/1.5 'Inter';
+ --fds-typography-paragraph-small: 400 1rem/1.5 'Inter';
+ --fds-typography-paragraph-xsmall: 400 0.875rem/1.5 'Inter';
+ --fds-typography-paragraph-short-large: 400 1.3125rem/1.3 'Inter';
+ --fds-typography-paragraph-short-medium: 400 1.125rem/1.3 'Inter';
+ --fds-typography-paragraph-short-small: 400 1rem/1.3 'Inter';
+ --fds-typography-paragraph-short-xsmall: 400 0.875rem/1.3 'Inter';
+ --fds-typography-paragraph-long-large: 400 1.125rem/1.7 'Inter';
+ --fds-typography-paragraph-long-medium: 400 1rem/1.7 'Inter';
+ --fds-typography-paragraph-long-small: 400 0.875rem/1.7 'Inter';
+ --fds-typography-paragraph-long-xsmall: 400 0.8125rem/1.7 'Inter';
+ --fds-typography-label-large: 500 1.3125rem/1.3 'Inter';
+ --fds-typography-label-medium: 500 1.125rem/1.3 'Inter';
+ --fds-typography-label-small: 500 1rem/1.3 'Inter';
+ --fds-typography-label-xsmall: 500 0.875rem/1.3 'Inter';
+ --fds-typography-error_message-large: 400 1.3125rem/1.3 'Inter';
+ --fds-typography-error_message-medium: 400 1.125rem/1.3 'Inter';
+ --fds-typography-error_message-small: 400 1rem/1.3 'Inter';
+ --fds-typography-error_message-xsmall: 400 0.875rem/1.3 'Inter';
--fds-typography-interactive-large: 400 1.5rem/1.3 'Inter';
--fds-typography-interactive-medium: 400 1.125rem/1.3 'Inter';
--fds-typography-interactive-small: 400 1rem/1.3 'Inter';
@@ -262,38 +263,47 @@
--fds-border_radius-xxxlarge: 24px;
--fds-border_radius-xxxxlarge: 32px;
--fds-border_radius-full: 9999px;
- --fds-spacing-0: calc(0);
- --fds-spacing-1: calc(var(--fds-base_spacing)/16*var(--fds-font-size-f0));
- --fds-spacing-2: calc(var(--fds-base_spacing)*2/16*var(--fds-font-size-f0));
- --fds-spacing-3: calc(var(--fds-base_spacing)*3/16*var(--fds-font-size-f0));
- --fds-spacing-4: calc(var(--fds-base_spacing)*4/16*var(--fds-font-size-f0));
- --fds-spacing-5: calc(var(--fds-base_spacing)*5/16*var(--fds-font-size-f0));
- --fds-spacing-6: calc(var(--fds-base_spacing)*6/16*var(--fds-font-size-f0));
- --fds-spacing-7: calc(var(--fds-base_spacing)*7/16*var(--fds-font-size-f0));
- --fds-spacing-8: calc((var(--fds-base_spacing)*8/16)*var(--fds-font-size-f0));
- --fds-spacing-10: calc((var(--fds-base_spacing)*10/16)*var(--fds-font-size-f0));
- --fds-spacing-12: calc((var(--fds-base_spacing)*12/16)*var(--fds-font-size-f0));
- --fds-spacing-14: calc((var(--fds-base_spacing)*14/16)*var(--fds-font-size-f0));
- --fds-spacing-18: calc((var(--fds-base_spacing)*18/16)*var(--fds-font-size-f0));
- --fds-spacing-22: calc((var(--fds-base_spacing)*22/16)*var(--fds-font-size-f0));
- --fds-spacing-26: calc((var(--fds-base_spacing)*26/16)*var(--fds-font-size-f0));
- --fds-spacing-30: calc((var(--fds-base_spacing)*30/16)*var(--fds-font-size-f0));
+ --fds-spacing-0: 0rem;
+ --fds-spacing-1: 0.25rem;
+ --fds-spacing-2: 0.5rem;
+ --fds-spacing-3: 0.75rem;
+ --fds-spacing-4: 1rem;
+ --fds-spacing-5: 1.25rem;
+ --fds-spacing-6: 1.5rem;
+ --fds-spacing-7: 1.75rem;
+ --fds-spacing-8: 2rem;
+ --fds-spacing-9: 2.25rem;
+ --fds-spacing-10: 2.5rem;
+ --fds-spacing-11: 2.75rem;
+ --fds-spacing-12: 3rem;
+ --fds-spacing-13: 3.25rem;
+ --fds-spacing-14: 3.5rem;
+ --fds-spacing-15: 3.75rem;
+ --fds-spacing-18: 4.5rem;
+ --fds-spacing-22: 5.5rem;
+ --fds-spacing-26: 6.5rem;
+ --fds-spacing-30: 7.5rem;
--fds-base_spacing: 4;
- --fds-sizing-1: calc(var(--fds-base_sizing)/16*var(--fds-font-size-f0));
- --fds-sizing-2: calc(var(--fds-base_sizing)*2/16*var(--fds-font-size-f0));
- --fds-sizing-3: calc(var(--fds-base_sizing)*3/16*var(--fds-font-size-f0));
- --fds-sizing-4: calc(var(--fds-base_sizing)*4/16*var(--fds-font-size-f0));
- --fds-sizing-5: calc(var(--fds-base_sizing)*5/16*var(--fds-font-size-f0));
- --fds-sizing-6: calc(var(--fds-base_sizing)*6/16*var(--fds-font-size-f0));
- --fds-sizing-7: calc(var(--fds-base_sizing)*7/16*var(--fds-font-size-f0));
- --fds-sizing-8: calc(var(--fds-base_sizing)*8/16*var(--fds-font-size-f0));
- --fds-sizing-10: calc(var(--fds-base_sizing)*10/16*var(--fds-font-size-f0));
- --fds-sizing-12: calc((var(--fds-base_sizing)*12/16)*var(--fds-font-size-f0));
- --fds-sizing-14: calc((var(--fds-base_sizing)*14/16)*var(--fds-font-size-f0));
- --fds-sizing-18: calc((var(--fds-base_sizing)*18/16)*var(--fds-font-size-f0));
- --fds-sizing-22: calc((var(--fds-base_sizing)*22/16)*var(--fds-font-size-f0));
- --fds-sizing-26: calc((var(--fds-base_sizing)*26/16)*var(--fds-font-size-f0));
- --fds-sizing-30: calc((var(--fds-base_sizing)*30/16)*var(--fds-font-size-f0));
+ --fds-sizing-0: 0rem;
+ --fds-sizing-1: 0.25rem;
+ --fds-sizing-2: 0.5rem;
+ --fds-sizing-3: 0.75rem;
+ --fds-sizing-4: 1rem;
+ --fds-sizing-5: 1.25rem;
+ --fds-sizing-6: 1.5rem;
+ --fds-sizing-7: 1.75rem;
+ --fds-sizing-8: 2rem;
+ --fds-sizing-9: 2.25rem;
+ --fds-sizing-10: 2.5rem;
+ --fds-sizing-11: 2.75rem;
+ --fds-sizing-12: 3rem;
+ --fds-sizing-13: 3.25rem;
+ --fds-sizing-14: 3.5rem;
+ --fds-sizing-15: 3.75rem;
+ --fds-sizing-18: 4.5rem;
+ --fds-sizing-22: 5.5rem;
+ --fds-sizing-26: 6.5rem;
+ --fds-sizing-30: 7.5rem;
--fds-base_sizing: 4;
--fds-border_width-default: 1px;
--fds-border_width-active: 2px;
diff --git a/packages/theme/package.json b/packages/theme/package.json
index 91523598ef..2981abf4bc 100644
--- a/packages/theme/package.json
+++ b/packages/theme/package.json
@@ -1,6 +1,6 @@
{
"name": "@digdir/designsystemet-theme",
- "version": "0.15.0",
+ "version": "0.15.1-alpha.1",
"description": "Tokens for Designsystemet",
"author": "Designsystemet team",
"repository": "https://github.com/digdir/designsystemet",
diff --git a/packages/theme/scripts/build.ts b/packages/theme/scripts/build.ts
index 9adee23009..d07531614a 100644
--- a/packages/theme/scripts/build.ts
+++ b/packages/theme/scripts/build.ts
@@ -17,6 +17,7 @@ import {
fluidFontSize,
calc,
fontScaleHackFormat,
+ sizeRem,
} from './transformers';
import {
scopedReferenceVariables,
@@ -46,6 +47,7 @@ const packageTokensPath = 'brand';
setupFormatters('./../../prettier.config.js');
StyleDictionary.registerTransform(sizePx);
+StyleDictionary.registerTransform(sizeRem);
StyleDictionary.registerTransform(nameKebab);
StyleDictionary.registerTransform(nameKebabUnderscore);
StyleDictionary.registerTransform(typographyShorthand);
@@ -61,14 +63,14 @@ StyleDictionary.registerFileHeader(fileheader);
StyleDictionary.registerTransformGroup({
name: 'fds/css',
transforms: [
- nameKebab.name,
'ts/resolveMath',
- fluidFontSize.name,
- calc.name,
+ nameKebab.name,
+ // fluidFontSize.name,
+ // calc.name,
typographyShorthand.name,
'ts/size/lineheight',
+ sizeRem.name,
'ts/shadow/css/shorthand',
- sizePx.name,
'ts/color/modifiers',
'ts/color/css/hexrgba',
],
@@ -121,7 +123,7 @@ const getTokensPackageConfig = (brand: Brands, targetFolder = ''): Config => {
fileHeader: fileheader.name,
referencesFilter: (token: TransformedToken) =>
!(token.path[0] === 'viewport') &&
- ['spacing', 'sizing', 'color'].includes(token.type as string),
+ ['color'].includes(token.type as string),
// outputReferences: true,
},
},
diff --git a/packages/theme/scripts/transformers.ts b/packages/theme/scripts/transformers.ts
index e7392a39d9..8bda35e4bb 100644
--- a/packages/theme/scripts/transformers.ts
+++ b/packages/theme/scripts/transformers.ts
@@ -19,6 +19,25 @@ export const sizePx: Named
= {
transformer: (token) => transformDimension(token.value as number),
};
+export const sizeRem: Named = {
+ name: 'fds/size/toRem',
+ type: 'value',
+ transitive: true,
+ matcher: (token) =>
+ ['sizing', 'spacing'].includes(token.type as string) &&
+ !token.name.includes('base'),
+ transformer: (token, options) => {
+ const baseFont = options.basePxFontSize || 16;
+ const value = token.value as number;
+
+ if (value === 0) {
+ return '0';
+ }
+
+ return `${value / baseFont}rem`;
+ },
+};
+
export const nameKebab: Named = {
name: 'name/cti/hierarchical-kebab',
type: 'name',
diff --git a/yarn.lock b/yarn.lock
index 8a7ed39d1c..9c104f499a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2641,7 +2641,14 @@ __metadata:
languageName: unknown
linkType: soft
-"@digdir/designsystemet-theme@npm:0.15.0, @digdir/designsystemet-theme@workspace:packages/theme":
+"@digdir/designsystemet-theme@npm:0.15.0":
+ version: 0.15.0
+ resolution: "@digdir/designsystemet-theme@npm:0.15.0"
+ checksum: cdf3c71cb37f8dee69ab53d8bbad84b2f9c0d6836b800e03e5dd1f48e08fb4d45b6bc7d2a5f316b606d1cb3c81bd26eba457ae21b93fccd7b4b223113eaece7d
+ languageName: node
+ linkType: hard
+
+"@digdir/designsystemet-theme@workspace:packages/theme":
version: 0.0.0-use.local
resolution: "@digdir/designsystemet-theme@workspace:packages/theme"
dependencies: