1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-11 23:55:16 +01:00
blog/_src/_assets/styl/buttons.styl

230 lines
5.2 KiB
Stylus

//
// kremalicious3
// --------------
// Buttons
//
// Reset default button element
button
padding: 0
cursor: pointer
background: transparent
border: 0
-webkit-appearance: none
&:active
background: $link-color
transition: none
text-shadow: none
.btn,
a.btn
@extend .textcenter
display: inline-block
margin-bottom: 0
font-weight: normal
vertical-align: middle
touch-action: manipulation
cursor: pointer
background-image: none // Reset unusual Firefox-on-Android default style
white-space: nowrap
user-select: none
transition: all .2s ease-in-out
// Default Button
button-size($padding-base-vertical, $padding-base-horizontal, $font-size-small, $line-height-base, $border-radius-base)
background-color: rgba(255,255,255,.1)
border: 1px solid rgba(94,131,162,.3)
border-bottom-color: rgba(94,131,162,.4)
font-family: $headings-font-family
font-weight: $headings-font-weight
color: $brand-grey
text-transform: uppercase
box-shadow: 0 1px 3px alpha($brand-grey-light, .2), inset 0 1px 0 rgba(255,255,255,.7)
&:hover,
&:focus
outline: 0
background-color: rgba(255,255,255,.5)
&:active
color: $brand-grey
border-color: rgba(94,131,162,.3)
background-color: transparent
box-shadow: 0 1px 0 #fff
transition: none
&:focus
outline: 0
border-color: $input-border-focus
// Disabled State
&.disabled,
&[disabled],
fieldset[disabled] &
cursor: not-allowed
pointer-events: none // Future-proof disabling of clicks
opacity: .6
box-shadow: none
// grid buttons
&.col2,
&.col3
margin-bottom: ($line-height-computed/2)
@media $breakpoint2
margin-bottom: 0
.btn span
font-size: .9em
color: rgba(19, 56, 50, .6)
margin-left: .3em
// Primary Button
.btn-primary,
a.btn-primary
color: darken($link-color, 50%)
text-shadow: 0 1px 0 rgba(255,255,255,.3)
background: lighten($link-color, 15%)
border-color: $link-color
box-shadow: 0 1px 3px $brand-grey-light, inset 0 1px 0 rgba(255,255,255,.4)
&:hover,
&:focus
color: darken($link-color, 50%)
background-color: lighten($link-color, 25%)
text-shadow: 0 1px 0 rgba(255,255,255,.3)
&:active
color: darken($link-color, 50%)
border-color: darken($link-color, 10%)
background-color: lighten($link-color, 15%)
.more-link
font-family: $headings-font-family
font-weight: $headings-font-weight
font-size: $font-size-small
color: $link-color
text-transform: uppercase
// icon
.icon
top: .15em
position: relative
width: 18px
height: 18px
.btn-block
display: block
//
// Tweet button
//
.btn.twitter-share
display: inline-block
padding: 1px 3px 0 3px
height: 21px
border: 1px solid #ccc
border-radius: 3px
font: bold 11px/17px Helvetica, Arial, sans-serif
text-align: left
color: #333
text-transform: none
text-decoration: none
text-shadow: 0 1px 0 rgba(255, 255, 255, .5)
background-color: #f8f8f8
background-image: linear-gradient(to bottom, #fff, #dedede)
vertical-align: top
box-shadow: none
&:hover,
&:focus,
&:active
border-color: #bbb
background-color: #d9d9d9
background-image: linear-gradient(to bottom, #f8f8f8, #d9d9d9)
&:active
top: 0
background-color: #efefef
box-shadow: inset 0 3px 5px rgba(0,0,0, .1)
// icon
.icon
width: 15px
height: 15px
margin: 1px 3px 0 0
fill: #0089cb
float: left
// Close button
/////////////////////////////////////
.close
@extend .textcenter, .transition
width: 14px
height: 14px
padding: 0
border-radius: 50%
display: block
background: lighten($brand-grey-light, 50%)
color: #fff
line-height: 1
font-size: $font-size-mini
&:hover,
&:focus
background: $link-color-hover
color: #fff
cursor: pointer
outline: 0
// some helper classes for old content
/////////////////////////////////////
.content-download
@extend .grid, .grid--gutters
display: block
margin-top: 0
@media $breakpoint1
display: flex
margin-top: -($gutter-space)
a
@extend .btn, .grid__col
margin: $gutter-space 0 0 $gutter-space
display: block
span
font-size: $font-size-mini
color: $text-color-light
.icon-download,
.icon-heart,
.icon-wordpress,
.icon-github,
.icon-eye
&:before
content: ""
width: 18px
height: 18px
display: inline-block
margin-right: 5px
margin-bottom: -3px
opacity: .35
background: url('/assets/img/entypo-arrow-with-circle-down.svg') no-repeat left center
.icon-heart:before
background-image: url('/assets/img/entypo-heart.svg')
.icon-github:before
background-image: url('/assets/img/entypo-github.svg')
.icon-eye:before
background-image: url('/assets/img/entypo-eye.svg')