bulma/sass/components/breadcrumb.sass

86 lines
2.5 KiB
Sass
Raw Normal View History

$breadcrumb-font-size: var(--size-normal, #{$size-normal}) !default
$breadcrumb-item-color: var(--link, #{$link}) !default
$breadcrumb-item-hover-color: var(--link-hover, #{$link-hover}) !default
$breadcrumb-item-active-color: var(--text-strong, #{$text-strong}) !default
2017-07-28 20:05:15 +00:00
2018-04-09 09:35:44 +00:00
$breadcrumb-item-padding-vertical: 0 !default
$breadcrumb-item-padding-horizontal: 0.75em !default
$breadcrumb-item-separator-color: var(--border-hover, #{$border-hover}) !default
2017-07-28 20:05:15 +00:00
.breadcrumb
--breadcrumb-font-size: #{$content-font-size}
--breadcrumb-item-color: #{$breadcrumb-item-color}
--breadcrumb-item-hover-color: #{$breadcrumb-item-hover-color}
--breadcrumb-item-active-color: #{$breadcrumb-item-active-color}
--breadcrumb-item-separator-color: #{$breadcrumb-item-separator-color}
--breadcrumb-item-padding-vertical: #{$breadcrumb-item-padding-vertical}
--breadcrumb-item-padding-horizontal: #{$breadcrumb-item-padding-horizontal}
2018-09-04 13:24:50 +00:00
@extend %block
@extend %unselectable
font-size: var(--breadcrumb-font-size)
white-space: nowrap
a
align-items: center
color: var(--breadcrumb-item-color)
display: flex
justify-content: center
padding: var(--breadcrumb-item-padding-vertical) var(--breadcrumb-item-padding-horizontal)
&:hover
2020-08-23 11:08:53 +00:00
--breadcrumb-item-color: var(--breadcrumb-item-hover-color)
li
align-items: center
display: flex
2017-09-18 21:37:58 +00:00
&:first-child a
2020-01-22 09:14:04 +00:00
+ltr-property("padding", 0, false)
&.is-active
a
2020-08-23 11:08:53 +00:00
--breadcrumb-item-color: var(--breadcrumb-item-active-color)
cursor: default
pointer-events: none
2017-07-28 20:05:15 +00:00
& + li::before
color: var(--breadcrumb-item-separator-color)
2017-07-28 20:05:15 +00:00
content: "\0002f"
2018-04-09 11:45:52 +00:00
ul,
ol
align-items: flex-start
display: flex
2018-04-09 11:45:52 +00:00
flex-wrap: wrap
justify-content: flex-start
.icon
&:first-child
2020-01-22 09:14:04 +00:00
+ltr-property("margin", 0.5em)
&:last-child
2020-01-22 09:14:04 +00:00
+ltr-property("margin", 0.5em, false)
// Alignment
&.is-centered
2018-04-09 11:45:52 +00:00
ol,
2018-04-13 15:17:50 +00:00
ul
justify-content: center
&.is-right
2018-04-09 11:45:52 +00:00
ol,
2018-04-13 15:17:50 +00:00
ul
justify-content: flex-end
// Sizes
&.is-small
--breadcrumb-font-size: var(--size-small, #{$size-small})
&.is-medium
--breadcrumb-font-size: var(--size-medium, #{$size-medium})
&.is-large
--breadcrumb-font-size: var(--size-large, #{$size-large})
// Styles
&.has-arrow-separator
2017-07-28 20:05:15 +00:00
li + li::before
content: "\02192"
&.has-bullet-separator
2017-07-28 20:05:15 +00:00
li + li::before
content: "\02022"
&.has-dot-separator
2017-07-28 20:05:15 +00:00
li + li::before
content: "\000b7"
&.has-succeeds-separator
2017-07-28 20:05:15 +00:00
li + li::before
content: "\0227B"