mirror of
https://github.com/jgthms/bulma
synced 2026-03-22 21:14:30 -07:00
Add nav, Enhance tabs
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
@import "menu"
|
||||
@import "message"
|
||||
@import "modal"
|
||||
@import "nav"
|
||||
@import "navbar"
|
||||
@import "pagination"
|
||||
@import "panel"
|
||||
|
||||
104
sass/components/nav.sass
Normal file
104
sass/components/nav.sass
Normal file
@@ -0,0 +1,104 @@
|
||||
.nav
|
||||
align-items: stretch
|
||||
background: $white
|
||||
display: flex
|
||||
min-height: $nav-height
|
||||
position: relative
|
||||
text-align: center
|
||||
z-index: 2
|
||||
& > .container
|
||||
align-items: stretch
|
||||
display: flex
|
||||
min-height: $nav-height
|
||||
width: 100%
|
||||
+tablet
|
||||
& > .container
|
||||
& > .nav-left
|
||||
margin-left: -10px
|
||||
& > .nav-right
|
||||
margin-left: -10px
|
||||
|
||||
.nav-toggle
|
||||
@extend .hamburger
|
||||
// Responsiveness
|
||||
+tablet
|
||||
display: none
|
||||
|
||||
// Elements
|
||||
|
||||
.nav-item
|
||||
align-items: center
|
||||
display: flex
|
||||
justify-content: center
|
||||
padding: 10px
|
||||
a
|
||||
flex-grow: 1
|
||||
img
|
||||
max-height: 24px
|
||||
.button + .button
|
||||
margin-left: 10px
|
||||
.tag
|
||||
&:first-child
|
||||
margin-right: 5px
|
||||
&:last-child
|
||||
margin-left: 5px
|
||||
// Responsiveness
|
||||
+mobile
|
||||
justify-content: flex-start
|
||||
|
||||
.nav-item a,
|
||||
a.nav-item
|
||||
color: $text
|
||||
&:hover
|
||||
color: $link-hover
|
||||
// Modifiers
|
||||
&.is-active
|
||||
color: $link-active
|
||||
|
||||
.nav-tab
|
||||
align-items: center
|
||||
border-bottom: 1px solid transparent
|
||||
color: $text
|
||||
display: block
|
||||
height: $nav-height
|
||||
line-height: 24px
|
||||
padding: 13px 15px
|
||||
&:hover
|
||||
border-bottom: 1px solid $link
|
||||
// Modifiers
|
||||
&.is-active
|
||||
border-bottom: 3px solid $link
|
||||
color: $link
|
||||
|
||||
// Containers
|
||||
|
||||
.nav-menu
|
||||
// Responsiveness
|
||||
+mobile
|
||||
background: $white
|
||||
box-shadow: 0 4px 7px rgba($black, 0.1)
|
||||
left: 0
|
||||
display: none
|
||||
right: 0
|
||||
top: 100%
|
||||
position: absolute
|
||||
.nav-item
|
||||
border-top: 1px solid rgba($border, 0.5)
|
||||
padding: 10px
|
||||
// Modifiers
|
||||
&.is-active
|
||||
display: block
|
||||
|
||||
.nav-left
|
||||
align-items: stretch
|
||||
display: flex
|
||||
flex: 1
|
||||
overflow: hidden
|
||||
overflow-x: auto
|
||||
white-space: nowrap
|
||||
|
||||
.nav-right
|
||||
align-items: stretch
|
||||
// Responsiveness
|
||||
+tablet
|
||||
display: flex
|
||||
@@ -1,5 +1,9 @@
|
||||
.tabs
|
||||
@extend .block
|
||||
@extend .unselectable
|
||||
align-items: stretch
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
line-height: 24px
|
||||
overflow: hidden
|
||||
overflow-x: auto
|
||||
@@ -11,78 +15,70 @@
|
||||
display: flex
|
||||
justify-content: center
|
||||
margin-bottom: -1px
|
||||
padding: 5px 0
|
||||
padding: 6px 12px
|
||||
vertical-align: top
|
||||
&:hover
|
||||
border-bottom-color: $text-strong
|
||||
color: $text-strong
|
||||
li
|
||||
display: block
|
||||
vertical-align: top
|
||||
& + li
|
||||
margin-left: 20px
|
||||
// Modifiers
|
||||
&.is-active
|
||||
a
|
||||
border-bottom-color: $link
|
||||
color: $link
|
||||
ul
|
||||
align-items: center
|
||||
border-bottom: 1px solid $border
|
||||
display: flex
|
||||
flex: 1
|
||||
justify-content: flex-start
|
||||
&.is-left
|
||||
padding-right: 10px
|
||||
&.is-center
|
||||
flex: none
|
||||
justify-content: center
|
||||
padding-left: 10px
|
||||
padding-right: 10px
|
||||
&.is-right
|
||||
justify-content: flex-end
|
||||
padding-left: 10px
|
||||
.icon
|
||||
&:first-child
|
||||
margin-right: 5px
|
||||
margin-right: 8px
|
||||
&:last-child
|
||||
margin-left: 5px
|
||||
// Modifiers
|
||||
margin-left: 8px
|
||||
// Alignment
|
||||
&.is-centered
|
||||
ul
|
||||
justify-content: center
|
||||
&.is-right
|
||||
ul
|
||||
justify-content: flex-end
|
||||
// Styles
|
||||
&.is-boxed
|
||||
a
|
||||
border: 1px solid transparent
|
||||
border-radius: $radius $radius 0 0
|
||||
padding: 5px 15px
|
||||
padding-bottom: 5px
|
||||
padding-top: 5px
|
||||
&:hover
|
||||
background: $background
|
||||
border-bottom-color: $border
|
||||
li
|
||||
& + li
|
||||
margin-left: 5px
|
||||
// Modifiers
|
||||
&.is-active
|
||||
a
|
||||
background: $white
|
||||
border-color: $border
|
||||
border-bottom-color: transparent
|
||||
// Modifiers
|
||||
&.is-centered
|
||||
li
|
||||
&,
|
||||
& + li
|
||||
margin: 0 2px
|
||||
&.is-centered
|
||||
a
|
||||
padding: 5px 10px
|
||||
li
|
||||
& + li
|
||||
margin-left: 0
|
||||
ul
|
||||
justify-content: center
|
||||
text-align: center
|
||||
&.is-fullwidth
|
||||
li
|
||||
flex: 1
|
||||
& + li
|
||||
margin-left: 0
|
||||
ul
|
||||
justify-content: center
|
||||
text-align: center
|
||||
&.is-right
|
||||
ul
|
||||
justify-content: flex-end
|
||||
&.is-toggle
|
||||
a
|
||||
border: 1px solid $border
|
||||
margin-bottom: 0
|
||||
padding: 5px 10px
|
||||
padding-bottom: 5px
|
||||
padding-top: 5px
|
||||
position: relative
|
||||
&:hover
|
||||
background: $background
|
||||
@@ -95,7 +91,6 @@
|
||||
border-radius: $radius 0 0 $radius
|
||||
&:last-child a
|
||||
border-radius: 0 $radius $radius 0
|
||||
// Modifiers
|
||||
&.is-active
|
||||
a
|
||||
background: $primary
|
||||
@@ -104,3 +99,31 @@
|
||||
z-index: 1
|
||||
ul
|
||||
border-bottom: none
|
||||
// Sizes
|
||||
&.is-small
|
||||
font-size: $size-small
|
||||
a
|
||||
padding: 2px 8px
|
||||
&.is-boxed,
|
||||
&.is-toggle
|
||||
a
|
||||
padding-bottom: 1px
|
||||
padding-top: 1px
|
||||
&.is-medium
|
||||
font-size: $size-medium
|
||||
a
|
||||
padding: 10px 16px
|
||||
&.is-boxed,
|
||||
&.is-toggle
|
||||
a
|
||||
padding-bottom: 9px
|
||||
padding-top: 9px
|
||||
&.is-large
|
||||
font-size: $size-large
|
||||
a
|
||||
padding: 14px 20px
|
||||
&.is-boxed,
|
||||
&.is-toggle
|
||||
a
|
||||
padding-bottom: 13px
|
||||
padding-top: 13px
|
||||
|
||||
Reference in New Issue
Block a user