hacks-guide-minimal-mistake.../assets/_scss/_buttons.scss

136 lines
2.4 KiB
SCSS
Raw Normal View History

2016-03-10 17:13:54 +01:00
/* ==========================================================================
BUTTONS
========================================================================== */
/*
Default button
========================================================================== */
.btn {
/* default button */
display: inline-block;
margin-bottom: 0.25em;
padding: 10px 20px;
color: #fff !important;
font-family: $sans-serif;
font-size: 0.8rem;
font-weight: bold;
line-height: 1.5;
text-align: center;
2016-03-10 19:06:59 +01:00
text-decoration: none;
2016-03-10 17:13:54 +01:00
background-color: #000;
border: 0 !important;
border-radius: $border-radius;
cursor: pointer;
2016-03-21 21:36:24 +01:00
2016-03-10 17:13:54 +01:00
&:hover {
background-color: mix(white, #000, 20%);
}
2016-03-21 21:36:24 +01:00
2016-03-10 17:13:54 +01:00
.icon {
margin-right: 0.5em;
}
2016-03-21 21:36:24 +01:00
2016-03-10 17:13:54 +01:00
.icon + .hidden {
margin-left: -0.5em; // override for hidden text
}
/* fills width of parent container */
&--block {
display: block;
width: 100%;
2016-03-21 21:36:24 +01:00
2016-03-10 17:13:54 +01:00
+ .btn--block {
margin-top: 0.25em;
}
}
/* for dark backgrounds */
&--inverse {
2016-03-23 03:59:39 +01:00
color: $gray !important;
border: 1px solid $light-gray !important; // override
2016-03-10 17:13:54 +01:00
background-color: #fff;
2016-03-21 21:36:24 +01:00
2016-03-10 17:13:54 +01:00
&:hover {
2016-03-23 03:59:39 +01:00
color: #fff !important;
border-color: $gray;
2016-03-10 17:13:54 +01:00
}
}
/* light outline */
&--light-outline {
border: 1px solid #fff !important; // override
background-color: transparent;
}
/* information */
&--info {
background-color: $info-color;
2016-03-21 21:36:24 +01:00
2016-03-10 17:13:54 +01:00
&:hover {
background-color: mix(#000, $info-color, 20%);
}
}
/* warning */
&--warning {
background-color: $warning-color;
2016-03-21 21:36:24 +01:00
2016-03-10 17:13:54 +01:00
&:hover {
background-color: mix(#000, $warning-color, 20%);
}
}
/* success */
&--success {
background-color: $success-color;
2016-03-21 21:36:24 +01:00
2016-03-10 17:13:54 +01:00
&:hover {
background-color: mix(#000, $success-color, 20%);
}
}
/* danger */
&--danger {
background-color: $danger-color;
2016-03-21 21:36:24 +01:00
2016-03-10 17:13:54 +01:00
&:hover {
background-color: mix(#000, $danger-color, 20%);
}
}
/* disabled */
&--disabled {
pointer-events: none;
cursor: not-allowed;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
opacity: 0.65;
}
/* social buttons */
$social:
(facebook, $facebook-color),
(twitter, $twitter-color),
(google-plus, $google-plus-color);
@each $socialnetwork, $color in $social {
&--#{$socialnetwork} {
background-color: $color;
2016-03-21 21:36:24 +01:00
2016-03-10 17:13:54 +01:00
&:hover {
background-color: mix(#000, $color, 20%);
}
}
}
2016-03-21 21:36:24 +01:00
}