fixed content margin with active sidebar overlay

pull/2269/head
REJack 2019-10-23 08:17:36 +02:00
parent 46a05235ab
commit 4acb2b49e6
No known key found for this signature in database
GPG Key ID: 9F3976CC630CC888
5 changed files with 94 additions and 35 deletions

View File

@ -379,24 +379,49 @@ body,
} }
} }
.content-wrapper,
.main-footer,
.main-header {
@include media-breakpoint-up(sm) {
@include transition(margin-left $transition-speed $transition-fn);
margin-left: $sidebar-width; body:not(.sidebar-mini-md) {
z-index: 3000; .content-wrapper,
.main-footer,
.main-header {
@include media-breakpoint-up(md) {
@include transition(margin-left $transition-speed $transition-fn);
.sidebar-collapse & { margin-left: $sidebar-width;
margin-left: 0;
.sidebar-collapse & {
margin-left: 0;
}
}
@include media-breakpoint-down(md) {
&,
&::before {
margin-left: 0;
}
} }
} }
}
@include media-breakpoint-down(sm) { .sidebar-mini-md {
&, .content-wrapper,
&::before { .main-footer,
margin-left: 0; .main-header {
@include media-breakpoint-up(md) {
@include transition(margin-left $transition-speed $transition-fn);
margin-left: $sidebar-width;
.sidebar-collapse & {
margin-left: $sidebar-mini-width;
}
}
@include media-breakpoint-down(md) {
&,
&::before {
margin-left: $sidebar-mini-width;
}
} }
} }
} }

72
dist/css/adminlte.css vendored
View File

@ -11111,42 +11111,76 @@ body,
margin-left: 0; margin-left: 0;
} }
@media (min-width: 576px) { @media (min-width: 768px) {
.content-wrapper, body:not(.sidebar-mini-md) .content-wrapper,
.main-footer, body:not(.sidebar-mini-md) .main-footer,
.main-header { body:not(.sidebar-mini-md) .main-header {
transition: margin-left 0.3s ease-in-out; transition: margin-left 0.3s ease-in-out;
margin-left: 250px; margin-left: 250px;
z-index: 3000;
} }
} }
@media (min-width: 576px) and (prefers-reduced-motion: reduce) { @media (min-width: 768px) and (prefers-reduced-motion: reduce) {
.content-wrapper, body:not(.sidebar-mini-md) .content-wrapper,
.main-footer, body:not(.sidebar-mini-md) .main-footer,
.main-header { body:not(.sidebar-mini-md) .main-header {
transition: none; transition: none;
} }
} }
@media (min-width: 576px) { @media (min-width: 768px) {
.sidebar-collapse .content-wrapper, .sidebar-collapse .sidebar-collapse body:not(.sidebar-mini-md) .content-wrapper, .sidebar-collapse
.main-footer, .sidebar-collapse body:not(.sidebar-mini-md) .main-footer, .sidebar-collapse
.main-header { body:not(.sidebar-mini-md) .main-header {
margin-left: 0; margin-left: 0;
} }
} }
@media (max-width: 767.98px) { @media (max-width: 991.98px) {
.content-wrapper, .content-wrapper::before, body:not(.sidebar-mini-md) .content-wrapper, body:not(.sidebar-mini-md) .content-wrapper::before,
.main-footer, body:not(.sidebar-mini-md) .main-footer,
.main-footer::before, body:not(.sidebar-mini-md) .main-footer::before,
.main-header, body:not(.sidebar-mini-md) .main-header,
.main-header::before { body:not(.sidebar-mini-md) .main-header::before {
margin-left: 0; margin-left: 0;
} }
} }
@media (min-width: 768px) {
.sidebar-mini-md .content-wrapper,
.sidebar-mini-md .main-footer,
.sidebar-mini-md .main-header {
transition: margin-left 0.3s ease-in-out;
margin-left: 250px;
}
}
@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
.sidebar-mini-md .content-wrapper,
.sidebar-mini-md .main-footer,
.sidebar-mini-md .main-header {
transition: none;
}
}
@media (min-width: 768px) {
.sidebar-collapse .sidebar-mini-md .content-wrapper, .sidebar-collapse
.sidebar-mini-md .main-footer, .sidebar-collapse
.sidebar-mini-md .main-header {
margin-left: 4.6rem;
}
}
@media (max-width: 991.98px) {
.sidebar-mini-md .content-wrapper, .sidebar-mini-md .content-wrapper::before,
.sidebar-mini-md .main-footer,
.sidebar-mini-md .main-footer::before,
.sidebar-mini-md .main-header,
.sidebar-mini-md .main-header::before {
margin-left: 4.6rem;
}
}
.content-wrapper { .content-wrapper {
background: #f4f6f9; background: #f4f6f9;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long