stylint
Version:
A linter for stylus
90 lines (73 loc) • 1.37 kB
text/stylus
/**
* full screen nav search stylz
*/
/**
* global nav overlay, appears on click
* 1 make sure we cover up global nav
*/
#nav-search
transition( all, $slow, false )
$brandon
display none
z-index 2 // 1
// search is only full screen on desktop
$med-max
display block
height 100px
opacity 1
position relative
// if desktop takeover full screen
$med-plus
background $white-2
fixed top 61px
// show on click
.search-active &
display block
opacity 1
// the form
fieldset
width 100%
$med-plus
absolute top 50%
margin-top -5em
// the input and label
input,
label
color $black
font-size 24px
letter-spacing .02em
width 100%
// not full screen below desktop
$med-max
height 100px
// desktop @TODO dont use em
$med-plus
font-size 5em
// the search field
input
border 0
// background isn't gray when full screen
$med-max
background $gray-1
// focus on the input
&:hover,
&:focus
opacity 1
outline 0
// fade out label on click
&:focus + label
opacity .2
// animate the label out
&:valid + label
transform( translate3d( -3em, 0, 0 ) )
opacity 0
// the search label
label
transition( opacity, $fast, false )
opacity .5
&:hover
cursor text
opacity 1
$med-max
margin-top -12px
top 50%