bulma/sass/layout/header.sass

159 lines
2.6 KiB
Sass
Raw Normal View History

$header-height: 50px !default
2016-01-24 00:03:43 +00:00
.header
+clearfix
background: $white
display: flex
2016-01-24 00:03:43 +00:00
line-height: 24px
2016-05-07 22:40:06 +00:00
min-height: $header-height
2016-01-24 00:03:43 +00:00
position: relative
text-align: center
z-index: 2
.container
align-items: stretch
2016-01-24 00:03:43 +00:00
display: flex
2016-05-07 22:40:06 +00:00
min-height: $header-height
width: 100%
2016-04-10 15:56:27 +00:00
// Modifiers
2016-02-27 13:29:54 +00:00
&.has-shadow
2016-05-07 22:40:06 +00:00
box-shadow: 0 2px 3px rgba($black, 0.1)
2016-04-10 15:56:27 +00:00
// Responsiveness
2016-02-27 13:29:54 +00:00
+mobile
.container
flex-direction: column
2016-01-31 22:27:58 +00:00
+tablet
height: $header-height
2016-01-24 00:03:43 +00:00
.header-toggle
@extend .hamburger
2016-02-27 13:29:54 +00:00
position: absolute
right: 0
top: 0
2016-04-10 15:56:27 +00:00
// Responsiveness
2016-01-24 00:03:43 +00:00
+tablet
display: none
// Elements
.header-item
align-items: center
display: flex
padding: 10px
2016-01-24 00:03:43 +00:00
a
flex-grow: 1
2016-04-10 15:56:27 +00:00
img
max-height: 24px
.button + .button
margin-left: 10px
2016-01-24 00:03:43 +00:00
.fa
font-size: 21px
line-height: 24px
2016-04-10 15:00:32 +00:00
.tag
&:first-child
margin-right: 5px
&:last-child
margin-left: 5px
2016-04-10 15:56:27 +00:00
// Responsiveness
2016-02-27 13:29:54 +00:00
+mobile
text-align: left
2016-01-24 00:03:43 +00:00
2016-03-25 13:38:40 +00:00
.header-item a,
a.header-item
color: $text
&:hover
color: $link-hover
2016-04-10 15:56:27 +00:00
// Modifiers
2016-03-25 13:38:40 +00:00
&.is-active
color: $link-active
2016-01-24 00:03:43 +00:00
.header-tab
align-items: center
2016-01-24 00:03:43 +00:00
border-bottom: 1px solid transparent
color: $text
display: block
height: $header-height
line-height: 24px
padding: 13px 15px
&:hover
border-bottom: 1px solid $link
2016-04-10 15:56:27 +00:00
// Modifiers
2016-01-24 00:03:43 +00:00
&.is-active
border-bottom: 3px solid $link
color: $link
// Containers
.header-left
align-items: stretch
2016-01-24 00:03:43 +00:00
display: flex
flex: 1
overflow: hidden
overflow-x: auto
white-space: nowrap
2016-04-10 15:56:27 +00:00
// Responsiveness
2016-02-27 13:29:54 +00:00
+mobile
height: $header-height
+desktop
2016-04-10 15:56:27 +00:00
margin-left: -10px
2016-01-24 00:03:43 +00:00
.header-right
align-items: stretch
2016-04-10 15:56:27 +00:00
// Responsiveness
2016-01-24 00:03:43 +00:00
+tablet
display: flex
+desktop
2016-04-10 15:56:27 +00:00
margin-right: -10px
2016-01-24 00:03:43 +00:00
.header-full
align-items: stretch
display: flex
justify-content: center
text-align: center
width: 100%
& > .header-item
align-items: stretch
display: flex
flex: 1
justify-content: center
padding: 0
& > a
align-items: center
display: flex
justify-content: center
width: 100%
.header-menu
2016-04-10 15:56:27 +00:00
// Responsiveness
2016-01-24 00:03:43 +00:00
+mobile
box-shadow: 0 4px 7px rgba($black, 0.1)
2016-01-24 00:03:43 +00:00
display: none
.header-item
border-top: 1px solid rgba($border, 0.5)
padding: 10px
2016-04-10 15:56:27 +00:00
// Modifiers
2016-01-24 00:03:43 +00:00
&.is-active
display: block
// States
.header.is-centered
justify-content: center
.header-left,
.header-right
justify-content: center
.header.is-small
background: $background
box-shadow: none
height: 40px
z-index: 1
.container
height: 40px
.header-tab
font-size: 13px
height: 40px
padding: 8px 10px
&:hover,
&.is-active
border-bottom-width: 2px