Skip to content
Snippets Groups Projects
Commit 51f1bd55 authored by shamalainen's avatar shamalainen
Browse files

Update accordion hy-two-columns vertical paddings

parent 5f435828
No related branches found
No related tags found
No related merge requests found
...@@ -202,9 +202,15 @@ ...@@ -202,9 +202,15 @@
display: block; display: block;
} }
hy-box { > hy-box {
padding: 20px 16px 0;
@include breakpoint($narrow) { @include breakpoint($narrow) {
padding: 0 2rem; padding: 20px 24px 0;
}
@include breakpoint($extrawide) {
padding: 24px 32px 0;
} }
} }
} }
......
...@@ -29,18 +29,35 @@ ...@@ -29,18 +29,35 @@
flex-direction: row-reverse; flex-direction: row-reverse;
} }
.hy-two-columns--side { .hy-two-columns__item--side {
margin-left: 0; margin-left: 0;
margin-right: 0; margin-right: 0;
@include breakpoint($narrow) { @include breakpoint($narrow) {
margin-right: 5.79%; margin-right: 5.79%;
} }
@include breakpoint($wide) { @include breakpoint($wide) {
margin-right: 8.5%; margin-right: 8.5%;
} }
} }
} }
}
.hy-two-columns__item {
width: 100%;
[slot='main'] {
width: 100%;
.hy-paragraph-text {
width: 100% !important;
}
}
[slot='side'] {
width: 100%;
}
&--main { &--main {
display: flex; display: flex;
...@@ -50,16 +67,10 @@ ...@@ -50,16 +67,10 @@
@include breakpoint($narrow) { @include breakpoint($narrow) {
flex-basis: 67.01%; flex-basis: 67.01%;
} }
@include breakpoint($wide) { @include breakpoint($wide) {
flex-basis: 63%; flex-basis: 63%;
} }
[slot='main'] {
width: 100%;
.hy-paragraph-text {
width: 100% !important;
}
}
} }
&--side { &--side {
...@@ -75,16 +86,13 @@ ...@@ -75,16 +86,13 @@
flex-basis: 32.99%; // sidebar width is always 4.5 column of the global 12-col content area grid. flex-basis: 32.99%; // sidebar width is always 4.5 column of the global 12-col content area grid.
margin-left: 5.79%; // (half of the column+gutter) of global 12-col grid = gap between main and sidebar margin-left: 5.79%; // (half of the column+gutter) of global 12-col grid = gap between main and sidebar
} }
@include breakpoint($wide) { @include breakpoint($wide) {
flex-basis: 37%; flex-basis: 37%;
margin-left: 8.5%; // (1 column + gutter) of global 12-col grid = gap between main and sidebar margin-left: 8.5%; // (1 column + gutter) of global 12-col grid = gap between main and sidebar
padding: 0; padding: 0;
} }
[slot='side'] {
width: 100%;
}
// Key figure block inside Sidebar // Key figure block inside Sidebar
hy-key-figure { hy-key-figure {
padding: 0 10.67%; padding: 0 10.67%;
......
...@@ -14,10 +14,10 @@ export class HyTwoColumns { ...@@ -14,10 +14,10 @@ export class HyTwoColumns {
return ( return (
<Host> <Host>
<div class={classAttributes}> <div class={classAttributes}>
<div class="hy-two-columns--main"> <div class="hy-two-columns__item hy-two-columns__item--main">
<slot name="main"></slot> <slot name="main"></slot>
</div> </div>
<div class="hy-two-columns--side"> <div class="hy-two-columns__item hy-two-columns__item--side">
<slot name="side"></slot> <slot name="side"></slot>
</div> </div>
</div> </div>
......
...@@ -14,10 +14,10 @@ describe('hy-two-columns', () => { ...@@ -14,10 +14,10 @@ describe('hy-two-columns', () => {
expect(page.root).toEqualHtml(` expect(page.root).toEqualHtml(`
<hy-two-columns> <hy-two-columns>
<div class="hy-two-columns"> <div class="hy-two-columns">
<div class="hy-two-columns--main"> <div class="hy-two-columns__item hy-two-columns__item--main">
<div slot="main"></div> <div slot="main"></div>
</div> </div>
<div class="hy-two-columns--side"> <div class="hy-two-columns__item hy-two-columns__item--side">
<div slot="side"></div> <div slot="side"></div>
</div> </div>
</div> </div>
......
...@@ -65,5 +65,9 @@ ...@@ -65,5 +65,9 @@
p { p {
margin-top: 0; margin-top: 0;
padding-top: 0; padding-top: 0;
&:last-of-type {
margin-bottom: 0;
}
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment