Skip to content

Commit 36d7b47

Browse files
author
Cathy Siller
committed
refactor(helix-breadcrumbs): replicate spec for helix ui
1 parent 47cc254 commit 36d7b47

File tree

3 files changed

+97
-14
lines changed

3 files changed

+97
-14
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/* ========== hxBreadcrumbs ========== */
2+
.hxBreadcrumb {
3+
align-content: center;
4+
align-items: center;
5+
display: flex;
6+
font-size: 12px;
7+
font-weight: 500;
8+
height: 1.75rem;
9+
margin-bottom: 1rem;
10+
text-transform: uppercase;
11+
12+
& > a {
13+
margin-right: 0.5rem;
14+
15+
&:last-of-type {
16+
color: @gray-600;
17+
font-weight: 300;
18+
pointer-events: none;
19+
}
20+
}
21+
22+
.delimiter {
23+
color: @gray-600;
24+
margin-right: 0.5rem;
25+
26+
svg {
27+
fill: currentColor;
28+
stroke: none;
29+
}
30+
}
31+
}
Lines changed: 65 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,76 @@
11
---
22
title: Breadcrumbs
33
assets:
4-
- bootstrap.helix.css
4+
- helix-ui.css
55
---
66
<!-- explanation goes here -->
77

88
<div class="demo">
9-
<ul class="breadcrumb">
10-
<li class="active">Home</li>
11-
</ul>
9+
<nav class="hxBreadcrumb">
10+
<a href="#">Home</a>
11+
</nav>
1212

13-
<ul class="breadcrumb">
14-
<li><a href="#">Home</a></li>
15-
<li class="active">Library</li>
16-
</ul>
13+
<nav class="hxBreadcrumb">
14+
<a href="#">Home</a>
15+
<span class="delimiter">
16+
<svg width="5" height="7.05" viewBox="0 0 5 8" xmlns="http://www.w3.org/2000/svg">
17+
<path d="M.59.558l-.43.627L3.266 4.08.16 6.978l.43.627 3.442-3.21c." +
18+
"082-.075.13-.19.13-.313 0-.12-.048-.236-.13-.312L.59.558z"/>
19+
</svg>
20+
</span>
21+
<a href="#">Library</a>
22+
</nav>
1723

18-
<ul class="breadcrumb">
19-
<li><a href="#">Home</a></li>
20-
<li><a href="#">Library</a></li>
21-
<li class="active">Data</li>
22-
</ul>
24+
<nav class="hxBreadcrumb">
25+
<a href="#">Home</a>
26+
<span class="delimiter">
27+
<svg width="5" height="7.05" viewBox="0 0 5 8" xmlns="http://www.w3.org/2000/svg">
28+
<path d="M.59.558l-.43.627L3.266 4.08.16 6.978l.43.627 3.442-3.21c." +
29+
"082-.075.13-.19.13-.313 0-.12-.048-.236-.13-.312L.59.558z"/>
30+
</svg>
31+
</span>
32+
<a href="#">Library</a>
33+
<span class="delimiter">
34+
<svg width="5" height="7.05" viewBox="0 0 5 8" xmlns="http://www.w3.org/2000/svg">
35+
<path d="M.59.558l-.43.627L3.266 4.08.16 6.978l.43.627 3.442-3.21c." +
36+
"082-.075.13-.19.13-.313 0-.12-.048-.236-.13-.312L.59.558z"/>
37+
</svg>
38+
</span>
39+
<a href="#">Current</a>
40+
</nav>
2341
</div>
2442

43+
```html
44+
<nav class="hxBreadcrumb">
45+
<a href="#">Home</a>
46+
</nav>
47+
48+
<nav class="hxBreadcrumb">
49+
<a href="#">Home</a>
50+
<span class="delimiter">
51+
<svg width="5" height="7.05" viewBox="0 0 5 8" xmlns="http://www.w3.org/2000/svg">
52+
<path d="M.59.558l-.43.627L3.266 4.08.16 6.978l.43.627 3.442-3.21c." +
53+
"082-.075.13-.19.13-.313 0-.12-.048-.236-.13-.312L.59.558z"/>
54+
</svg>
55+
</span>
56+
<a href="#">Library</a>
57+
</nav>
58+
59+
<nav class="hxBreadcrumb">
60+
<a href="#">Home</a>
61+
<span class="delimiter">
62+
<svg width="5" height="7.05" viewBox="0 0 5 8" xmlns="http://www.w3.org/2000/svg">
63+
<path d="M.59.558l-.43.627L3.266 4.08.16 6.978l.43.627 3.442-3.21c." +
64+
"082-.075.13-.19.13-.313 0-.12-.048-.236-.13-.312L.59.558z"/>
65+
</svg>
66+
</span>
67+
<a href="#">Library</a>
68+
<span class="delimiter">
69+
<svg width="5" height="7.05" viewBox="0 0 5 8" xmlns="http://www.w3.org/2000/svg">
70+
<path d="M.59.558l-.43.627L3.266 4.08.16 6.978l.43.627 3.442-3.21c." +
71+
"082-.075.13-.19.13-.313 0-.12-.048-.236-.13-.312L.59.558z"/>
72+
</svg>
73+
</span>
74+
<a href="#">Current</a>
75+
</nav>
76+
```

source/styles/helix-ui.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
// Core CSS
1515
@import 'scaffold';
1616
@import 'grid/_grid';
17-
1817
@import 'navigation/_navigation';
18+
@import 'breadcrumbs/_breadcrumbs';
1919

2020
/* ===== Text Helpers ===== */
2121
// Ripped from Boostrap (may not need all of these)

0 commit comments

Comments
 (0)