Skip to content

Commit

Permalink
added heading font family theme property
Browse files Browse the repository at this point in the history
  • Loading branch information
snorrekim committed Nov 18, 2024
1 parent cfa3f5e commit 97e2637
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@

&.dnb-sidebar-menu__theme-badge--sbanken {
padding: 0;
font-family: var(--sb-font-family-headings);
font-family: var(--font-family-heading);
font-weight: normal;

.dnb-sidebar-menu__theme-badge__title {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`Properties for sbanken has to validate 1`] = `
export default {
'--sb-font-family-default': '"Roboto", "Helvetica", "Arial", sans-serif',
'--sb-font-family-headings': '"MaisonNeueHeadings", "Roboto", "Helvetica",',
'--sb-font-family-heading': '"MaisonNeueHeadings", "Roboto", "Helvetica",',
'--sb-font-weight-default': 'normal',
'--sb-font-weight-basis': 'normal',
'--sb-font-weight-regular': 'normal',
Expand Down Expand Up @@ -97,6 +97,7 @@ export default {
'--color-emerald-green-25': '#c4d4d6',
'--color-emerald-green-10': '#e8eeef',
'--font-family-default': 'var(--sb-font-family-default)',
'--font-family-heading': 'var(--sb-font-family-heading)',
'--font-family-monospace': '"DNBMono", "Menlo", "Consolas", "Roboto Mono",',
'--font-weight-default': 'normal',
'--font-weight-basis': 'normal',
Expand Down Expand Up @@ -187,7 +188,7 @@ exports[`Properties for ui has to validate 1`] = `
export default {
'--sb-font-family-default': '"Roboto", "Helvetica", "Arial", sans-serif',
'--sb-font-family-headings': '"MaisonNeueHeadings", "Roboto", "Helvetica",',
'--sb-font-family-heading': '"MaisonNeueHeadings", "Roboto", "Helvetica",',
'--sb-font-weight-default': 'normal',
'--sb-font-weight-basis': 'normal',
'--sb-font-weight-regular': 'normal',
Expand Down Expand Up @@ -279,6 +280,7 @@ export default {
'--color-emerald-green-25': '#c4d4d6',
'--color-emerald-green-10': '#e8eeef',
'--font-family-default': '"DNB", sans-serif',
'--font-family-heading': 'var(--font-family-default)',
'--font-family-monospace': '"DNBMono", "Menlo", "Consolas", "Roboto Mono",',
'--font-weight-default': 'normal',
'--font-weight-basis': 'normal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@

&--size-large {
font-weight: var(--sb-font-weight-basis);
font-family: var(--sb-font-family-headings);
font-family: var(--font-family-heading);
}

&--size-x-large {
font-weight: var(--sb-font-weight-basis);
font-family: var(--sb-font-family-headings);
font-family: var(--font-family-heading);
}

&__group {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
@import './typography-mixins.scss';

@include typographySelectors() {
--typography-h-default-font-family: var(--font-family-default);
--typography-h-default-font-weight: var(--font-weight-medium);

// Heading xx-large
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
}

@include typography.typographySelectors() {
--typography-h-default-font-family: var(--sb-font-family-headings);
--typography-h-xx-large-weight: var(--font-weight-regular);
--typography-h-x-large-weight: var(--font-weight-regular);
--typography-h-large-small-font-size: var(--sb-font-size-medium--plus);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
margin: 0;
}

font-family: var(--typography-h-default-font-family);
font-family: var(--font-family-heading);

// make icons inside heading responsive to the heading size
.dnb-icon--default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`PaymentCard scss has to match style dependencies css 1`] = `
*/
:root {
--sb-font-family-default: "Roboto", "Helvetica", "Arial", sans-serif;
--sb-font-family-headings: "MaisonNeueHeadings", "Roboto", "Helvetica",
--sb-font-family-heading: "MaisonNeueHeadings", "Roboto", "Helvetica",
"Arial", sans-serif;
--sb-font-weight-default: normal;
--sb-font-weight-basis: normal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,6 @@ del .dnb-code {
*
*/
.dnb-lead, .dnb-h--xx-large, .dnb-h--x-large, .dnb-h--large, .dnb-h--medium, .dnb-h--basis, .dnb-h--small, .dnb-h--x-small, .dnb-core-style .dnb-lead, .dnb-core-style .dnb-h--xx-large, .dnb-core-style .dnb-h--x-large, .dnb-core-style .dnb-h--large, .dnb-core-style .dnb-h--medium, .dnb-core-style .dnb-h--basis, .dnb-core-style .dnb-h--small, .dnb-core-style .dnb-h--x-small, h1, h2, h3, h4, h5, h6, p, b, small, strong, .dnb-p, .dnb-t, .dnb-small, .dnb-table, sub, sup {
--typography-h-default-font-family: var(--font-family-default);
--typography-h-default-font-weight: var(--font-weight-medium);
--typography-h-xx-large-font-size: var(--font-size-xx-large);
--typography-h-xx-large-line-height: var(--line-height-xx-large);
Expand Down Expand Up @@ -671,7 +670,7 @@ del .dnb-code {
.dnb-core-style .dnb-h--small,
.dnb-core-style .dnb-h--x-small {
padding: 0;
font-family: var(--typography-h-default-font-family);
font-family: var(--font-family-heading);
}
.dnb-lead:not([class*=dnb-space]),
.dnb-h--xx-large:not([class*=dnb-space]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export default {
'--sb-font-family-default': '"Roboto", "Helvetica", "Arial", sans-serif',
'--sb-font-family-headings': '"MaisonNeueHeadings", "Roboto", "Helvetica",',
'--sb-font-family-heading': '"MaisonNeueHeadings", "Roboto", "Helvetica",',
'--sb-font-weight-default': 'normal',
'--sb-font-weight-basis': 'normal',
'--sb-font-weight-regular': 'normal',
Expand Down Expand Up @@ -94,6 +94,7 @@ export default {
'--color-emerald-green-25': '#c4d4d6',
'--color-emerald-green-10': '#e8eeef',
'--font-family-default': '"DNB", sans-serif',
'--font-family-heading': 'var(--font-family-default)',
'--font-family-monospace': '"DNBMono", "Menlo", "Consolas", "Roboto Mono",',
'--font-weight-default': 'normal',
'--font-weight-basis': 'normal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export default {
'--sb-font-family-default': '"Roboto", "Helvetica", "Arial", sans-serif',
'--sb-font-family-headings': '"MaisonNeueHeadings", "Roboto", "Helvetica",',
'--sb-font-family-heading': '"MaisonNeueHeadings", "Roboto", "Helvetica",',
'--sb-font-weight-default': 'normal',
'--sb-font-weight-basis': 'normal',
'--sb-font-weight-regular': 'normal',
Expand Down Expand Up @@ -94,6 +94,7 @@ export default {
'--color-emerald-green-25': '#c4d4d6',
'--color-emerald-green-10': '#e8eeef',
'--font-family-default': 'var(--sb-font-family-default)',
'--font-family-heading': 'var(--sb-font-family-heading)',
'--font-family-monospace': '"DNBMono", "Menlo", "Consolas", "Roboto Mono",',
'--font-weight-default': 'normal',
'--font-weight-basis': 'normal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:root {
// Typography Family
--sb-font-family-default: 'Roboto', 'Helvetica', 'Arial', sans-serif;
--sb-font-family-headings: 'MaisonNeueHeadings', 'Roboto', 'Helvetica',
--sb-font-family-heading: 'MaisonNeueHeadings', 'Roboto', 'Helvetica',
'Arial', sans-serif;

// Typography Weights
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

// font-family
--font-family-default: var(--sb-font-family-default);
--font-family-heading: var(--sb-font-family-heading);

// font-weight
--font-weight-medium: var(--sb-font-weight-medium);
Expand Down
3 changes: 2 additions & 1 deletion packages/dnb-eufemia/src/style/themes/theme-ui/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export default {
'--sb-font-family-default': '"Roboto", "Helvetica", "Arial", sans-serif',
'--sb-font-family-headings': '"MaisonNeueHeadings", "Roboto", "Helvetica",',
'--sb-font-family-heading': '"MaisonNeueHeadings", "Roboto", "Helvetica",',
'--sb-font-weight-default': 'normal',
'--sb-font-weight-basis': 'normal',
'--sb-font-weight-regular': 'normal',
Expand Down Expand Up @@ -94,6 +94,7 @@ export default {
'--color-emerald-green-25': '#c4d4d6',
'--color-emerald-green-10': '#e8eeef',
'--font-family-default': '"DNB", sans-serif',
'--font-family-heading': 'var(--font-family-default)',
'--font-family-monospace': '"DNBMono", "Menlo", "Consolas", "Roboto Mono",',
'--font-weight-default': 'normal',
'--font-weight-basis': 'normal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:root {
// Typography Family
--font-family-default: 'DNB', sans-serif;
--font-family-heading: var(--font-family-default);
--font-family-monospace: 'DNBMono', 'Menlo', 'Consolas', 'Roboto Mono',
'Ubuntu Monospace', 'Noto Mono', 'Oxygen Mono', 'Liberation Mono',
monospace;
Expand Down

0 comments on commit 97e2637

Please sign in to comment.