|
| 1 | +// main: _material.scss |
| 2 | + |
| 3 | +@mixin btn-shadow(){ |
| 4 | + @extend .shadow-z-2; |
| 5 | + transition: box-shadow transform 0.28s cubic-bezier(0.4, 0, 0.2, 1); |
| 6 | + &:active:not(.btn-link) { |
| 7 | + @extend .shadow-z-3; |
| 8 | + } |
| 9 | + |
| 10 | + &:hover { |
| 11 | + @extend .shadow-z-5; |
| 12 | + } |
| 13 | + |
| 14 | +} |
| 15 | + |
| 16 | +.btn { |
| 17 | + position: relative; |
| 18 | + padding: 8px 30px; |
| 19 | + border: 0; |
| 20 | + margin: 10px 1px; |
| 21 | + |
| 22 | + cursor: pointer; |
| 23 | + border-radius: 4px; |
| 24 | + text-transform: uppercase; |
| 25 | + text-decoration: none; |
| 26 | + color: $darkbg-text; |
| 27 | + |
| 28 | + &:hover { |
| 29 | + color: $darkbg-text; |
| 30 | + } |
| 31 | + &:hover:not(.btn-link) { |
| 32 | + @extend .shadow-z-2-hover; |
| 33 | + } |
| 34 | + transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1); |
| 35 | + &:active:not(.btn-link) { |
| 36 | + @extend .shadow-z-3; |
| 37 | + } |
| 38 | + outline: none !important; |
| 39 | +} |
| 40 | +// This is needed to style buttons which has not a variation suffix (they must stiled as btn-default) |
| 41 | +.btn-link, .btn:not([class^="btn btn-"]), .btn-default { |
| 42 | + color: $lightbg-text; |
| 43 | + &:hover { |
| 44 | + color: $lightbg-text; |
| 45 | + } |
| 46 | +} |
| 47 | +.btn:not([class^="btn btn-"]), .btn-default { |
| 48 | + &:hover { |
| 49 | + background-color: rgba(255,255,255,0.5); |
| 50 | + } |
| 51 | +} |
| 52 | + |
| 53 | +.btn-raised { |
| 54 | + @include btn-shadow(); |
| 55 | +} |
| 56 | + |
| 57 | +.open > .dropdown-toggle.btn { |
| 58 | + //.variations(#{""}, background-color, $btn-default); |
| 59 | +} |
| 60 | +.btn-flat { |
| 61 | + box-shadow: none !important; |
| 62 | + &.btn-default:hover { |
| 63 | + background: none; |
| 64 | + } |
| 65 | +} |
| 66 | + |
| 67 | +.btn-group, .btn-group-vertical { |
| 68 | + position: relative; |
| 69 | + border-radius: 4px; |
| 70 | + margin: 10px 1px; |
| 71 | + |
| 72 | + @include btn-shadow(); |
| 73 | + &.open .dropdown-toggle { |
| 74 | + box-shadow: none; |
| 75 | + } |
| 76 | + &.btn-group-raised { |
| 77 | + @include btn-shadow(); |
| 78 | + } |
| 79 | + .btn, .btn:active, .btn-group { |
| 80 | + box-shadow: none !important; |
| 81 | + margin: 0; |
| 82 | + } |
| 83 | + .btn:active .caret { margin-left: -1px; } |
| 84 | +} |
| 85 | +.btn-group-flat { |
| 86 | + box-shadow: none !important; |
| 87 | +} |
| 88 | + |
| 89 | +// Floating Action Button (FAB) |
| 90 | + |
| 91 | +.btn-fab { |
| 92 | + margin: 0; |
| 93 | + padding: 15px; |
| 94 | + font-size: 26px; |
| 95 | + width: 56px; |
| 96 | + height: 56px; |
| 97 | + &, &:hover { |
| 98 | + //.variations(#{""}, background-color, transparent); |
| 99 | + } |
| 100 | + &, .ripple-wrapper { |
| 101 | + border-radius: 100%; |
| 102 | + } |
| 103 | + &.btn-mini { |
| 104 | + width: 40px; |
| 105 | + height: 40px; |
| 106 | + padding: 13px; |
| 107 | + font-size: 15px; |
| 108 | + } |
| 109 | +} |
| 110 | + |
| 111 | +// Alert buttons |
| 112 | +// -------------------------------------------------- |
| 113 | + |
| 114 | +.btn-default { |
| 115 | + @include button-variant($btn-default); |
| 116 | +} |
| 117 | +.btn-primary { |
| 118 | + @include button-variant($primary); |
| 119 | +} |
| 120 | +// Success appears as green |
| 121 | +.btn-success { |
| 122 | + @include button-variant($success); |
| 123 | +} |
| 124 | +// Info appears as blue-green |
| 125 | +.btn-info { |
| 126 | + @include button-variant($info); |
| 127 | +} |
| 128 | +// Warning appears as orange |
| 129 | +.btn-warning { |
| 130 | + @include button-variant($warning); |
| 131 | +} |
| 132 | +// Danger and error appear as red |
| 133 | +.btn-danger { |
| 134 | + @include button-variant($danger); |
| 135 | +} |
| 136 | + |
| 137 | +// Material shades |
| 138 | +.btn-material-red { |
| 139 | + @include button-variant($red) |
| 140 | +} |
| 141 | +.btn-material-pink { |
| 142 | + @include button-variant($pink); |
| 143 | +} |
| 144 | +.btn-material-purple { |
| 145 | + @include button-variant($purple); |
| 146 | +} |
| 147 | +.btn-material-deeppurple { |
| 148 | + @include button-variant($deeppurple); |
| 149 | +} |
| 150 | +.btn-material-indigo { |
| 151 | + @include button-variant($indigo); |
| 152 | +} |
| 153 | +.btn-material-lightblue { |
| 154 | + @include button-variant($lightblue); |
| 155 | +} |
| 156 | +.btn-material-cyan { |
| 157 | + @include button-variant($cyan); |
| 158 | +} |
| 159 | +.btn-material-teal { |
| 160 | + @include button-variant($teal); |
| 161 | +} |
| 162 | +.btn-material-lightgreen { |
| 163 | + @include button-variant($lightgreen); |
| 164 | +} |
| 165 | +.btn-material-lime { |
| 166 | + @include button-variant($lime); |
| 167 | +} |
| 168 | +.btn-material-lightyellow { |
| 169 | + @include button-variant($lightyellow); |
| 170 | +} |
| 171 | +.btn-material-orange { |
| 172 | + @include button-variant($orange); |
| 173 | +} |
| 174 | +.btn-material-deeporange { |
| 175 | + @include button-variant($deeporange); |
| 176 | +} |
| 177 | +.btn-material-grey { |
| 178 | + @include button-variant($grey); |
| 179 | +} |
| 180 | +.btn-material-bluegrey { |
| 181 | + @include button-variant($bluegrey); |
| 182 | +} |
| 183 | +.btn-material-brown { |
| 184 | + @include button-variant($brown); |
| 185 | +} |
| 186 | +.btn-material-lightgrey { |
| 187 | + @include button-variant($lightgrey); |
| 188 | +} |
| 189 | + |
0 commit comments