-
Notifications
You must be signed in to change notification settings - Fork 17
/
_tags.scss
82 lines (71 loc) · 1.8 KB
/
_tags.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// /*doc
// ---
// title: Tags
// name: tags
// category: Modules
// ---
// Display which keywords an article has been tagged with.
//
// ```html_example
// <div class="tags">
// <span class="screen-readable">Tags:</span>
// <ul class="inline-list tags__inline-list">
// <li class="inline-list__item tags__list-item"><a href="#">Guardian</a></li>
// <li class="inline-list__item tags__list-item"><a href="#">Mobile</a></li>
// <li class="inline-list__item tags__list-item"><a href="#">Applications</a></li>
// </ul>
// </div>
// ```
// */
.tags {
@include meta;
background-color: color(brightness-100);
color: color(brightness-60);
font-family: $guardian-sans;
width: 100%;
clear: both;
@include mq($from: col4) {
margin: 0 auto;
width: 1200px;
padding: {
left: 0;
right: 0;
}
}
.hide-tags {
display: none;
}
.show-tags {
display: inline-block;
}
}
.tags__inline-list {
display: none;
}
.tags__inline-list:not(:empty) {
display: block;
padding: base-px(.4, 1, 1.7, .7);
@include mq($from: col4) {
margin-left: 232px; // 240 - 4 (item padding offset) - 4 (visually offset rounded items);
width: 940px;
}
}
.tags__list-item {
margin: 1rem 0;
@include inverted-colors;
a {
white-space: nowrap;
padding: base-px(.5, 1.3);
border-radius: 30px;
text-overflow: ellipsis;
max-width: 18.75rem;
@include tag-button(color(brightness-7), color(brightness-96));
}
&.more-button a {
background-color: transparent !important;
@include tag-more-button(color(brightness-7), darken(color(brightness-96), 10%));
}
#more {
@include inverted-colors
}
}