Skip to content

Commit

Permalink
feat(Typography): Use text color on typography for Sbanken (#2363)
Browse files Browse the repository at this point in the history
* feat(Typography): Use text color on typography for Sbanen

* Update snapshots
  • Loading branch information
tujoworker committed May 31, 2023
1 parent 3594be4 commit fd9c62a
Show file tree
Hide file tree
Showing 15 changed files with 59 additions and 25 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@use '../typography-mixins.scss' as typography;

// Paragraphs
.dnb-p {
color: var(--sb-color-text);
}

// Setting the default headings color
@include typography.headingTags() {
color: var(--sb-color-text);
}

// Headings
@include typography.headingClasses() {
color: var(--sb-color-text);
}
Original file line number Diff line number Diff line change
@@ -1,35 +1,16 @@
@use '../typography-mixins.scss' as typography;

// Paragraphs
.dnb-p {
color: var(--theme-color-black-80, currentColor);
}

// Setting the default headings color
h1,
h2,
h3,
h4,
h5,
h6 {
@include typography.headingTags() {
color: var(--theme-color-black-80, currentColor);
}

// Headings
.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,
// make exception on headings which are inside of dnb-core-style
.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 {
@include typography.headingClasses() {
color: var(--theme-color-black-80, currentColor);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
@use '../../../style/elements/ui-spacing.scss';

@mixin headingTags() {
h1,
h2,
h3,
h4,
h5,
h6 {
@content;
}
}

@mixin headingClasses() {
.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,
// make exception on headings which are inside of dnb-core-style
.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 {
@content;
}
}

@mixin headingDefaults() {
padding: 0;

Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/style/core/scopes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
font-size: var(--font-size-small); // has to be 16px
font-style: normal;
line-height: var(--line-height-basis);
color: var(--color-black-80, #333);
color: var(--theme-color-body, var(--color-black-80, #333));
}

@mixin coreDefault() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

@import './sbanken-theme-elements.scss';

:root {
--theme-color-body: var(--sb-color-text);
}

// ::selection appearance helper
.dnb-selection::selection,
.dnb-selection ::selection,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ $THEME_FALLBACK: 'ui';

@import '../../../elements/blockquote/style/themes/dnb-blockquote-theme-sbanken.scss';
@import '../../../elements/code/style/themes/dnb-code-theme-sbanken.scss';
@import '../../../elements/typography/style/themes/dnb-typography-theme-sbanken.scss';
@import '../../../elements/hr/style/themes/dnb-hr-theme-ui.scss';
@import '../../../elements/img/style/themes/dnb-img-theme-ui.scss';
@import '../../../elements/label/style/themes/dnb-label-theme-ui.scss';
@import '../../../elements/lists/style/themes/dnb-lists-theme-ui.scss';
@import '../../../elements/typography/style/themes/dnb-typography-theme-ui.scss';

0 comments on commit fd9c62a

Please sign in to comment.