123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- // AdminLTE mixins
- // ===============
- // Changes the color and the hovering properties of the navbar
- @mixin navbar-variant($color, $font-color: rgba(255, 255, 255, 0.8), $hover-color: #f6f6f6, $hover-bg: rgba(0, 0, 0, 0.1)) {
- background-color: $color;
- // Navbar links
- .nav > li > a {
- color: $font-color;
- }
- .nav > li > a:hover,
- .nav > li > a:active,
- .nav > li > a:focus,
- .nav .open > a,
- .nav .open > a:hover,
- .nav .open > a:focus,
- .nav > .active > a {
- background: $hover-bg;
- color: $hover-color;
- }
- // Add color to the sidebar toggle button
- .sidebar-toggle {
- color: $font-color;
- &:hover {
- color: $hover-color;
- background: $hover-bg;
- }
- }
- }
- // Logo color variation
- @mixin logo-variant($bg-color, $color: #fff, $border-bottom-color: transparent, $border-bottom-width: 0) {
- background-color: $bg-color;
- color: $color;
- border-bottom: $border-bottom-width solid $border-bottom-color;
- &:hover {
- background-color: darken($bg-color, 1%);
- }
- }
- // Box solid color variantion creator
- @mixin box-solid-variant($color, $text-color: #fff) {
- border: 1px solid $color;
- > .box-header {
- color: $text-color;
- background: $color;
- background-color: $color;
- a,
- .btn {
- color: $text-color;
- }
- }
- }
- // Direct Chat Variant
- @mixin direct-chat-variant($bg-color, $color: #fff) {
- .right > .direct-chat-text {
- background: $bg-color;
- border-color: $bg-color;
- color: $color;
- &:after,
- &:before {
- border-left-color: $bg-color;
- }
- }
- }
- @mixin translate($x, $y) {
- -webkit-transform: translate($x, $y);
- -ms-transform: translate($x, $y); // IE9 only
- transform: translate($x, $y);
- }
- // Different radius each side
- @mixin border-radius-sides($top-left, $top-right, $bottom-left, $bottom-right) {
- border-radius: $top-left $top-right $bottom-left $bottom-right;
- }
- @mixin calc($property, $expression) {
- #{$property}: -webkit-calc(#{$expression});
- #{$property}: calc(#{$expression});
- }
- @mixin rotate($value) {
- -ms-transform: rotate($value);
- transform: rotate($value);
- }
- @mixin animation($animation) {
- animation: $animation;
- }
- // Gradient background
- @mixin gradient($color: #F5F5F5, $start: #EEE, $stop: #FFF) {
- background: $color;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, $start), color-stop(1, $stop));
- background: -ms-linear-gradient(bottom, $start, $stop);
- background: -moz-linear-gradient(center bottom, $start 0%, $stop 100%);
- background: -o-linear-gradient($stop, $start);
- }
- // Skins Mixins
- // Dark Sidebar Mixin
- @mixin skin-dark-sidebar($link-hover-border-color) {
- // Sidebar background color (Both .wrapper and .left-side are responsible for sidebar bg color)
- .main-sidebar,
- .main-sidebar:before {
- background-color: $sidebar-dark-bg;
- }
- // User Panel (resides in the sidebar)
- .user-panel {
- .info,
- .status {
- color: #fff;
- }
- .status {
- color: $sidebar-dark-color;
- background: $sidebar-dark-hover-bg;
- &:hover,
- &:focus,
- &:active {
- color: $sidebar-dark-hover-color;
- background: darken($sidebar-dark-hover-bg, 3%);
- }
- }
- .dropdown-menu {
- border-color: darken($sidebar-dark-hover-bg, 5%);
- @include box-shadow(0 2px 4px rgba(0, 0, 0, .4));
- }
- .dropdown-item {
- color: $body-color;
- }
- }
- // Sidebar Menu. First level links
- .nav-sidebar > .nav-item {
- // links
- > .nav-link {
- border-left: 3px solid transparent;
- &:active,
- &:focus {
- color: $sidebar-dark-color;
- }
- }
- // Hover and active states
- &.menu-open > .nav-link,
- &:hover > .nav-link,
- > .nav-link.active {
- color: $sidebar-dark-hover-color;
- background: $sidebar-dark-hover-bg;
- }
- > .nav-link.active {
- border-left-color: $link-hover-border-color;
- }
- // First Level Submenu
- > .nav-treeview {
- margin: 0 1px;
- background: $sidebar-dark-submenu-bg;
- }
- }
- // Section Heading
- .nav-header {
- color: darken($sidebar-dark-color, 20%);
- background: inherit; //darken($sidebar-dark-bg, 3%);
- }
- // All links within the sidebar menu
- .sidebar a {
- color: $sidebar-dark-color;
- &:hover {
- text-decoration: none;
- }
- }
- // All submenus
- .nav-treeview {
- > .nav-item {
- > .nav-link {
- color: $sidebar-dark-submenu-color;
- }
- > .nav-link.active,
- > .nav-link:hover {
- color: $sidebar-dark-submenu-hover-color;
- background: transparent;
- }
- }
- }
- // Sidebar form
- .sidebar-form {
- .form-control {
- background: $sidebar-dark-submenu-bg;
- border: 0;
- &,
- &:focus + .form-icon {
- color: $sidebar-dark-hover-color;
- }
- &:focus {
- background: lighten($sidebar-dark-submenu-bg, 7%);
- }
- }
- .form-icon {
- color: $sidebar-dark-color;
- }
- }
- }
- // Light Sidebar Mixin
- @mixin skin-light-sidebar($icon-active-color) {
- // Sidebar background color
- .main-sidebar,
- .main-sidebar:before {
- background-color: $sidebar-light-bg;
- }
- .content-wrapper,
- .main-footer {
- border-left: 1px solid $gray-500;
- }
- // User Panel (resides in the sidebar)
- .user-panel {
- > .info,
- > .info > .nav-link {
- color: $sidebar-light-color;
- }
- }
- // Sidebar Menu. First level links
- .sidebar-menu > .nav-item {
- transition: border-left-color .3s ease;
- // links
- > .nav-link {
- border-left: 3px solid transparent;
- font-weight: 600;
- &:focus {
- color: $sidebar-light-color;
- }
- }
- // Hover and active states
- &:hover > .nav-link,
- &.active > .nav-link {
- color: $sidebar-light-hover-color;
- background: $sidebar-light-hover-bg;
- }
- &:hover > .nav-link {
- }
- &.active {
- border-left-color: $icon-active-color;
- > .nav-link {
- font-weight: 600;
- }
- }
- // First Level Submenu
- > .nav-treeview {
- background: $sidebar-light-submenu-bg;
- }
- }
- // Section Headning
- .nav-header {
- color: lighten($sidebar-light-color, 25%);
- background: $sidebar-light-bg;
- }
- // All links within the sidebar menu
- .sidebar .nav-link {
- color: $sidebar-light-color;
- &:hover {
- text-decoration: none;
- }
- }
- // All submenus
- .nav-treeview {
- > .nav-item {
- > .nav-link {
- color: $sidebar-light-submenu-color;
- }
- &.active > .nav-link,
- > .nav-link:hover {
- color: $sidebar-light-submenu-hover-color;
- }
- &.active > .nav-link {
- font-weight: 600;
- }
- }
- }
- @include media-breakpoint-up(sm) {
- &.sidebar-mini.sidebar-collapse {
- .sidebar-menu > li > .nav-treeview {
- border-left: 1px solid $gray-500;
- }
- }
- }
- }
|