enhanced .text-sm support via body & fixed card-text float error

pull/2256/head
REJack 2019-09-13 10:09:58 +02:00
parent b78a1c45bb
commit d8904dd346
No known key found for this signature in database
GPG Key ID: 9F3976CC630CC888
5 changed files with 80 additions and 6 deletions

View File

@ -16,6 +16,10 @@
text-decoration: none; text-decoration: none;
} }
.text-sm & {
font-size: inherit;
}
[class*='sidebar-dark'] & { [class*='sidebar-dark'] & {
border-bottom: 1px solid lighten($dark, 10%); border-bottom: 1px solid lighten($dark, 10%);
color: rgba($white, .8); color: rgba($white, .8);
@ -50,7 +54,8 @@
width: auto; width: auto;
} }
&.text-sm { &.text-sm,
.text-sm & {
.brand-image { .brand-image {
height: 29px; height: 29px;
margin-bottom: -.25rem; margin-bottom: -.25rem;

View File

@ -93,8 +93,8 @@ html.maximized-card {
.card-header { .card-header {
background-color: transparent; background-color: transparent;
border-bottom: 1px solid $card-border-color; border-bottom: 1px solid $card-border-color;
position: relative;
padding: (($card-spacer-y / 2) * 2) $card-spacer-x; padding: (($card-spacer-y / 2) * 2) $card-spacer-x;
position: relative;
@if $enable-rounded { @if $enable-rounded {
@include border-top-radius($border-radius); @include border-top-radius($border-radius);
@ -106,7 +106,13 @@ html.maximized-card {
> .card-tools { > .card-tools {
float: right; float: right;
margin-right: -$card-spacer-x/2; margin-right: -$card-spacer-x / 2;
.nav,
.pagination {
margin-bottom: -$card-spacer-y / 2;
margin-top: -$card-spacer-y / 2;
}
[data-toggle='tooltip'] { [data-toggle='tooltip'] {
position: relative; position: relative;
@ -121,6 +127,11 @@ html.maximized-card {
margin: 0; margin: 0;
} }
.card-text {
clear: both;
}
// Box Tools Buttons // Box Tools Buttons
.btn-tool { .btn-tool {
background: transparent; background: transparent;
@ -140,12 +151,22 @@ html.maximized-card {
} }
} }
.text-sm {
.card-title {
font-size: $card-title-font-size-sm;
}
.nav-link {
padding: $card-nav-link-padding-sm-y $card-nav-link-padding-sm-x;
}
}
// Box Body // Box Body
.card-body { .card-body {
// @include border-radius-sides(0, 0, $border-radius, $border-radius); // @include border-radius-sides(0, 0, $border-radius, $border-radius);
.no-header & { // .no-header & {
// @include border-top-radius($border-radius); // @include border-top-radius($border-radius);
} // }
// Tables within the box body // Tables within the box body
> .table { > .table {

View File

@ -51,6 +51,16 @@ body,
} }
} }
.layout-navbar-fixed.layout-fixed.text-sm & {
.control-sidebar {
top: $main-header-height-sm;
}
.sidebar {
margin-top: $main-header-height-sm;
}
}
.layout-navbar-fixed.sidebar-collapse & { .layout-navbar-fixed.sidebar-collapse & {
.brand-link { .brand-link {
height: $main-header-height; height: $main-header-height;
@ -62,6 +72,12 @@ body,
} }
} }
.layout-navbar-fixed.sidebar-collapse.text-sm & {
.brand-link {
height: $main-header-height-sm;
}
}
.layout-navbar-fixed & { .layout-navbar-fixed & {
.control-sidebar { .control-sidebar {
top: 0; top: 0;
@ -117,6 +133,12 @@ body,
} }
} }
.layout-navbar-fixed.text-sm & {
.content-wrapper {
margin-top: $main-header-height-sm;
}
}
.layout-navbar-not-fixed & { .layout-navbar-not-fixed & {
.brand-link { .brand-link {
position: static; position: static;
@ -147,6 +169,7 @@ body,
top: $main-header-height; top: $main-header-height;
} }
.text-sm & .main-header ~ .control-sidebar,
.main-header.text-sm ~ .control-sidebar { .main-header.text-sm ~ .control-sidebar {
top: $main-header-height-sm; top: $main-header-height-sm;
} }
@ -155,11 +178,22 @@ body,
margin-top: $main-header-height; margin-top: $main-header-height;
} }
.text-sm & .brand-link ~ .sidebar,
.brand-link.text-sm ~ .sidebar { .brand-link.text-sm ~ .sidebar {
margin-top: $main-header-height-sm; margin-top: $main-header-height-sm;
} }
} }
.layout#{$infix}-navbar-fixed.layout-fixed.text-sm & {
.control-sidebar {
top: $main-header-height-sm;
}
.sidebar {
margin-top: $main-header-height-sm;
}
}
.layout#{$infix}-navbar-fixed & { .layout#{$infix}-navbar-fixed & {
.control-sidebar { .control-sidebar {
top: 0; top: 0;
@ -177,6 +211,7 @@ body,
transition: width $transition-speed $transition-fn; transition: width $transition-speed $transition-fn;
width: $sidebar-mini-width; width: $sidebar-mini-width;
.text-sm &,
&.text-sm { &.text-sm {
height: $main-header-height-sm; height: $main-header-height-sm;
} }
@ -214,6 +249,7 @@ body,
margin-top: $main-header-height; margin-top: $main-header-height;
} }
.text-sm & .main-header ~ .content-wrapper,
.main-header.text-sm ~ .content-wrapper { .main-header.text-sm ~ .content-wrapper {
margin-top: $main-header-height-sm; margin-top: $main-header-height-sm;
} }
@ -227,6 +263,12 @@ body,
} }
} }
.layout#{$infix}-navbar-fixed.text-sm & {
.content-wrapper {
margin-top: $main-header-height-sm;
}
}
.layout#{$infix}-navbar-not-fixed & { .layout#{$infix}-navbar-not-fixed & {
.brand-link { .brand-link {
position: static; position: static;
@ -439,6 +481,7 @@ body,
color: lighten($gray-700, 25%); color: lighten($gray-700, 25%);
padding: $main-footer-padding; padding: $main-footer-padding;
.text-sm &,
&.text-sm { &.text-sm {
padding: $main-footer-padding * .812; padding: $main-footer-padding * .812;
} }

View File

@ -11,6 +11,7 @@
position: relative; position: relative;
} }
.text-sm &,
&.text-sm { &.text-sm {
.nav-link { .nav-link {
height: $nav-link-sm-height; height: $nav-link-sm-height;

View File

@ -136,7 +136,11 @@ $card-border-color: $gray-100 !default;
$card-dark-border-color: lighten($gray-900, 10%) !default; $card-dark-border-color: lighten($gray-900, 10%) !default;
$card-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2) !default; $card-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2) !default;
$card-title-font-size: 1.1rem; $card-title-font-size: 1.1rem;
$card-title-font-size-sm: 1rem;
$card-title-font-weight: $font-weight-normal; $card-title-font-weight: $font-weight-normal;
$card-nav-link-padding-sm-y: .4rem;
$card-nav-link-padding-sm-x: .8rem;
// PROGRESS BARS // PROGRESS BARS
// -------------------------------------------------------- // --------------------------------------------------------