123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- /*
- * General: Mixins
- * ---------------
- */
- // Cards Variant
- @mixin cards-variant($name, $color) {
- .card-#{$name} {
- &:not(.card-outline) {
- .card-header {
- background-color: $color;
- border-bottom: 0;
- &,
- a {
- color: color-yiq($color);
- }
- }
- }
- &.card-outline {
- border-top: 3px solid $color;
- }
- }
- .bg-#{$name},
- .bg-#{$name}-gradient,
- .card-#{$name}:not(.card-outline) {
- .btn-tool {
- color: rgba(color-yiq($color), 0.8);
- &:hover {
- color: color-yiq($color);
- }
- }
- }
- .card.bg-#{$name},
- .card.bg-#{$name}-gradient {
- .bootstrap-datetimepicker-widget {
- .table td,
- .table th {
- border: none;
- }
- table thead tr:first-child th:hover,
- table td.day:hover,
- table td.hour:hover,
- table td.minute:hover,
- table td.second:hover {
- background: darken($color, 8%);
- color: color-yiq($color);
- }
- table td.active,
- table td.active:hover {
- background: lighten($color, 10%);
- color: color-yiq($color);
- }
- }
- }
- }
- // Sidebar Color
- @mixin sidebar-color($color) {
- .nav-sidebar > .nav-item {
- & > .nav-link.active {
- background-color: $color;
- color: color-yiq($color);
- }
- }
- }
- @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;
- .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,
- &:focus {
- background: $hover-bg;
- color: $hover-color;
- }
- }
- }
- // Logo color variation
- @mixin logo-variant($bg-color, $color: #fff, $border-bottom-color: transparent, $border-bottom-width: 0) {
- background-color: $bg-color;
- border-bottom: $border-bottom-width solid $border-bottom-color;
- color: $color;
- &:hover,
- &:focus {
- background-color: darken($bg-color, 1%);
- }
- }
- // Direct Chat Variant
- @mixin direct-chat-variant($bg-color, $color: #fff) {
- .right > .direct-chat-text {
- background: $bg-color;
- border-color: $bg-color;
- color: color-yiq($bg-color);
- &:after,
- &::before {
- border-left-color: $bg-color;
- }
- }
- }
- @mixin translate($x, $y) {
- 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);
- }
|