Skip to content
Snippets Groups Projects
Commit 80fe8b5d authored by Martin Leblanc's avatar Martin Leblanc
Browse files

ISTWCMS-4970: additional css to align the sidebar correctly when used next to...

ISTWCMS-4970: additional css to align the sidebar correctly when used next to full screen widths as well as when it is collapsed in smaller views
parent f51cbd37
No related branches found
No related tags found
1 merge request!115commented out padding-right in .uw-node &__sidebar
...@@ -58,14 +58,14 @@ $test-color-12: #f00; ...@@ -58,14 +58,14 @@ $test-color-12: #f00;
width: 100vw; width: 100vw;
} }
@mixin uw-full-width-reset { @mixin uw-full-width-reset {
left: 0; left: inherit;
margin-left: -1rem; margin-left: -1rem;
margin-right: -1rem; margin-right: -2rem;
max-width: 100%; max-width: inherit;
padding: 0; padding:inherit;
position: relative; position: relative;
right: 0; right: inherit;
width: 100%; width: inherit;
} }
@mixin uw-contained-width-reset() { @mixin uw-contained-width-reset() {
margin-left:inherit; margin-left:inherit;
......
...@@ -6,9 +6,6 @@ $sidebar-gap: $grid-gap; ...@@ -6,9 +6,6 @@ $sidebar-gap: $grid-gap;
} }
&__sidebar{ &__sidebar{
display:none; display:none;
*{
// padding-right:0.25rem;
}
} }
// Reset the grid to become flexed when we have sidebar. // Reset the grid to become flexed when we have sidebar.
&.uw-node__with-sidebar{ &.uw-node__with-sidebar{
...@@ -25,25 +22,30 @@ $sidebar-gap: $grid-gap; ...@@ -25,25 +22,30 @@ $sidebar-gap: $grid-gap;
margin:0 auto; margin:0 auto;
} }
.uw-full-width{ .uw-full-width{
width:100vw; width:100vw;
} }
@include medium { @include medium {
flex-direction: row; flex-direction: row;
gap:$sidebar-gap; gap:$sidebar-gap;
.layout{ .layout{
padding-right:0;
width: clamp(320px, 868px, calc(100vw - 347px)); width: clamp(320px, 868px, calc(100vw - 347px));
} }
.uw-contained-width{ .uw-contained-width{
padding-right:0;
width: clamp(320px, 868px, calc(100vw - 347px)); width: clamp(320px, 868px, calc(100vw - 347px));
} }
/* Match the width of WCMS2's narrow: 496px */ /* Match the width of WCMS2's narrow: 496px */
.uw-contained-width--narrow{ .uw-contained-width--narrow{
padding-right:0;
width: clamp(320px, 496px, calc(100vw - 347px)); width: clamp(320px, 496px, calc(100vw - 347px));
} }
/* Match the width of WCMS2's wide: 753px */ /* Match the width of WCMS2's wide: 753px */
.uw-contained-width--wide{ .uw-contained-width--wide{
padding-right:0;
width: clamp(320px, 753px, calc(100vw - 347px)); width: clamp(320px, 753px, calc(100vw - 347px));
} }
} }
...@@ -51,36 +53,45 @@ $sidebar-gap: $grid-gap; ...@@ -51,36 +53,45 @@ $sidebar-gap: $grid-gap;
.uw-node__sidebar{ .uw-node__sidebar{
// Turn on sidebar with display. // Turn on sidebar with display.
display:block; display:block;
padding:0 1rem;
width:100%; width:100%;
.layout{
padding:0;
}
@include medium { @include medium {
padding: 1rem 0; padding:0;
width: $sidebar-width; width: $sidebar-width;
.layout{ .layout{
width:inherit; width:inherit;
} }
} }
} }
} }
} }
// Class appears when full width content loads with sidebar on page // Class appears when full width content loads with sidebar on page
.uw-section-has-full-width.uw-node__with-sidebar { .uw-section-has-full-width.uw-node__with-sidebar {
.uw-node__grid { .uw-node__grid {
background:$test-color-3;
justify-content: space-between;
.uw-node__node{ .uw-node__node{
background:$test-color-5;
width:100%; width:100%;
@include medium { @include medium {
background:$test-color-3;
padding-right:0;
width: calc(100vw - 347px); width: calc(100vw - 347px);
} }
} }
.uw-full-width{ .uw-full-width{
background:$test-color-6;
max-width:inherit; max-width:inherit;
padding:0; padding:0;
width:100%; width:100%;
} }
} }
.uw-node__sidebar{ .uw-node__sidebar{
background:$test-color-8;
padding: 0 padding: 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