UNPKG

1.86 kBSCSSView Raw
1//
2// Copyright IBM Corp. 2016, 2018
3//
4// This source code is licensed under the Apache-2.0 license found in the
5// LICENSE file in the root directory of this source tree.
6//
7
8@import '../../globals/scss/vars';
9@import '../../globals/scss/css--reset';
10@import '../../globals/scss/helper-mixins';
11@import '../../globals/scss/vendor/@carbon/elements/scss/import-once/import-once';
12@import '../../globals/scss/layout';
13@import '../link/link';
14
15/// Breadcrumb styles
16/// @access private
17/// @group breadcrumb
18@mixin breadcrumb {
19 .#{$prefix}--breadcrumb {
20 @include reset;
21 @include type-style('body-short-01');
22
23 display: inline;
24
25 @include carbon--breakpoint(md) {
26 display: flex;
27 flex-wrap: wrap;
28 }
29 }
30
31 .#{$prefix}--breadcrumb-item {
32 position: relative;
33 display: flex;
34 align-items: center;
35 margin-right: $carbon--spacing-03;
36 }
37
38 .#{$prefix}--breadcrumb-item .#{$prefix}--link:visited {
39 color: $link-01;
40 }
41
42 .#{$prefix}--breadcrumb-item::after {
43 margin-left: $carbon--spacing-03;
44 color: $text-01;
45 content: '/';
46 }
47
48 .#{$prefix}--breadcrumb--no-trailing-slash
49 .#{$prefix}--breadcrumb-item:last-child::after {
50 content: '';
51 }
52
53 .#{$prefix}--breadcrumb-item:last-child,
54 .#{$prefix}--breadcrumb-item:last-child::after {
55 margin-right: 0;
56 }
57
58 .#{$prefix}--breadcrumb .#{$prefix}--link {
59 white-space: nowrap;
60 }
61
62 .#{$prefix}--breadcrumb-item [aria-current='page'],
63 .#{$prefix}--breadcrumb-item.#{$prefix}--breadcrumb-item--current
64 .#{$prefix}--link {
65 color: $text-01;
66 cursor: auto;
67
68 &:hover {
69 text-decoration: none;
70 }
71 }
72
73 // Skeleton State
74 .#{$prefix}--breadcrumb.#{$prefix}--skeleton .#{$prefix}--link {
75 @include skeleton;
76
77 width: rem(100px);
78 height: 1rem;
79 }
80}
81
82@include exports('breadcrumb') {
83 @include breadcrumb;
84}