From d3aee204b79450c5f8d4724e45f2625a24ed5bf2 Mon Sep 17 00:00:00 2001 From: Tobias Date: Wed, 20 Feb 2019 11:52:48 +0100 Subject: [PATCH] feat: make the body styles available by a class helper `.dnb-app-content` --- packages/dnb-ui-lib/src/style/core/scopes.scss | 14 +++++++------- packages/dnb-ui-lib/src/style/dnb-ui-basis.scss | 8 ++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/dnb-ui-lib/src/style/core/scopes.scss b/packages/dnb-ui-lib/src/style/core/scopes.scss index 98b2a30137a..059731ca1ed 100644 --- a/packages/dnb-ui-lib/src/style/core/scopes.scss +++ b/packages/dnb-ui-lib/src/style/core/scopes.scss @@ -4,6 +4,13 @@ */ @mixin bodyDefault() { + *, + ::before, + ::after { + background-repeat: no-repeat; + box-sizing: border-box; + } + font-family: sans-serif; font-family: var(--font-family-default); font-weight: var(--font-weight-default); @@ -18,13 +25,6 @@ } @mixin componentReset() { - *, - ::before, - ::after { - background-repeat: no-repeat; - box-sizing: border-box; - } - ::before, ::after { text-decoration: inherit; diff --git a/packages/dnb-ui-lib/src/style/dnb-ui-basis.scss b/packages/dnb-ui-lib/src/style/dnb-ui-basis.scss index 9333bc8cefe..b0025e5c7f5 100644 --- a/packages/dnb-ui-lib/src/style/dnb-ui-basis.scss +++ b/packages/dnb-ui-lib/src/style/dnb-ui-basis.scss @@ -6,5 +6,13 @@ // core imports @import './core/utilities.scss'; @import './core/properties.scss'; +@import './core/scopes.scss'; @import './core/fonts.scss'; @import './core/helper-classes.scss'; + +// In order to be able to have the body stiles inside a app wrapper, +// we have this class helper to get the body styles inside the wrapper as well +// without using the body +.dnb-app-content { + @include bodyDefault(); +}