From f54e42698741362282521ea3246698c66f294cdc Mon Sep 17 00:00:00 2001 From: = Date: Tue, 16 May 2023 11:55:05 +0200 Subject: [PATCH 01/15] added inter font faces --- .../organisms/AltinnAppHeader.module.css | 1 - src/index.css | 19 ++- .../FileListComponent.module.css | 2 - src/styles/font-faces.css | 157 ++++++++++++++++++ 4 files changed, 172 insertions(+), 7 deletions(-) create mode 100644 src/styles/font-faces.css diff --git a/src/components/organisms/AltinnAppHeader.module.css b/src/components/organisms/AltinnAppHeader.module.css index 7b23c418d1..7773819616 100644 --- a/src/components/organisms/AltinnAppHeader.module.css +++ b/src/components/organisms/AltinnAppHeader.module.css @@ -3,7 +3,6 @@ } .appBarText { - font-family: 'Altinn-DIN'; font-size: 0.875rem; font-weight: 700; } diff --git a/src/index.css b/src/index.css index e94477ea60..0423a7ae45 100644 --- a/src/index.css +++ b/src/index.css @@ -1,4 +1,19 @@ @import 'src/styles/tjenester3.css'; +@import 'src/styles/font-faces.css'; + +/* Font */ + +:root { + font-family: 'Inter', sans-serif; +} +@supports (font-variation-settings: normal) { + @media only screen { + :root { + font-family: 'Inter var', sans-serif; + font-feature-settings: 'cv05'; + } + } +} /* Global variables */ :root { @@ -78,10 +93,6 @@ input:focus + .slider { box-shadow: 0 0 1px #1eaef7; } -p { - font-family: 'Altinn-DIN'; -} - h2 { font-size: 22px; font-weight: normal; diff --git a/src/layout/FileUploadWithTag/FileListComponent.module.css b/src/layout/FileUploadWithTag/FileListComponent.module.css index b55cba38c2..ca059ff611 100644 --- a/src/layout/FileUploadWithTag/FileListComponent.module.css +++ b/src/layout/FileUploadWithTag/FileListComponent.module.css @@ -61,7 +61,6 @@ .tableHeader tr th { padding: 4px 4px 4px 6px; font-size: 0.875rem; - font-family: 'Altinn-DIN', sans-serif; font-weight: 500 !important; color: #000; } @@ -72,7 +71,6 @@ white-space: nowrap; text-overflow: ellipsis; overflow: hidden; - font-family: 'Altinn-DIN', sans-serif; font-weight: 400; border-bottom: 1px dotted var(--border-color-primary); color: #000; diff --git a/src/styles/font-faces.css b/src/styles/font-faces.css new file mode 100644 index 0000000000..1c0badb5be --- /dev/null +++ b/src/styles/font-faces.css @@ -0,0 +1,157 @@ +/* TODO: Upload font files to CDN */ + +/* ------------------------- static ------------------------- */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 100; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-Thin.woff2') format('woff2'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 100; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-ThinItalic.woff2') format('woff2'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 200; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-ExtraLight.woff2') format('woff2'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 200; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-ExtraLightItalic.woff2') format('woff2'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 300; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-Light.woff2') format('woff2'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 300; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-LightItalic.woff2') format('woff2'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-Regular.woff2') format('woff2'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-Italic.woff2') format('woff2'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-Medium.woff2') format('woff2'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-MediumItalic.woff2') format('woff2'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-SemiBold.woff2') format('woff2'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 600; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-SemiBoldItalic.woff2') format('woff2'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-Bold.woff2') format('woff2'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-BoldItalic.woff2') format('woff2'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 800; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-ExtraBold.woff2') format('woff2'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 800; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-ExtraBoldItalic.woff2') format('woff2'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 900; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-Black.woff2') format('woff2'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 900; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-BlackItalic.woff2') format('woff2'); +} + +/* ----------------------- variable ----------------------- */ + +@font-face { + font-family: 'Inter var'; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-roman.var.woff2') format('woff2'); + font-named-instance: 'Regular'; +} + +@font-face { + font-family: 'Inter var'; + font-style: italic; + font-weight: 100 900; + font-display: swap; + src: url('https://rsms.me/inter/font-files/Inter-italic.var.woff2') format('woff2'); + font-named-instance: 'Italic'; +} From 845c241cdb5fd69f9a10969664237831aed97403 Mon Sep 17 00:00:00 2001 From: = Date: Tue, 16 May 2023 14:56:39 +0200 Subject: [PATCH 02/15] removed altinn-din and unused styling --- .../molecules/AltinnInformationPaper.tsx | 1 - .../presentation/LanguageSelector.tsx | 2 +- src/components/table/AltinnTableHeader.tsx | 1 - src/index.css | 18 +- src/layout/Datepicker/DatepickerComponent.tsx | 4 +- .../NavigationBar/NavigationBarComponent.tsx | 2 +- src/layout/Paragraph/ParagraphComponent.tsx | 5 - src/layout/RadioButtons/radioButtonsUtils.ts | 1 - src/styles/tjenester3.css | 10072 +++++----------- src/theme/altinnAppTheme.tsx | 14 +- 10 files changed, 2721 insertions(+), 7399 deletions(-) diff --git a/src/components/molecules/AltinnInformationPaper.tsx b/src/components/molecules/AltinnInformationPaper.tsx index 8aa2033d49..13689c7215 100644 --- a/src/components/molecules/AltinnInformationPaper.tsx +++ b/src/components/molecules/AltinnInformationPaper.tsx @@ -13,7 +13,6 @@ const useStyles = makeStyles({ borderRadius: 0, fontSize: 16, padding: 24, - fontFamily: 'Altinn-DIN', }, }); diff --git a/src/components/presentation/LanguageSelector.tsx b/src/components/presentation/LanguageSelector.tsx index 444f64a57c..1a5375dca8 100644 --- a/src/components/presentation/LanguageSelector.tsx +++ b/src/components/presentation/LanguageSelector.tsx @@ -29,7 +29,7 @@ export const LanguageSelector = () => { if (appLanguages && language) { return ( -
+