Skip to content

Commit

Permalink
feat: make new css package dnb-ui-tags - to make it more clear what…
Browse files Browse the repository at this point in the history
… this packages includes (raw tag selectors, to avoid using css selectors, even this is not recommended to use in larger apps)
  • Loading branch information
tujoworker committed May 6, 2019
1 parent f8df3a4 commit d85ff42
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 33 deletions.
3 changes: 1 addition & 2 deletions packages/dnb-ui-lib/src/style/dnb-ui-elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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();
11 changes: 11 additions & 0 deletions packages/dnb-ui-lib/src/style/dnb-ui-tags.scss
Original file line number Diff line number Diff line change
@@ -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();
5 changes: 2 additions & 3 deletions packages/dnb-ui-lib/src/style/elements/anchor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
28 changes: 0 additions & 28 deletions packages/dnb-ui-lib/src/style/elements/ui-elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
34 changes: 34 additions & 0 deletions packages/dnb-ui-lib/src/style/elements/ui-tags.scss
Original file line number Diff line number Diff line change
@@ -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();
}
6 changes: 6 additions & 0 deletions packages/dnb-ui-lib/src/style/tags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Imports only the main UI themes HTML elements (tags)
*
*/

import './dnb-ui-tags.scss'

0 comments on commit d85ff42

Please sign in to comment.