From c7cafc60332307e00dcb70204c3980d5b3bf9a11 Mon Sep 17 00:00:00 2001 From: Tobias Date: Sun, 21 Jul 2019 23:53:35 +0200 Subject: [PATCH] fix: #space fixup due to `.dnb-core-style` and css margins reset --- .../dnb-ui-lib/src/components/space/Space.js | 7 +- .../__snapshots__/Space.test.js.snap | 762 ++++++++++-------- ...h-the-2-5-spacing-margins-1-896d5.snap.png | Bin 4856 -> 4959 bytes .../src/components/space/style/_space.scss | 151 ++-- .../dnb-ui-lib/stories/components/Space.js | 2 +- 5 files changed, 531 insertions(+), 391 deletions(-) diff --git a/packages/dnb-ui-lib/src/components/space/Space.js b/packages/dnb-ui-lib/src/components/space/Space.js index c6f180790d7..1c6fdb71fa3 100644 --- a/packages/dnb-ui-lib/src/components/space/Space.js +++ b/packages/dnb-ui-lib/src/components/space/Space.js @@ -7,7 +7,6 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' import { - isTrue, extend, extendPropsWithContext, registerElement, @@ -23,7 +22,6 @@ const renderProps = { export const propTypes = { id: PropTypes.string, element: PropTypes.string, - inline: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]), top: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), right: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), bottom: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), @@ -45,7 +43,6 @@ export const propTypes = { export const defaultProps = { id: null, element: 'div', - inline: false, top: null, right: null, bottom: null, @@ -93,7 +90,6 @@ export default class Space extends PureComponent { let { element, - inline, top, right, bottom, @@ -112,7 +108,6 @@ export default class Space extends PureComponent { const params = { className: classnames( 'dnb-space', - isTrue(inline) && 'dnb-space--inline', createSpacingClasses({ top, right, bottom, left }), className, _className @@ -140,6 +135,8 @@ export default class Space extends PureComponent { } }) + // const Element = element + return ( diff --git a/packages/dnb-ui-lib/src/components/space/__tests__/__snapshots__/Space.test.js.snap b/packages/dnb-ui-lib/src/components/space/__tests__/__snapshots__/Space.test.js.snap index 78db1852418..d7342433bf5 100644 --- a/packages/dnb-ui-lib/src/components/space/__tests__/__snapshots__/Space.test.js.snap +++ b/packages/dnb-ui-lib/src/components/space/__tests__/__snapshots__/Space.test.js.snap @@ -7,7 +7,6 @@ exports[`Space component have to match snapshot 1`] = ` className="className" element="div" id="space" - inline="inline" left="left" render_content={[Function]} right="right" @@ -93,388 +92,493 @@ exports[`Space scss have to match snapshot 1`] = ` * Space component * */ -.dnb-space--inline, .dnb-core-style .dnb-space--inline { display: inline-block; } -.dnb-space__top--x-small, .dnb-core-style .dnb-space__top--x-small { - margin-top: var(--spacing-x-small); } + margin-top: 0.5rem; } -.dnb-space__top--small, .dnb-core-style .dnb-space__top--small { - margin-top: var(--spacing-small); } + margin-top: 1rem; } -.dnb-space__top--medium, .dnb-core-style .dnb-space__top--medium { - margin-top: var(--spacing-medium); } + margin-top: 1.5rem; } -.dnb-space__top--large, .dnb-core-style .dnb-space__top--large { - margin-top: var(--spacing-large); } + margin-top: 2rem; } -.dnb-space__top--large.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--x-small, -.dnb-core-style .dnb-space__top--large.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--x-small { - margin-top: calc( var(--spacing-large) + var(--spacing-x-small)); } +.dnb-core-style .dnb-space__top--large.dnb-core-style .dnb-space__top--x-small { + margin-top: 2.5rem; } -.dnb-space__top--x-large, .dnb-core-style .dnb-space__top--x-large { - margin-top: var(--spacing-x-large); } + margin-top: 3rem; } -.dnb-space__top--xx-large, .dnb-core-style .dnb-space__top--xx-large { - margin-top: var(--spacing-xx-large); } - -.dnb-space__top--xx-large.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--x-small, -.dnb-core-style .dnb-space__top--xx-large.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--x-small { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-x-small)); } - -.dnb-space__top--xx-large.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--small, -.dnb-core-style .dnb-space__top--xx-large.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--small { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-small)); } - -.dnb-space__top--xx-large.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--medium, -.dnb-core-style .dnb-space__top--xx-large.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--medium { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-medium)); } - -.dnb-space__top--xx-large.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--large, -.dnb-core-style .dnb-space__top--xx-large.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--large { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-large)); } - -.dnb-space__top--xx-large.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--large.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--x-small, -.dnb-core-style .dnb-space__top--xx-large.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--large.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--x-small { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-large) + var(--spacing-x-small)); } - -.dnb-space__top--xx-large.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--x-large, -.dnb-core-style .dnb-space__top--xx-large.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--x-large { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-x-large)); } - -.dnb-space__top--xx-large-x2, + margin-top: 3.5rem; } + +.dnb-core-style .dnb-space__top--xx-large.dnb-core-style .dnb-space__top--x-small { + margin-top: 4rem; } + +.dnb-core-style .dnb-space__top--xx-large.dnb-core-style .dnb-space__top--small { + margin-top: 4.5rem; } + +.dnb-core-style .dnb-space__top--xx-large.dnb-core-style .dnb-space__top--medium { + margin-top: 5rem; } + +.dnb-core-style .dnb-space__top--xx-large.dnb-core-style .dnb-space__top--large { + margin-top: 5.5rem; } + +.dnb-core-style .dnb-space__top--xx-large.dnb-core-style .dnb-space__top--large.dnb-core-style .dnb-space__top--x-small { + margin-top: 6rem; } + +.dnb-core-style .dnb-space__top--xx-large.dnb-core-style .dnb-space__top--x-large { + margin-top: 6.5rem; } + .dnb-core-style .dnb-space__top--xx-large-x2 { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-xx-large)); } - -.dnb-space__top--xx-large-x2.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--x-small, -.dnb-core-style .dnb-space__top--xx-large-x2.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--x-small { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-x-small)); } - -.dnb-space__top--xx-large-x2.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--small, -.dnb-core-style .dnb-space__top--xx-large-x2.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--small { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-small)); } - -.dnb-space__top--xx-large-x2.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--medium, -.dnb-core-style .dnb-space__top--xx-large-x2.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--medium { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-medium)); } - -.dnb-space__top--xx-large-x2.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--large, -.dnb-core-style .dnb-space__top--xx-large-x2.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--large { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-large)); } - -.dnb-space__top--xx-large-x2.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--large.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--x-small, -.dnb-core-style .dnb-space__top--xx-large-x2.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--large.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--x-small { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-large) + var(--spacing-x-small)); } - -.dnb-space__top--xx-large-x2.dnb-space__top, .dnb-space__top .dnb-core-style .dnb-space__top--x-large, -.dnb-core-style .dnb-space__top--xx-large-x2.dnb-space__top, -.dnb-core-style .dnb-space__top .dnb-core-style .dnb-space__top--x-large { - margin-top: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-x-large)); } - -.dnb-space__right--x-small, + margin-top: 7rem; } + +.dnb-core-style .dnb-space__top--xx-large-x2.dnb-core-style .dnb-space__top--x-small { + margin-top: 7.5rem; } + +.dnb-core-style .dnb-space__top--xx-large-x2.dnb-core-style .dnb-space__top--small { + margin-top: 8rem; } + +.dnb-core-style .dnb-space__top--xx-large-x2.dnb-core-style .dnb-space__top--medium { + margin-top: 8.5rem; } + +.dnb-core-style .dnb-space__top--xx-large-x2.dnb-core-style .dnb-space__top--large { + margin-top: 9rem; } + +.dnb-core-style .dnb-space__top--xx-large-x2.dnb-core-style .dnb-space__top--large.dnb-core-style .dnb-space__top--x-small { + margin-top: 9.5rem; } + +.dnb-core-style .dnb-space__top--xx-large-x2.dnb-core-style .dnb-space__top--x-large { + margin-top: 10rem; } + .dnb-core-style .dnb-space__right--x-small { - margin-right: var(--spacing-x-small); } + margin-right: 0.5rem; } -.dnb-space__right--small, .dnb-core-style .dnb-space__right--small { - margin-right: var(--spacing-small); } + margin-right: 1rem; } -.dnb-space__right--medium, .dnb-core-style .dnb-space__right--medium { - margin-right: var(--spacing-medium); } + margin-right: 1.5rem; } -.dnb-space__right--large, .dnb-core-style .dnb-space__right--large { - margin-right: var(--spacing-large); } + margin-right: 2rem; } -.dnb-space__right--large.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--x-small, -.dnb-core-style .dnb-space__right--large.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--x-small { - margin-right: calc( var(--spacing-large) + var(--spacing-x-small)); } +.dnb-core-style .dnb-space__right--large.dnb-core-style .dnb-space__right--x-small { + margin-right: 2.5rem; } -.dnb-space__right--x-large, .dnb-core-style .dnb-space__right--x-large { - margin-right: var(--spacing-x-large); } + margin-right: 3rem; } -.dnb-space__right--xx-large, .dnb-core-style .dnb-space__right--xx-large { - margin-right: var(--spacing-xx-large); } - -.dnb-space__right--xx-large.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--x-small, -.dnb-core-style .dnb-space__right--xx-large.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--x-small { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-x-small)); } - -.dnb-space__right--xx-large.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--small, -.dnb-core-style .dnb-space__right--xx-large.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--small { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-small)); } - -.dnb-space__right--xx-large.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--medium, -.dnb-core-style .dnb-space__right--xx-large.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--medium { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-medium)); } - -.dnb-space__right--xx-large.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--large, -.dnb-core-style .dnb-space__right--xx-large.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--large { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-large)); } - -.dnb-space__right--xx-large.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--large.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--x-small, -.dnb-core-style .dnb-space__right--xx-large.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--large.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--x-small { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-large) + var(--spacing-x-small)); } - -.dnb-space__right--xx-large.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--x-large, -.dnb-core-style .dnb-space__right--xx-large.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--x-large { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-x-large)); } - -.dnb-space__right--xx-large-x2, + margin-right: 3.5rem; } + +.dnb-core-style .dnb-space__right--xx-large.dnb-core-style .dnb-space__right--x-small { + margin-right: 4rem; } + +.dnb-core-style .dnb-space__right--xx-large.dnb-core-style .dnb-space__right--small { + margin-right: 4.5rem; } + +.dnb-core-style .dnb-space__right--xx-large.dnb-core-style .dnb-space__right--medium { + margin-right: 5rem; } + +.dnb-core-style .dnb-space__right--xx-large.dnb-core-style .dnb-space__right--large { + margin-right: 5.5rem; } + +.dnb-core-style .dnb-space__right--xx-large.dnb-core-style .dnb-space__right--large.dnb-core-style .dnb-space__right--x-small { + margin-right: 6rem; } + +.dnb-core-style .dnb-space__right--xx-large.dnb-core-style .dnb-space__right--x-large { + margin-right: 6.5rem; } + .dnb-core-style .dnb-space__right--xx-large-x2 { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-xx-large)); } - -.dnb-space__right--xx-large-x2.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--x-small, -.dnb-core-style .dnb-space__right--xx-large-x2.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--x-small { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-x-small)); } - -.dnb-space__right--xx-large-x2.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--small, -.dnb-core-style .dnb-space__right--xx-large-x2.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--small { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-small)); } - -.dnb-space__right--xx-large-x2.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--medium, -.dnb-core-style .dnb-space__right--xx-large-x2.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--medium { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-medium)); } - -.dnb-space__right--xx-large-x2.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--large, -.dnb-core-style .dnb-space__right--xx-large-x2.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--large { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-large)); } - -.dnb-space__right--xx-large-x2.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--large.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--x-small, -.dnb-core-style .dnb-space__right--xx-large-x2.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--large.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--x-small { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-large) + var(--spacing-x-small)); } - -.dnb-space__right--xx-large-x2.dnb-space__right, .dnb-space__right .dnb-core-style .dnb-space__right--x-large, -.dnb-core-style .dnb-space__right--xx-large-x2.dnb-space__right, -.dnb-core-style .dnb-space__right .dnb-core-style .dnb-space__right--x-large { - margin-right: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-x-large)); } - -.dnb-space__bottom--x-small, + margin-right: 7rem; } + +.dnb-core-style .dnb-space__right--xx-large-x2.dnb-core-style .dnb-space__right--x-small { + margin-right: 7.5rem; } + +.dnb-core-style .dnb-space__right--xx-large-x2.dnb-core-style .dnb-space__right--small { + margin-right: 8rem; } + +.dnb-core-style .dnb-space__right--xx-large-x2.dnb-core-style .dnb-space__right--medium { + margin-right: 8.5rem; } + +.dnb-core-style .dnb-space__right--xx-large-x2.dnb-core-style .dnb-space__right--large { + margin-right: 9rem; } + +.dnb-core-style .dnb-space__right--xx-large-x2.dnb-core-style .dnb-space__right--large.dnb-core-style .dnb-space__right--x-small { + margin-right: 9.5rem; } + +.dnb-core-style .dnb-space__right--xx-large-x2.dnb-core-style .dnb-space__right--x-large { + margin-right: 10rem; } + .dnb-core-style .dnb-space__bottom--x-small { - margin-bottom: var(--spacing-x-small); } + margin-bottom: 0.5rem; } -.dnb-space__bottom--small, .dnb-core-style .dnb-space__bottom--small { - margin-bottom: var(--spacing-small); } + margin-bottom: 1rem; } -.dnb-space__bottom--medium, .dnb-core-style .dnb-space__bottom--medium { - margin-bottom: var(--spacing-medium); } + margin-bottom: 1.5rem; } -.dnb-space__bottom--large, .dnb-core-style .dnb-space__bottom--large { - margin-bottom: var(--spacing-large); } + margin-bottom: 2rem; } -.dnb-space__bottom--large.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-small, -.dnb-core-style .dnb-space__bottom--large.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-small { - margin-bottom: calc( var(--spacing-large) + var(--spacing-x-small)); } +.dnb-core-style .dnb-space__bottom--large.dnb-core-style .dnb-space__bottom--x-small { + margin-bottom: 2.5rem; } -.dnb-space__bottom--x-large, .dnb-core-style .dnb-space__bottom--x-large { - margin-bottom: var(--spacing-x-large); } + margin-bottom: 3rem; } -.dnb-space__bottom--xx-large, .dnb-core-style .dnb-space__bottom--xx-large { - margin-bottom: var(--spacing-xx-large); } - -.dnb-space__bottom--xx-large.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-small, -.dnb-core-style .dnb-space__bottom--xx-large.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-small { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-x-small)); } - -.dnb-space__bottom--xx-large.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--small, -.dnb-core-style .dnb-space__bottom--xx-large.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--small { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-small)); } - -.dnb-space__bottom--xx-large.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--medium, -.dnb-core-style .dnb-space__bottom--xx-large.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--medium { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-medium)); } - -.dnb-space__bottom--xx-large.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--large, -.dnb-core-style .dnb-space__bottom--xx-large.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--large { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-large)); } - -.dnb-space__bottom--xx-large.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--large.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-small, -.dnb-core-style .dnb-space__bottom--xx-large.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--large.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-small { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-large) + var(--spacing-x-small)); } - -.dnb-space__bottom--xx-large.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-large, -.dnb-core-style .dnb-space__bottom--xx-large.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-large { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-x-large)); } - -.dnb-space__bottom--xx-large-x2, + margin-bottom: 3.5rem; } + +.dnb-core-style .dnb-space__bottom--xx-large.dnb-core-style .dnb-space__bottom--x-small { + margin-bottom: 4rem; } + +.dnb-core-style .dnb-space__bottom--xx-large.dnb-core-style .dnb-space__bottom--small { + margin-bottom: 4.5rem; } + +.dnb-core-style .dnb-space__bottom--xx-large.dnb-core-style .dnb-space__bottom--medium { + margin-bottom: 5rem; } + +.dnb-core-style .dnb-space__bottom--xx-large.dnb-core-style .dnb-space__bottom--large { + margin-bottom: 5.5rem; } + +.dnb-core-style .dnb-space__bottom--xx-large.dnb-core-style .dnb-space__bottom--large.dnb-core-style .dnb-space__bottom--x-small { + margin-bottom: 6rem; } + +.dnb-core-style .dnb-space__bottom--xx-large.dnb-core-style .dnb-space__bottom--x-large { + margin-bottom: 6.5rem; } + .dnb-core-style .dnb-space__bottom--xx-large-x2 { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-xx-large)); } - -.dnb-space__bottom--xx-large-x2.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-small, -.dnb-core-style .dnb-space__bottom--xx-large-x2.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-small { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-x-small)); } - -.dnb-space__bottom--xx-large-x2.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--small, -.dnb-core-style .dnb-space__bottom--xx-large-x2.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--small { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-small)); } - -.dnb-space__bottom--xx-large-x2.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--medium, -.dnb-core-style .dnb-space__bottom--xx-large-x2.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--medium { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-medium)); } - -.dnb-space__bottom--xx-large-x2.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--large, -.dnb-core-style .dnb-space__bottom--xx-large-x2.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--large { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-large)); } - -.dnb-space__bottom--xx-large-x2.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--large.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-small, -.dnb-core-style .dnb-space__bottom--xx-large-x2.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--large.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-small { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-large) + var(--spacing-x-small)); } - -.dnb-space__bottom--xx-large-x2.dnb-space__bottom, .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-large, -.dnb-core-style .dnb-space__bottom--xx-large-x2.dnb-space__bottom, -.dnb-core-style .dnb-space__bottom .dnb-core-style .dnb-space__bottom--x-large { - margin-bottom: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-x-large)); } - -.dnb-space__left--x-small, + margin-bottom: 7rem; } + +.dnb-core-style .dnb-space__bottom--xx-large-x2.dnb-core-style .dnb-space__bottom--x-small { + margin-bottom: 7.5rem; } + +.dnb-core-style .dnb-space__bottom--xx-large-x2.dnb-core-style .dnb-space__bottom--small { + margin-bottom: 8rem; } + +.dnb-core-style .dnb-space__bottom--xx-large-x2.dnb-core-style .dnb-space__bottom--medium { + margin-bottom: 8.5rem; } + +.dnb-core-style .dnb-space__bottom--xx-large-x2.dnb-core-style .dnb-space__bottom--large { + margin-bottom: 9rem; } + +.dnb-core-style .dnb-space__bottom--xx-large-x2.dnb-core-style .dnb-space__bottom--large.dnb-core-style .dnb-space__bottom--x-small { + margin-bottom: 9.5rem; } + +.dnb-core-style .dnb-space__bottom--xx-large-x2.dnb-core-style .dnb-space__bottom--x-large { + margin-bottom: 10rem; } + .dnb-core-style .dnb-space__left--x-small { - margin-left: var(--spacing-x-small); } + margin-left: 0.5rem; } -.dnb-space__left--small, .dnb-core-style .dnb-space__left--small { - margin-left: var(--spacing-small); } + margin-left: 1rem; } -.dnb-space__left--medium, .dnb-core-style .dnb-space__left--medium { - margin-left: var(--spacing-medium); } + margin-left: 1.5rem; } -.dnb-space__left--large, .dnb-core-style .dnb-space__left--large { - margin-left: var(--spacing-large); } + margin-left: 2rem; } -.dnb-space__left--large.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--x-small, -.dnb-core-style .dnb-space__left--large.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--x-small { - margin-left: calc( var(--spacing-large) + var(--spacing-x-small)); } +.dnb-core-style .dnb-space__left--large.dnb-core-style .dnb-space__left--x-small { + margin-left: 2.5rem; } -.dnb-space__left--x-large, .dnb-core-style .dnb-space__left--x-large { - margin-left: var(--spacing-x-large); } + margin-left: 3rem; } -.dnb-space__left--xx-large, .dnb-core-style .dnb-space__left--xx-large { - margin-left: var(--spacing-xx-large); } - -.dnb-space__left--xx-large.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--x-small, -.dnb-core-style .dnb-space__left--xx-large.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--x-small { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-x-small)); } - -.dnb-space__left--xx-large.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--small, -.dnb-core-style .dnb-space__left--xx-large.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--small { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-small)); } - -.dnb-space__left--xx-large.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--medium, -.dnb-core-style .dnb-space__left--xx-large.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--medium { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-medium)); } - -.dnb-space__left--xx-large.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--large, -.dnb-core-style .dnb-space__left--xx-large.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--large { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-large)); } - -.dnb-space__left--xx-large.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--large.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--x-small, -.dnb-core-style .dnb-space__left--xx-large.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--large.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--x-small { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-large) + var(--spacing-x-small)); } - -.dnb-space__left--xx-large.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--x-large, -.dnb-core-style .dnb-space__left--xx-large.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--x-large { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-x-large)); } - -.dnb-space__left--xx-large-x2, + margin-left: 3.5rem; } + +.dnb-core-style .dnb-space__left--xx-large.dnb-core-style .dnb-space__left--x-small { + margin-left: 4rem; } + +.dnb-core-style .dnb-space__left--xx-large.dnb-core-style .dnb-space__left--small { + margin-left: 4.5rem; } + +.dnb-core-style .dnb-space__left--xx-large.dnb-core-style .dnb-space__left--medium { + margin-left: 5rem; } + +.dnb-core-style .dnb-space__left--xx-large.dnb-core-style .dnb-space__left--large { + margin-left: 5.5rem; } + +.dnb-core-style .dnb-space__left--xx-large.dnb-core-style .dnb-space__left--large.dnb-core-style .dnb-space__left--x-small { + margin-left: 6rem; } + +.dnb-core-style .dnb-space__left--xx-large.dnb-core-style .dnb-space__left--x-large { + margin-left: 6.5rem; } + .dnb-core-style .dnb-space__left--xx-large-x2 { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-xx-large)); } - -.dnb-space__left--xx-large-x2.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--x-small, -.dnb-core-style .dnb-space__left--xx-large-x2.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--x-small { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-x-small)); } - -.dnb-space__left--xx-large-x2.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--small, -.dnb-core-style .dnb-space__left--xx-large-x2.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--small { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-small)); } - -.dnb-space__left--xx-large-x2.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--medium, -.dnb-core-style .dnb-space__left--xx-large-x2.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--medium { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-medium)); } - -.dnb-space__left--xx-large-x2.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--large, -.dnb-core-style .dnb-space__left--xx-large-x2.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--large { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-large)); } - -.dnb-space__left--xx-large-x2.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--large.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--x-small, -.dnb-core-style .dnb-space__left--xx-large-x2.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--large.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--x-small { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-large) + var(--spacing-x-small)); } - -.dnb-space__left--xx-large-x2.dnb-space__left, .dnb-space__left .dnb-core-style .dnb-space__left--x-large, -.dnb-core-style .dnb-space__left--xx-large-x2.dnb-space__left, -.dnb-core-style .dnb-space__left .dnb-core-style .dnb-space__left--x-large { - margin-left: calc( var(--spacing-xx-large) + var(--spacing-xx-large) + var(--spacing-x-large)); } + margin-left: 7rem; } + +.dnb-core-style .dnb-space__left--xx-large-x2.dnb-core-style .dnb-space__left--x-small { + margin-left: 7.5rem; } + +.dnb-core-style .dnb-space__left--xx-large-x2.dnb-core-style .dnb-space__left--small { + margin-left: 8rem; } + +.dnb-core-style .dnb-space__left--xx-large-x2.dnb-core-style .dnb-space__left--medium { + margin-left: 8.5rem; } + +.dnb-core-style .dnb-space__left--xx-large-x2.dnb-core-style .dnb-space__left--large { + margin-left: 9rem; } + +.dnb-core-style .dnb-space__left--xx-large-x2.dnb-core-style .dnb-space__left--large.dnb-core-style .dnb-space__left--x-small { + margin-left: 9.5rem; } + +.dnb-core-style .dnb-space__left--xx-large-x2.dnb-core-style .dnb-space__left--x-large { + margin-left: 10rem; } + +/* stylelint-disable */ +.dnb-space--inline { + display: inline-block; } + +.dnb-space__top--x-small { + margin-top: 0.5rem; } + +.dnb-space__top--small { + margin-top: 1rem; } + +.dnb-space__top--medium { + margin-top: 1.5rem; } + +.dnb-space__top--large { + margin-top: 2rem; } + +.dnb-space__top--large.dnb-space__top--x-small { + margin-top: 2.5rem; } + +.dnb-space__top--x-large { + margin-top: 3rem; } + +.dnb-space__top--xx-large { + margin-top: 3.5rem; } + +.dnb-space__top--xx-large.dnb-space__top--x-small { + margin-top: 4rem; } + +.dnb-space__top--xx-large.dnb-space__top--small { + margin-top: 4.5rem; } + +.dnb-space__top--xx-large.dnb-space__top--medium { + margin-top: 5rem; } + +.dnb-space__top--xx-large.dnb-space__top--large { + margin-top: 5.5rem; } + +.dnb-space__top--xx-large.dnb-space__top--large.dnb-space__top--x-small { + margin-top: 6rem; } + +.dnb-space__top--xx-large.dnb-space__top--x-large { + margin-top: 6.5rem; } + +.dnb-space__top--xx-large-x2 { + margin-top: 7rem; } + +.dnb-space__top--xx-large-x2.dnb-space__top--x-small { + margin-top: 7.5rem; } + +.dnb-space__top--xx-large-x2.dnb-space__top--small { + margin-top: 8rem; } + +.dnb-space__top--xx-large-x2.dnb-space__top--medium { + margin-top: 8.5rem; } + +.dnb-space__top--xx-large-x2.dnb-space__top--large { + margin-top: 9rem; } + +.dnb-space__top--xx-large-x2.dnb-space__top--large.dnb-space__top--x-small { + margin-top: 9.5rem; } + +.dnb-space__top--xx-large-x2.dnb-space__top--x-large { + margin-top: 10rem; } + +.dnb-space__right--x-small { + margin-right: 0.5rem; } + +.dnb-space__right--small { + margin-right: 1rem; } + +.dnb-space__right--medium { + margin-right: 1.5rem; } + +.dnb-space__right--large { + margin-right: 2rem; } + +.dnb-space__right--large.dnb-space__right--x-small { + margin-right: 2.5rem; } + +.dnb-space__right--x-large { + margin-right: 3rem; } + +.dnb-space__right--xx-large { + margin-right: 3.5rem; } + +.dnb-space__right--xx-large.dnb-space__right--x-small { + margin-right: 4rem; } + +.dnb-space__right--xx-large.dnb-space__right--small { + margin-right: 4.5rem; } + +.dnb-space__right--xx-large.dnb-space__right--medium { + margin-right: 5rem; } + +.dnb-space__right--xx-large.dnb-space__right--large { + margin-right: 5.5rem; } + +.dnb-space__right--xx-large.dnb-space__right--large.dnb-space__right--x-small { + margin-right: 6rem; } + +.dnb-space__right--xx-large.dnb-space__right--x-large { + margin-right: 6.5rem; } + +.dnb-space__right--xx-large-x2 { + margin-right: 7rem; } + +.dnb-space__right--xx-large-x2.dnb-space__right--x-small { + margin-right: 7.5rem; } + +.dnb-space__right--xx-large-x2.dnb-space__right--small { + margin-right: 8rem; } + +.dnb-space__right--xx-large-x2.dnb-space__right--medium { + margin-right: 8.5rem; } + +.dnb-space__right--xx-large-x2.dnb-space__right--large { + margin-right: 9rem; } + +.dnb-space__right--xx-large-x2.dnb-space__right--large.dnb-space__right--x-small { + margin-right: 9.5rem; } + +.dnb-space__right--xx-large-x2.dnb-space__right--x-large { + margin-right: 10rem; } + +.dnb-space__bottom--x-small { + margin-bottom: 0.5rem; } + +.dnb-space__bottom--small { + margin-bottom: 1rem; } + +.dnb-space__bottom--medium { + margin-bottom: 1.5rem; } + +.dnb-space__bottom--large { + margin-bottom: 2rem; } + +.dnb-space__bottom--large.dnb-space__bottom--x-small { + margin-bottom: 2.5rem; } + +.dnb-space__bottom--x-large { + margin-bottom: 3rem; } + +.dnb-space__bottom--xx-large { + margin-bottom: 3.5rem; } + +.dnb-space__bottom--xx-large.dnb-space__bottom--x-small { + margin-bottom: 4rem; } + +.dnb-space__bottom--xx-large.dnb-space__bottom--small { + margin-bottom: 4.5rem; } + +.dnb-space__bottom--xx-large.dnb-space__bottom--medium { + margin-bottom: 5rem; } + +.dnb-space__bottom--xx-large.dnb-space__bottom--large { + margin-bottom: 5.5rem; } + +.dnb-space__bottom--xx-large.dnb-space__bottom--large.dnb-space__bottom--x-small { + margin-bottom: 6rem; } + +.dnb-space__bottom--xx-large.dnb-space__bottom--x-large { + margin-bottom: 6.5rem; } + +.dnb-space__bottom--xx-large-x2 { + margin-bottom: 7rem; } + +.dnb-space__bottom--xx-large-x2.dnb-space__bottom--x-small { + margin-bottom: 7.5rem; } + +.dnb-space__bottom--xx-large-x2.dnb-space__bottom--small { + margin-bottom: 8rem; } + +.dnb-space__bottom--xx-large-x2.dnb-space__bottom--medium { + margin-bottom: 8.5rem; } + +.dnb-space__bottom--xx-large-x2.dnb-space__bottom--large { + margin-bottom: 9rem; } + +.dnb-space__bottom--xx-large-x2.dnb-space__bottom--large.dnb-space__bottom--x-small { + margin-bottom: 9.5rem; } + +.dnb-space__bottom--xx-large-x2.dnb-space__bottom--x-large { + margin-bottom: 10rem; } + +.dnb-space__left--x-small { + margin-left: 0.5rem; } + +.dnb-space__left--small { + margin-left: 1rem; } + +.dnb-space__left--medium { + margin-left: 1.5rem; } + +.dnb-space__left--large { + margin-left: 2rem; } + +.dnb-space__left--large.dnb-space__left--x-small { + margin-left: 2.5rem; } + +.dnb-space__left--x-large { + margin-left: 3rem; } + +.dnb-space__left--xx-large { + margin-left: 3.5rem; } + +.dnb-space__left--xx-large.dnb-space__left--x-small { + margin-left: 4rem; } + +.dnb-space__left--xx-large.dnb-space__left--small { + margin-left: 4.5rem; } + +.dnb-space__left--xx-large.dnb-space__left--medium { + margin-left: 5rem; } + +.dnb-space__left--xx-large.dnb-space__left--large { + margin-left: 5.5rem; } + +.dnb-space__left--xx-large.dnb-space__left--large.dnb-space__left--x-small { + margin-left: 6rem; } + +.dnb-space__left--xx-large.dnb-space__left--x-large { + margin-left: 6.5rem; } + +.dnb-space__left--xx-large-x2 { + margin-left: 7rem; } + +.dnb-space__left--xx-large-x2.dnb-space__left--x-small { + margin-left: 7.5rem; } + +.dnb-space__left--xx-large-x2.dnb-space__left--small { + margin-left: 8rem; } + +.dnb-space__left--xx-large-x2.dnb-space__left--medium { + margin-left: 8.5rem; } + +.dnb-space__left--xx-large-x2.dnb-space__left--large { + margin-left: 9rem; } + +.dnb-space__left--xx-large-x2.dnb-space__left--large.dnb-space__left--x-small { + margin-left: 9.5rem; } + +.dnb-space__left--xx-large-x2.dnb-space__left--x-large { + margin-left: 10rem; } + +/* stylelint-enable */ " `; diff --git a/packages/dnb-ui-lib/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-2-5-spacing-margins-1-896d5.snap.png b/packages/dnb-ui-lib/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-2-5-spacing-margins-1-896d5.snap.png index 0866bdf8bf0d8a35ce5d2f4458d4fd54824ba47e..c85f5351053db5a08dc4a88c1a16cfb798e14e40 100644 GIT binary patch literal 4959 zcmeHL^;=VI+#e4LD$*qg;{g;Tq(qPyhzbZ2DiYEqNXO_=f`Y{8PNfv3d5Db|2n@$S zO1c|?(TvgW?RCA^`&YcboNL$F&bhz)+@Crp;<=V8^)>cu5D0`??dg-35D1wj`26t- z1vpy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mQ4(b8~Z}a_5#0|5*>#phb&{iXz!y^r&^ed1q&5kh12c@iKf85{cj-K^Z+T z*4QmvPEHO;NM2J7I2xm-=~MnOSAQ%fs2Gn4lkpV}=6 ziSNVB!DeXk4UqHY#(!Y)*qa>7jN*mOJ88K5Q~`*P5)j^KY;Oy~@& zXk;em?|Q8z_*&c9HZE+xr1yXSv-(xRsK|Ldr;4TQ87F;(E5{qOKtE8EnPzGS&kUm4 z4&^_IDYU1wg@;94{3LP(1bM6mr&=;gbaE{wxu5);S@PxG1R+zc$3pW{Q*~)iBi_7u z^Q3So9w$B=6M&bjX_>h3NNg%lPFb4W_M4_yPuCH4UCNXB~Xy)=;%jg=#ujCfQbodTFGSkxhz7}+QgYb zn9HVeFy-#x@NmB*3IaIBbL&>1JeK}UTue9)_qnq2gUrbW-kTGjn8*S(E_eR(D}>q| zB@k+a^79jQpLkMNSNE-`=ra(O%}r0cE&^u2*sNi!WwIc<1dBl(R{9QND;RP?lOSh+ z8N3+yYMSioqQ#9PWS8XehS8l61)a}6e5IDgzo^)`fRpU~D0WoB<7l8%_I5lYThz%5 z$_M*gnig~-d`tb2LE`x7(;FM8clE~LyUFj#0!BGq9$&c&x-s(?Z|giw;}6xmfg}8% dFOpBs{JJ1QWXg_p0bjHrDo-^OzRFny{|^SCkcR*O diff --git a/packages/dnb-ui-lib/src/components/space/style/_space.scss b/packages/dnb-ui-lib/src/components/space/style/_space.scss index 6596d1152e9..5efcfeb620e 100644 --- a/packages/dnb-ui-lib/src/components/space/style/_space.scss +++ b/packages/dnb-ui-lib/src/components/space/style/_space.scss @@ -6,122 +6,141 @@ @mixin direction($direction) { // 0.5rem &--x-small { - margin-#{$direction}: var(--spacing-x-small); + margin-#{$direction}: 0.5rem; + // margin-#{$direction}: var(--spacing-x-small); } // 1rem &--small { - margin-#{$direction}: var(--spacing-small); + margin-#{$direction}: 1rem; + // margin-#{$direction}: var(--spacing-small); } // 1.5rem &--medium { - margin-#{$direction}: var(--spacing-medium); + margin-#{$direction}: 1.5rem; + // margin-#{$direction}: var(--spacing-medium); } // 2rem &--large { - margin-#{$direction}: var(--spacing-large); + margin-#{$direction}: 2rem; + // margin-#{$direction}: var(--spacing-large); } // 2.5rem &--large#{&}--x-small { - margin-#{$direction}: calc( - var(--spacing-large) + var(--spacing-x-small) - ); + margin-#{$direction}: 2.5rem; + // margin-#{$direction}: calc( + // var(--spacing-large) + var(--spacing-x-small) + // ); } // 3rem &--x-large { - margin-#{$direction}: var(--spacing-x-large); + margin-#{$direction}: 3rem; + // margin-#{$direction}: var(--spacing-x-large); } // 3.5rem &--xx-large { - margin-#{$direction}: var(--spacing-xx-large); + margin-#{$direction}: 3.5rem; + // margin-#{$direction}: var(--spacing-xx-large); } // 4rem &--xx-large#{&}--x-small { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-x-small) - ); + margin-#{$direction}: 4rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-x-small) + // ); } // 4.5rem &--xx-large#{&}--small { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-small) - ); + margin-#{$direction}: 4.5rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-small) + // ); } // 5rem &--xx-large#{&}--medium { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-medium) - ); + margin-#{$direction}: 5rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-medium) + // ); } // 5.5rem &--xx-large#{&}--large { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-large) - ); + margin-#{$direction}: 5.5rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-large) + // ); } // 6rem &--xx-large#{&}--large#{&}--x-small { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-large) + - var(--spacing-x-small) - ); + margin-#{$direction}: 6rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-large) + + // var(--spacing-x-small) + // ); } // 6.5rem &--xx-large#{&}--x-large { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-x-large) - ); + margin-#{$direction}: 6.5rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-x-large) + // ); } // 7rem &--xx-large-x2 { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-xx-large) - ); + margin-#{$direction}: 7rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-xx-large) + // ); } // 7.5rem &--xx-large-x2#{&}--x-small { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-xx-large) + - var(--spacing-x-small) - ); + margin-#{$direction}: 7.5rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-xx-large) + + // var(--spacing-x-small) + // ); } // 8rem &--xx-large-x2#{&}--small { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-xx-large) + - var(--spacing-small) - ); + margin-#{$direction}: 8rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-xx-large) + + // var(--spacing-small) + // ); } // 8.5rem &--xx-large-x2#{&}--medium { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-xx-large) + - var(--spacing-medium) - ); + margin-#{$direction}: 8.5rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-xx-large) + + // var(--spacing-medium) + // ); } // 9rem &--xx-large-x2#{&}--large { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-xx-large) + - var(--spacing-large) - ); + margin-#{$direction}: 9rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-xx-large) + + // var(--spacing-large) + // ); } // 9.5rem &--xx-large-x2#{&}--large#{&}--x-small { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-xx-large) + - var(--spacing-large) + var(--spacing-x-small) - ); + margin-#{$direction}: 9.5rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-xx-large) + + // var(--spacing-large) + var(--spacing-x-small) + // ); } // 10rem &--xx-large-x2#{&}--x-large { - margin-#{$direction}: calc( - var(--spacing-xx-large) + var(--spacing-xx-large) + - var(--spacing-x-large) - ); + margin-#{$direction}: 10rem; + // margin-#{$direction}: calc( + // var(--spacing-xx-large) + var(--spacing-xx-large) + + // var(--spacing-x-large) + // ); } } -.dnb-space, .dnb-core-style .dnb-space { &--inline { display: inline-block; @@ -139,3 +158,23 @@ @include direction(left); } } + +/* stylelint-disable */ +.dnb-space { + &--inline { + display: inline-block; + } + &__top { + @include direction(top); + } + &__right { + @include direction(right); + } + &__bottom { + @include direction(bottom); + } + &__left { + @include direction(left); + } +} +/* stylelint-enable */ diff --git a/packages/dnb-ui-lib/stories/components/Space.js b/packages/dnb-ui-lib/stories/components/Space.js index f986918f0aa..f3707f56be3 100644 --- a/packages/dnb-ui-lib/stories/components/Space.js +++ b/packages/dnb-ui-lib/stories/components/Space.js @@ -25,7 +25,7 @@ export default [ {/* */} - +