1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-24 02:38:15 +04:00
Files
tabler/scss/ui/_buttons.scss
2019-10-17 21:59:39 +02:00

162 lines
2.5 KiB
SCSS

.btn {
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow: 0 1px 1px rgba(0, 0, 0, .03);
letter-spacing: 0.01em;
&:not([class^='btn-outline']):not([class*=' btn-outline']):not(.btn-secondary) {
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .05), inset 0 2px 0 -1px rgba(255, 255, 255, .1);
text-shadow: 1px 1px 0 rgba(0, 0, 0, .05);
svg.icon {
filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .05));
}
}
.icon {
font-size: 1.2em;
vertical-align: sub;
margin: 0 .5em 0 -.25em;
}
.icon-right {
margin: 0 -.25em 0 .5em;
}
svg.icon {
width: 1em;
height: 1em;
stroke-width: 1.5;
}
}
.btn-sm {
font-weight: 400;
}
.btn-avatar {
margin: 0 .25rem 0 -.25rem;
@at-root .btn #{&} {
width: 1.25rem;
height: 1.25rem;
}
}
.btn-pill {
padding-right: 1.5em;
padding-left: 1.5em;
border-radius: 10rem;
}
// stylelint-disable declaration-no-important
.btn-link {
box-shadow: none !important;
}
.btn-secondary {
@include button-variant(#fff, $border-color, $text-muted);
}
.btn-square {
border-radius: 0;
}
.btn-icon {
}
.btn-list {
margin-bottom: -.5rem;
font-size: 0;
> .btn,
> .dropdown {
margin-bottom: .5rem;
&:not(:last-child) {
margin-right: .5rem;
}
}
}
@if $generate-social-colors {
@each $vendor, $color in $social-colors {
.btn-#{$vendor} {
@include button-variant($color, $color);
}
}
}
@if $generate-colors {
@each $name, $color in $colors {
.btn-#{$name} {
@include button-variant($color, $color);
}
.btn-outline-#{$name} {
@include button-outline-variant($color, $color);
}
}
}
.btn-loader {
display: none;
width: 1em;
height: 1em;
color: inherit;
@at-root .btn-loading & {
display: inline-block;
}
}
.btn-options {
display: flex;
align-items: center;
padding: 0;
color: $text-muted;
cursor: pointer;
background: none;
border: none;
&:focus {
outline: 0;
}
.icon {
width: 1rem;
height: 1rem;
}
}
.btn-floating {
position: fixed;
right: 1.5rem;
bottom: 1.5rem;
z-index: 1030;
}
/**
Button with label
*/
.btn-label {
position: relative;
padding-left: px2rem(48px);
}
.btn-label-icon {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: px2rem(36px);
padding-top: px2rem(6px);
padding-bottom: px2rem(6px);
margin-bottom: 0;
line-height: inherit;
cursor: pointer;
background-color: rgba(0, 0, 0, .1);
}