SCSS API
To keep the CSS file size as small as possible, many of the existing variables act as opt-ins for the CSS rule(s) behind them.
In addition, a few variables set the initial value for the associated CSS variables. This way they don’t have to be overwritten in the project.
$bem-root
Default: 'c-breadcrumbs'
Type: string
Defines the basic BEM class.
Usage:
$overflow-behavior
Default: 'wrap'
Type: 'wrap' | 'ellipsis'
Opt-in CSS Rule(s): Yes
Throws: @error
if the value is not 'wrap'
or 'ellipsis'
Select the behavior when the breadcrumbs become larger than the display area.
Wrap
lets elements that are too large for the area move to the next line.
Ellipsis
displays all breadcrumbs in a single line, no matter how wide the component gets. As the name implies, text-overflow: ellipsis;
is used here.
Usage:
$overflow-wrap-horizontal-spacing
Default: 1rem
Depends on the value of $overflow-behavior
. If $overflow-behavior
is set to 'wrap'
, this variable sets the horizontal spacing between the breadcrumbs.
Usage:
$color-link
Default: inherit
Initial value for --color-link-breadcrumbs
.
Defines the color rule for c-breadcrumbs__link
.
Usage:
$color-hover-link
Default: null
Opt-in CSS Rule(s): Yes
Sets the link color hover styles. If not set $transition-link-breadcrumbs
has no effect.
Usage:
$color-separator
Default: null
Opt-in CSS Rule(s): Yes
Sets the color of the separator.
Usage:
$color-is-current
Default: null
Opt-in CSS Rule(s): Yes
Sets the color of the current breadcrumb.
Usage:
$color-is-index
Default: null
Opt-in CSS Rule(s): Yes
Sets the color of the index breadcrumb.
Usage:
$size-font
Default: 1rem
Initial value for --size-font-breadcrumbs
.
Sets the font size of the breadcrumbs.
Usage:
$spacing-vertical-separator
Default: 6px
Initial value for --spacing-vertical-separator-breadcrumbs
.
Controls the vertical spacing of the separator.
Usage:
$icons-not-bigger-than-font-size
Default: true
Opt-in CSS Rule(s): Yes
Will set the max size of the icons to the same size as the font.
Usage:
$transition-link-breadcrumbs
Default: color 0.2s ease-in-out
Sets the transition for the link color. If $color-hover-link
is not set, this variable has no effect.
Usage:
$truncated
Default: false
If true
, truncated styles will be applied to the breadcrumbs.
Usage: