From d85ff428105543277d021365380c97112744cf15 Mon Sep 17 00:00:00 2001 From: Tobias Date: Thu, 25 Apr 2019 10:32:20 +0200 Subject: [PATCH] feat: make new css package `dnb-ui-tags` - to make it more clear what this packages includes (raw tag selectors, to avoid using css selectors, even this is not recommended to use in larger apps) --- .../dnb-ui-lib/src/style/dnb-ui-elements.scss | 3 +- .../dnb-ui-lib/src/style/dnb-ui-tags.scss | 11 ++++++ .../dnb-ui-lib/src/style/elements/anchor.scss | 5 ++- .../src/style/elements/ui-elements.scss | 28 --------------- .../src/style/elements/ui-tags.scss | 34 +++++++++++++++++++ packages/dnb-ui-lib/src/style/tags.js | 6 ++++ 6 files changed, 54 insertions(+), 33 deletions(-) create mode 100644 packages/dnb-ui-lib/src/style/dnb-ui-tags.scss create mode 100644 packages/dnb-ui-lib/src/style/elements/ui-tags.scss create mode 100644 packages/dnb-ui-lib/src/style/tags.js diff --git a/packages/dnb-ui-lib/src/style/dnb-ui-elements.scss b/packages/dnb-ui-lib/src/style/dnb-ui-elements.scss index 08229e7f1db..b07eaf03c94 100644 --- a/packages/dnb-ui-lib/src/style/dnb-ui-elements.scss +++ b/packages/dnb-ui-lib/src/style/dnb-ui-elements.scss @@ -6,6 +6,5 @@ @import './core/utilities.scss'; @import './core/properties.scss'; -// import and execute all HTML tag elements +// import all HTML elements @import './elements/ui-elements.scss'; -@include executeHTMLElements(); diff --git a/packages/dnb-ui-lib/src/style/dnb-ui-tags.scss b/packages/dnb-ui-lib/src/style/dnb-ui-tags.scss new file mode 100644 index 00000000000..4b4c0a28f62 --- /dev/null +++ b/packages/dnb-ui-lib/src/style/dnb-ui-tags.scss @@ -0,0 +1,11 @@ +/** + * HTML Element Tags + * + */ + +@import './core/utilities.scss'; +@import './core/properties.scss'; + +// import and execute all HTML element tags +@import './elements/ui-tags.scss'; +@include executeHTMLTags(); diff --git a/packages/dnb-ui-lib/src/style/elements/anchor.scss b/packages/dnb-ui-lib/src/style/elements/anchor.scss index 683b6caeb85..969f3b7ae1c 100644 --- a/packages/dnb-ui-lib/src/style/elements/anchor.scss +++ b/packages/dnb-ui-lib/src/style/elements/anchor.scss @@ -30,13 +30,12 @@ $anchorBorderRadius: 0.25rem; color: var(--color-sea-green); text-decoration: none; - // border-bottom: $anchorBorderBottomWidth solid var(--color-sea-green); - box-shadow: 0 $anchorBorderBottomWidth 0 0 var(--color-sea-green); + box-shadow: 0 $anchorBorderBottomWidth 0 0 currentColor; border-radius: 0; @if $theme == 'highlighted' { color: var(--color-emerald-green); - box-shadow: 0 $anchorBorderBottomWidth 0 0 var(--color-emerald-green); + box-shadow: 0 $anchorBorderBottomWidth 0 0 currentColor; } } diff --git a/packages/dnb-ui-lib/src/style/elements/ui-elements.scss b/packages/dnb-ui-lib/src/style/elements/ui-elements.scss index b97d591848e..a8969bd0c94 100644 --- a/packages/dnb-ui-lib/src/style/elements/ui-elements.scss +++ b/packages/dnb-ui-lib/src/style/elements/ui-elements.scss @@ -17,31 +17,3 @@ @import './code.scss'; @import './image.scss'; @import './hr.scss'; - -@mixin executeHTMLElements() { - // div - @include anchorTag(); - @include imageTag(); - @include blockquoteTag(); - @include hrTag(); - - // typography - @include typographyTags(); - - // lists - @include ulTag(); - @include olTag(); - @include dlTag(); - - // table - @include tableTag(); - - // form - @include formTag(); - @include labelTag(); - @include textareaTag(); - - // additional - @include codeTag(); - @include preTag(); -} diff --git a/packages/dnb-ui-lib/src/style/elements/ui-tags.scss b/packages/dnb-ui-lib/src/style/elements/ui-tags.scss new file mode 100644 index 00000000000..5e401657fbb --- /dev/null +++ b/packages/dnb-ui-lib/src/style/elements/ui-tags.scss @@ -0,0 +1,34 @@ +/* + * Import all element tags + * + */ + +@import './ui-elements.scss'; + +@mixin executeHTMLTags() { + // div + @include anchorTag(); + @include imageTag(); + @include blockquoteTag(); + @include hrTag(); + + // typography + @include typographyTags(); + + // lists + @include ulTag(); + @include olTag(); + @include dlTag(); + + // table + @include tableTag(); + + // form + @include formTag(); + @include labelTag(); + @include textareaTag(); + + // additional + @include codeTag(); + @include preTag(); +} diff --git a/packages/dnb-ui-lib/src/style/tags.js b/packages/dnb-ui-lib/src/style/tags.js new file mode 100644 index 00000000000..3d96a82f4b1 --- /dev/null +++ b/packages/dnb-ui-lib/src/style/tags.js @@ -0,0 +1,6 @@ +/** + * Imports only the main UI themes HTML elements (tags) + * + */ + +import './dnb-ui-tags.scss'