Skip to content

Commit

Permalink
feat: add cherry-red to #section + make it possible to stack #secti…
Browse files Browse the repository at this point in the history
…on in 3 levels
  • Loading branch information
tujoworker committed Aug 14, 2019
1 parent 38b4de2 commit 600c6bc
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ exports[`Section scss have to match default theme snapshot 1`] = `
.dnb-section--mint-green-12::after {
color: var(--color-mint-green-12); }
.dnb-section--mint-green-12 ::selection {
background-color: var(--color-white); }
.dnb-section--white::after {
color: var(--color-white); }
Expand All @@ -55,6 +58,11 @@ exports[`Section scss have to match default theme snapshot 1`] = `
color: var(--color-ocean-green); }
.dnb-section--signal-orange::after {
color: var(--color-signal-orange); }
.dnb-section--cherry-red {
color: var(--color-white); }
.dnb-section--cherry-red::after {
color: var(--color-cherry-red); }
"
`;

Expand Down Expand Up @@ -122,14 +130,18 @@ exports[`Section scss have to match snapshot 1`] = `
.dnb-section::after {
content: '';
position: absolute;
z-index: -1;
z-index: -3;
left: -50vw;
top: 0;
width: 100vw;
height: 100%;
color: var(--color-mint-green-12);
background-color: currentColor;
box-shadow: 100vw 0 0 0 currentColor; }
.dnb-section > .dnb-section::after {
z-index: -2; }
.dnb-section > .dnb-section > .dnb-section::after {
z-index: -1; }
.dnb-section--spacing-small {
padding-top: var(--spacing-small);
padding-bottom: var(--spacing-small); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
&::after {
content: '';
position: absolute;
z-index: -1;
z-index: -3;
left: -50vw;
top: 0;
width: 100vw;
Expand All @@ -20,6 +20,12 @@
// we use box-shadow to avoid a horizontal scrollbar
box-shadow: 100vw 0 0 0 currentColor;
}
& > &::after {
z-index: -2;
}
& > & > &::after {
z-index: -1;
}

&--spacing-small {
padding-top: var(--spacing-small);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
0 -0.0625rem 0 0 var(--color-mint-green-50),
100vw -0.0625rem 0 0 var(--color-mint-green-50);
}
&--mint-green-12::after {
color: var(--color-mint-green-12);
&--mint-green-12 {
&::after {
color: var(--color-mint-green-12);
}
::selection {
background-color: var(--color-white);
}
}
&--white::after {
color: var(--color-white);
Expand Down Expand Up @@ -41,6 +46,12 @@
color: var(--color-signal-orange);
}
}
&--cherry-red {
color: var(--color-white);
&::after {
color: var(--color-cherry-red);
}
}
}

.dnb-section {
Expand Down

0 comments on commit 600c6bc

Please sign in to comment.