@tacc/core-styles 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/.postcssrc.base.yml +48 -0
  2. package/README.md +244 -0
  3. package/bin/build.js +40 -0
  4. package/bin/config.js +90 -0
  5. package/bin/version.js +24 -0
  6. package/cli.js +77 -0
  7. package/dist/branding_logos.css +2 -0
  8. package/dist/components/README.css +1 -0
  9. package/dist/components/bootstrap.container.css +2 -0
  10. package/dist/components/bootstrap.figure.css +2 -0
  11. package/dist/components/bootstrap.pagination.css +2 -0
  12. package/dist/components/c-button.css +2 -0
  13. package/dist/components/c-callout.css +2 -0
  14. package/dist/components/c-card.css +2 -0
  15. package/dist/components/c-data-list.css +2 -0
  16. package/dist/components/c-footer.css +2 -0
  17. package/dist/components/c-image-map.css +2 -0
  18. package/dist/components/c-image-map.skin.css +1 -0
  19. package/dist/components/c-image-map.structure.css +2 -0
  20. package/dist/components/c-nav.css +2 -0
  21. package/dist/components/c-page.css +2 -0
  22. package/dist/components/c-recognition.css +2 -0
  23. package/dist/components/c-see-all-link.css +2 -0
  24. package/dist/components/c-show-more.css +2 -0
  25. package/dist/elements/README.css +1 -0
  26. package/dist/elements/figure.css +2 -0
  27. package/dist/elements/html-elements.css +2 -0
  28. package/dist/elements/tacc-search-bar.css +2 -0
  29. package/dist/generics/README.css +1 -0
  30. package/dist/objects/README.css +1 -0
  31. package/dist/objects/o-flex-item-table-wrap.css +2 -0
  32. package/dist/objects/o-grid.css +2 -0
  33. package/dist/objects/o-offset-content.css +2 -0
  34. package/dist/objects/o-section.css +2 -0
  35. package/dist/objects/o-site.css +2 -0
  36. package/dist/settings/README.css +1 -0
  37. package/dist/settings/border.css +2 -0
  38. package/dist/settings/color.css +2 -0
  39. package/dist/settings/font.css +2 -0
  40. package/dist/settings/max-width.css +2 -0
  41. package/dist/settings/space.css +2 -0
  42. package/dist/tools/README.css +1 -0
  43. package/dist/tools/media-queries.css +1 -0
  44. package/dist/tools/x-article-link.css +2 -0
  45. package/dist/tools/x-center.css +2 -0
  46. package/dist/tools/x-fake-border.css +2 -0
  47. package/dist/tools/x-grid.css +1 -0
  48. package/dist/tools/x-layout.css +2 -0
  49. package/dist/tools/x-overlay.css +1 -0
  50. package/dist/tools/x-truncate.css +2 -0
  51. package/dist/trumps/README.css +1 -0
  52. package/dist/trumps/icon.css +2 -0
  53. package/dist/trumps/icon.fonts.css +2 -0
  54. package/dist/trumps/s-article-list.css +2 -0
  55. package/dist/trumps/s-article-preview.css +2 -0
  56. package/dist/trumps/s-blockquote.css +2 -0
  57. package/dist/trumps/s-breadcrumbs.css +2 -0
  58. package/dist/trumps/s-cms-nav.css +1 -0
  59. package/dist/trumps/s-document.css +2 -0
  60. package/dist/trumps/s-footer.css +2 -0
  61. package/dist/trumps/s-guide-doc.css +2 -0
  62. package/dist/trumps/s-header.css +2 -0
  63. package/dist/trumps/s-inline-dl.css +2 -0
  64. package/dist/trumps/s-portal-nav.css +2 -0
  65. package/dist/trumps/s-style-guide.css +2 -0
  66. package/dist/trumps/s-system-specs.css +2 -0
  67. package/dist/trumps/tacc-search-bar.css +2 -0
  68. package/dist/trumps/u-empty.css +1 -0
  69. package/dist/trumps/u-hide.css +2 -0
  70. package/dist/trumps/u-nested-text-content.css +2 -0
  71. package/index.js +45 -0
  72. package/package.json +49 -0
  73. package/source/README.md +8 -0
  74. package/source/_imports/README.md +47 -0
  75. package/source/_imports/branding_logos.css +73 -0
  76. package/source/_imports/components/README.css +26 -0
  77. package/source/_imports/components/bootstrap.container.css +23 -0
  78. package/source/_imports/components/bootstrap.figure.css +17 -0
  79. package/source/_imports/components/bootstrap.pagination.css +29 -0
  80. package/source/_imports/components/c-button.css +210 -0
  81. package/source/_imports/components/c-button.html +31 -0
  82. package/source/_imports/components/c-callout.css +183 -0
  83. package/source/_imports/components/c-callout.html +52 -0
  84. package/source/_imports/components/c-card.css +57 -0
  85. package/source/_imports/components/c-card.html +32 -0
  86. package/source/_imports/components/c-data-list.css +222 -0
  87. package/source/_imports/components/c-data-list.html +145 -0
  88. package/source/_imports/components/c-footer.css +67 -0
  89. package/source/_imports/components/c-footer.html +3 -0
  90. package/source/_imports/components/c-image-map.css +26 -0
  91. package/source/_imports/components/c-image-map.html +4 -0
  92. package/source/_imports/components/c-image-map.skin.css +1 -0
  93. package/source/_imports/components/c-image-map.structure.css +285 -0
  94. package/source/_imports/components/c-nav.css +164 -0
  95. package/source/_imports/components/c-nav.html +45 -0
  96. package/source/_imports/components/c-page.css +95 -0
  97. package/source/_imports/components/c-page.html +192 -0
  98. package/source/_imports/components/c-recognition.css +102 -0
  99. package/source/_imports/components/c-see-all-link.css +52 -0
  100. package/source/_imports/components/c-show-more.css +50 -0
  101. package/source/_imports/elements/README.css +47 -0
  102. package/source/_imports/elements/figure.css +23 -0
  103. package/source/_imports/elements/html-elements.css +386 -0
  104. package/source/_imports/elements/tacc-search-bar.css +19 -0
  105. package/source/_imports/elements/tacc-search-bar.md +20 -0
  106. package/source/_imports/generics/README.css +24 -0
  107. package/source/_imports/generics/README.md +9 -0
  108. package/source/_imports/objects/README.css +22 -0
  109. package/source/_imports/objects/o-flex-item-table-wrap.css +50 -0
  110. package/source/_imports/objects/o-grid.css +131 -0
  111. package/source/_imports/objects/o-grid.html +64 -0
  112. package/source/_imports/objects/o-offset-content.css +51 -0
  113. package/source/_imports/objects/o-section.css +270 -0
  114. package/source/_imports/objects/o-section.html +73 -0
  115. package/source/_imports/objects/o-site.css +26 -0
  116. package/source/_imports/objects/o-site.html +11 -0
  117. package/source/_imports/settings/README.css +65 -0
  118. package/source/_imports/settings/border.css +15 -0
  119. package/source/_imports/settings/color.css +30 -0
  120. package/source/_imports/settings/font.css +49 -0
  121. package/source/_imports/settings/max-width.css +31 -0
  122. package/source/_imports/settings/space.css +36 -0
  123. package/source/_imports/tools/README.css +17 -0
  124. package/source/_imports/tools/media-queries.css +48 -0
  125. package/source/_imports/tools/x-article-link.css +62 -0
  126. package/source/_imports/tools/x-center.css +60 -0
  127. package/source/_imports/tools/x-fake-border.css +72 -0
  128. package/source/_imports/tools/x-grid.css +116 -0
  129. package/source/_imports/tools/x-layout.css +86 -0
  130. package/source/_imports/tools/x-overlay.css +28 -0
  131. package/source/_imports/tools/x-truncate.css +47 -0
  132. package/source/_imports/trumps/README.css +79 -0
  133. package/source/_imports/trumps/icon.css +31 -0
  134. package/source/_imports/trumps/icon.fonts.css +316 -0
  135. package/source/_imports/trumps/s-article-list.css +240 -0
  136. package/source/_imports/trumps/s-article-list.html +20 -0
  137. package/source/_imports/trumps/s-article-preview.css +253 -0
  138. package/source/_imports/trumps/s-article-preview.html +30 -0
  139. package/source/_imports/trumps/s-blockquote.css +45 -0
  140. package/source/_imports/trumps/s-breadcrumbs.css +69 -0
  141. package/source/_imports/trumps/s-cms-nav.css +11 -0
  142. package/source/_imports/trumps/s-cms-nav.html +41 -0
  143. package/source/_imports/trumps/s-document.css +142 -0
  144. package/source/_imports/trumps/s-footer.css +16 -0
  145. package/source/_imports/trumps/s-footer.html +3 -0
  146. package/source/_imports/trumps/s-guide-doc.css +77 -0
  147. package/source/_imports/trumps/s-header.css +181 -0
  148. package/source/_imports/trumps/s-header.html +46 -0
  149. package/source/_imports/trumps/s-inline-dl.css +35 -0
  150. package/source/_imports/trumps/s-portal-nav.css +20 -0
  151. package/source/_imports/trumps/s-portal-nav.html +37 -0
  152. package/source/_imports/trumps/s-style-guide.css +52 -0
  153. package/source/_imports/trumps/s-system-specs.css +123 -0
  154. package/source/_imports/trumps/tacc-search-bar.css +108 -0
  155. package/source/_imports/trumps/tacc-search-bar.html +11 -0
  156. package/source/_imports/trumps/u-empty.css +18 -0
  157. package/source/_imports/trumps/u-hide.css +27 -0
  158. package/source/_imports/trumps/u-nested-text-content.css +14 -0
  159. package/source/_tests/README.md +33 -0
  160. package/source/_tests/postcss-extend.css +80 -0
  161. package/source/_tests/postcss-preset-env.css +75 -0
  162. package/source/_tests.css +12 -0
  163. package/source/_themes/README.md +5 -0
  164. package/source/_themes/TODO.md +4 -0
  165. package/source/_themes/default.json +21 -0
  166. package/source/_themes/has-dark-logo.json +21 -0
@@ -0,0 +1,285 @@
1
+ /* PROPERTIES */
2
+
3
+ .c-image-map {
4
+ --button-shape-size: 50px;
5
+ --toggle-shape-size: 60px;
6
+ --caption-width: 100%;
7
+ }
8
+ .c-image-map--has-caption-toggle-alignment {
9
+ --caption-toggle-offset-horz: 0px;
10
+ --caption-toggle-offset-vert: calc( ( var(--toggle-shape-size) / 2 ) + 1em );
11
+ }
12
+
13
+
14
+
15
+ /* ROOT */
16
+
17
+ /* Shrink-wrap component */
18
+ .c-image-map {
19
+ display: table;
20
+ }
21
+ /* On narrow viewport, center the widget */
22
+ @media only screen and (max-width: 991px) {
23
+ .c-image-map { margin: 0 auto; }
24
+ }
25
+
26
+ /* Set dynamic image size */
27
+ /* FAQ: Organized under "ROOT" only because it defines size of entire widget */
28
+ .c-image-map__image {
29
+ /* FAQ: Removes inline whitespace between container and image */
30
+ display: block;
31
+ /* Stretch component */
32
+ width: 100%;
33
+ /* Prevent image from growing larger than native size */
34
+ max-width: 495px;
35
+ }
36
+
37
+
38
+
39
+ /* ELEMENTS */
40
+
41
+
42
+ /* Item */
43
+
44
+ .c-image-map__item {
45
+ width: 100%;
46
+ }
47
+
48
+
49
+ /* Captions */
50
+
51
+ .c-image-map__item-caption {
52
+ width: var(--caption-width);
53
+ }
54
+
55
+
56
+ /* Close Buttons */
57
+
58
+ /* On wide viewport, hide close button */
59
+ @media only screen and (min-width: 992px) {
60
+ .c-image-map__item-close {
61
+ display: none !important; /* overwrite `display: flex` */
62
+ }
63
+ }
64
+
65
+
66
+ /* Toggles */
67
+
68
+ .c-image-map__item-toggle {
69
+ width: var(--toggle-shape-size);
70
+ height: var(--toggle-shape-size);
71
+
72
+ /* Set transform origin to horizontal center */
73
+ margin-top: calc( -1 * var(--toggle-shape-size) / 2 );
74
+ margin-left: calc( -1 * var(--toggle-shape-size) / 2 );
75
+ }
76
+
77
+
78
+ /* Toggles & Captions */
79
+
80
+ /* Toggles & Captions: Position Anchors */
81
+
82
+ /* Anchor child elements */
83
+ .c-image-map {
84
+ position: relative;
85
+ }
86
+ /* Prepare to position toggle horz. (directly) and vert. (via item) */
87
+ .c-image-map:not(.c-image-map--should-position-items) .c-image-map__item {
88
+ position: relative;
89
+ }
90
+ /* Position and size items over image */
91
+ .c-image-map:not(.c-image-map--should-position-items) .c-image-map__items {
92
+ position: absolute;
93
+ top: 0;
94
+ left: 0;
95
+ right: 0;
96
+ }
97
+ /* Allow relative alignment (x-axis, y-axis) and layering (z-axis) */
98
+ .c-image-map__item-caption {
99
+ position: relative;
100
+ }
101
+
102
+ /* Toggles & Captions: UX */
103
+
104
+ /* Toggles & Captions: UX: Cursors */
105
+
106
+ /* On narrow viewport, suggest toggles' click action to users */
107
+ @media only screen and (max-width: 991px) {
108
+ .c-image-map__item-toggle {
109
+ cursor: pointer;
110
+ }
111
+ }
112
+
113
+ /* Toggles & Captions: UX: Hide/Show Captions */
114
+
115
+ /* Hide captions by default */
116
+ .c-image-map__item-toggle ~ .c-image-map__item-caption {
117
+ visibility: hidden;
118
+ }
119
+ /* Show the description on item click or focus or target */
120
+ /* FAQ: A click provides focus on focusable items */
121
+ /*
122
+ /* Click on item toggle should SHOW caption */
123
+ .c-image-map__item-toggle:focus ~ .c-image-map__item-caption,
124
+ /* Click on item caption should NOT HIDE caption */
125
+ .c-image-map__item:focus-within .c-image-map__item-caption,
126
+ /* Click on another item caption should HIDE caption of target item */
127
+ /* CAVEAT: Without focus on any other item, caption of target item is shown */
128
+ .c-image-map:not(:focus-within) .c-image-map__item:target .c-image-map__item-caption {
129
+ visibility: visible;
130
+ }
131
+ /* On wide viewport, always show captions */
132
+ @media only screen and (min-width: 992px) {
133
+ .c-image-map__item-caption {
134
+ visibility: visible !important; /* overwrite `.c-image-map__item-toggle… .c-image-map__item-caption` */
135
+ }
136
+ }
137
+
138
+
139
+ /* Toggles & Close Buttons */
140
+
141
+ /* Toggle and close markup should suggest clickability */
142
+ button.c-image-map__item-toggle:hover,
143
+ button.c-image-map__item-close:hover {
144
+ cursor: pointer;
145
+ }
146
+ /* As a link, toggle and close should not look like default links */
147
+ a.c-image-map__item-toggle:hover,
148
+ a.c-image-map__item-close:hover {
149
+ text-decoration: none;
150
+ }
151
+ /* As a button, toggle and close should not look like default buttons */
152
+ button.c-image-map__item-toggle,
153
+ button.c-image-map__item-close {
154
+ border: none;
155
+ }
156
+
157
+
158
+ /* Toggles, Counters, & Close Buttons */
159
+
160
+ .c-image-map__item-toggle,
161
+ .c-image-map--has-item-counters .c-image-map__item::before,
162
+ .c-image-map__item-close {
163
+ /* Align any text vertically and horizontally */
164
+ display: flex;
165
+ justify-content: center;
166
+ align-items: center;
167
+ }
168
+
169
+
170
+
171
+ /* MODIFIERS */
172
+
173
+
174
+ /* Position Items */
175
+
176
+ /* Prepare to position toggle horz. (directly) and vert. (via item) */
177
+ .c-image-map--should-position-items .c-image-map__item,
178
+ .c-image-map--should-position-items .c-image-map__item-toggle {
179
+ position: absolute;
180
+ }
181
+ /* IMPORTANT: Define these per instance. Key:
182
+ - `unique-instance--item…` is a `c-image-map__item`
183
+ - `top` is the vertical y position of the item & toggle
184
+ - `left` is the horizontal x position of the item & toggle */
185
+ /*
186
+ #unique-instance--item_1_name { top: 10% }
187
+ #unique-instance--item_1_name .c-image-map__item-toggle { left: 5%; }
188
+
189
+ #unique-instance--item_2_name { top: 20% }
190
+ #unique-instance--item_2_name .c-image-map__item-toggle { left: 5%; }
191
+
192
+ #unique-instance--item_3_name { top: 30% }
193
+ #unique-instance--item_3_name .c-image-map__item-toggle { left: 5%; }
194
+
195
+ #unique-instance--item_4_name { top: 40% }
196
+ #unique-instance--item_4_name .c-image-map__item-toggle { left: 5%; }
197
+
198
+ #unique-instance--item_5_name { top: 50% }
199
+ #unique-instance--item_5_name .c-image-map__item-toggle { left: 5%; }
200
+ */
201
+
202
+
203
+ /* Toggle Counters */
204
+
205
+ /* Assign numbers to markers */
206
+ .c-image-map--has-toggle-counters {
207
+ counter-reset: items;
208
+ }
209
+ .c-image-map--has-toggle-counters .c-image-map__item {
210
+ counter-increment: items;
211
+ }
212
+ .c-image-map--has-toggle-counters .c-image-map__item-toggle::before {
213
+ content: counter(items);
214
+ }
215
+
216
+
217
+ /* Item Counters */
218
+
219
+ /* Assign numbers to markers */
220
+ .c-image-map--has-item-counters {
221
+ counter-reset: items;
222
+ }
223
+ .c-image-map--has-item-counters .c-image-map__item {
224
+ counter-increment: items;
225
+ }
226
+ .c-image-map--has-item-counters .c-image-map__item::before {
227
+ content: counter(items);
228
+ }
229
+
230
+ /* On narrow viewport, hide counters for all items */
231
+ @media only screen and (max-width: 991px) {
232
+ .c-image-map--has-item-counters .c-image-map__item::before {
233
+ display: none;
234
+ }
235
+ }
236
+ /* On narrow viewport, hide counters for unmapped items */
237
+ .c-image-map--has-item-counters .c-image-map__item--unmapped::before {
238
+ display: none;
239
+ }
240
+
241
+
242
+ /* Caption-Toggle Alignment */
243
+
244
+ /* Fix scroll position for toggle anchor links to item */
245
+ .c-image-map--has-caption-toggle-alignment .c-image-map__item {
246
+ scroll-snap-align: start;
247
+ scroll-margin: var(--caption-toggle-offset-vert);
248
+ }
249
+
250
+ /* Align caption far left, but still aligned vertically with toggle */
251
+ .c-image-map--has-caption-toggle-alignment .c-image-map__item-caption {
252
+ left: var(--caption-toggle-offset-horz);
253
+ }
254
+
255
+ /* On narrow screen, move toggles of unmapped items to center of widget */
256
+ @media only screen and (max-width: 991px) {
257
+ .c-image-map--has-caption-toggle-alignment .c-image-map__item--unmapped .c-image-map__item-toggle {
258
+ left: 50% !important; /* overwrite item ID selector */
259
+ }
260
+ }
261
+ /* On wide screen, move toggles of unmapped items to top-right of caption */
262
+ @media only screen and (min-width: 992px) {
263
+ .c-image-map--has-caption-toggle-alignment .c-image-map__item--unmapped .c-image-map__item-toggle {
264
+ left: calc( var(--caption-toggle-offset-horz) + var(--caption-width) ) !important; /* overwrite item ID */
265
+ }
266
+ }
267
+
268
+ /* On narrow viewport, set caption atop (z-axis) toggles below it (y-axis) */
269
+ @media only screen and (max-width: 991px) {
270
+ .c-image-map--has-caption-toggle-alignment .c-image-map__item-caption {
271
+ /* Layer caption above toggle */
272
+ z-index: 1;
273
+
274
+ /* Position caption below toggle */
275
+ margin-top: var(--caption-toggle-offset-vert);
276
+ }
277
+ }
278
+ /* On wide viewport, set toggle atop (z-axis) its own caption (if nearby) */
279
+ /* FAQ: An `.c-image-map__item--unmapped` places caption near toggle */
280
+ @media only screen and (min-width: 992px) {
281
+ .c-image-map--has-caption-toggle-alignment .c-image-map__item-toggle {
282
+ /* Layer toggle above caption */
283
+ z-index: 1;
284
+ }
285
+ }
@@ -0,0 +1,164 @@
1
+ /*
2
+ Nav
3
+
4
+ Navigation links that flows inline on narrow screens.
5
+
6
+ To enforce appropriate semantic HTML, a `<nav>` is required.
7
+
8
+ For list-like navigation, use `<ul>` or `<ol>` (with children `<li>`). Inside this kind of nav, markup whitespace is __not__ rendered.
9
+
10
+ To support a navigation not as a list and with direct `<a>` children, add class `c-nav--no-list`. Inside this kind of nav, markup whitespace __is__ rendered.﹡
11
+
12
+ ﹡ To remove whitespace with CSS would break or complicate font-size cascade.
13
+
14
+ - c-nav--boxed - Surrounded by a box
15
+
16
+ Markup: c-nav.html
17
+
18
+ Styleguide Components.Nav
19
+ */
20
+ @import url("_imports/tools/media-queries.css");
21
+
22
+
23
+
24
+
25
+
26
+ /* Block */
27
+
28
+ nav.c-nav {
29
+ --link-padding: 0.5em;
30
+ }
31
+
32
+
33
+
34
+
35
+
36
+ /* Modifiers */
37
+
38
+
39
+
40
+ /* Modifiers: Boxed */
41
+
42
+ nav.c-nav--boxed {
43
+ --indent-small: calc(var(--global-space--list-indent) / 4);
44
+ --indent-medium: calc(var(--global-space--list-indent) / 2);
45
+ --indent-large: var(--global-space--list-indent);
46
+
47
+ width: fit-content;
48
+
49
+ border: var(--global-border--normal);
50
+ }
51
+
52
+ /* any list */
53
+ nav.c-nav--boxed :is(ul,ol) {
54
+ margin: 0;
55
+ }
56
+
57
+ /* Modifiers: Boxed: Padding */
58
+
59
+ /* unordered list */
60
+ nav.c-nav--boxed ul {
61
+ list-style-type: none; /* to remove bullets (must then reduce padding left) */
62
+ padding-left: var(--indent-medium);
63
+ padding-right: var(--indent-large);
64
+ }
65
+
66
+ /* wide screen */
67
+ @media (--medium-and-above) {
68
+ nav.c-nav--boxed {
69
+ /* Normal vertical padding */
70
+ padding-block: var(--indent-medium);
71
+ }
72
+
73
+ nav.c-nav--boxed ol {
74
+ /* We retain bullets, which (wide screen) need large padding (so keep it) */
75
+ padding-left: var(--indent-large);
76
+ padding-right: calc( var(--indent-large) - var(--link-padding) );
77
+ }
78
+ }
79
+
80
+ /* narrow screen */
81
+ @media (--medium-and-below) {
82
+ nav.c-nav--boxed {
83
+ /* Reduced vertical padding because of narrow screen link line-height */
84
+ padding-block: var(--indent-small);
85
+ }
86
+
87
+ nav.c-nav--boxed ol {
88
+ /* We retain bullets, which (narrow screen) don't need large padding left */
89
+ padding-left: calc( var(--indent-medium) - var(--link-padding) );
90
+ padding-right: calc( var(--indent-large) - var(--link-padding) );
91
+ }
92
+ }
93
+
94
+ /* no list */
95
+ nav.c-nav--boxed.c-nav--no-list {
96
+ /* Has no bullets, thus smaller padding left */
97
+ padding-left: var(--indent-medium);
98
+ padding-right: var(--indent-large);
99
+ }
100
+
101
+
102
+
103
+ /* Modifiers: No List */
104
+
105
+ /* This is not a true modifier. It is required to support certain markup. */
106
+ /* SEE: stylesheet docblock, "no list" comments, `...--no-list` selectors */
107
+
108
+
109
+
110
+
111
+
112
+ /* Elements */
113
+
114
+
115
+
116
+ nav.c-nav {
117
+ --space-between-inline-items: 0.5em;
118
+ }
119
+ nav.c-nav a {
120
+ display: inline-block; /* to let line-height define clickable area */
121
+ padding-inline: var(--link-padding);
122
+ }
123
+
124
+ /* no list */
125
+ nav.c-nav--no-list {
126
+ display: flex; /* to remove whitespace between items */
127
+ flex-wrap: wrap;
128
+ }
129
+ nav.c-nav--no-list > a {
130
+ /* To space items via margin (use `-right` to not increase left indent) */
131
+ margin-right: var(--space-between-inline-items);
132
+ }
133
+
134
+
135
+
136
+ /* Elements: Narrow Screen */
137
+
138
+ @media (--medium-and-below) {
139
+
140
+ nav.c-nav a {
141
+ line-height: 2.5;
142
+ }
143
+
144
+ /* any list */
145
+ nav.c-nav :is(ul,ol) {
146
+ display: flex;
147
+ flex-wrap: wrap;
148
+
149
+ /* To prevent overlap of any lists' decorators (when items are inline) */
150
+ list-style-position: inside;
151
+ }
152
+ nav.c-nav :is(ul,ol):not(.c-nav--boxed :is(ul,ol)) {
153
+ /* To remove padding because list decorators are `...position: inside` */
154
+ padding-left: unset;
155
+ }
156
+ nav.c-nav :is(ul,ol) li {
157
+ /* To space items via margin (use `-right` to not increase left indent) */
158
+ margin-right: var(--space-between-inline-items);
159
+ }
160
+
161
+ /* unordered list */
162
+ nav.c-nav ul { list-style-type: none; }
163
+
164
+ }
@@ -0,0 +1,45 @@
1
+ {# The {{ html }} allows DjangoCMS Snippet to pass in class names #}
2
+
3
+ <h3>Unordered List</h3>
4
+ <nav class="c-nav {{modifier_class}} {{ html }}">
5
+ <ul>
6
+ <li><a href="#alabama">Alabama</a></li>
7
+ <li><a href="#alaska">Alaska</a></li>
8
+ <li><a href="#arizona">Arizona</a></li>
9
+ <li><a href="#arkansas">Arkansas</a></li>
10
+ <li><a href="#california">California</a></li>
11
+ <li><a href="#colorado">Colorado</a></li>
12
+ <li><a href="#connecticut">Connecticut</a></li>
13
+ <li><a href="#deleware">Delware</a></li>
14
+ <li><a href="#florida">Florida</a></li>
15
+ </ul>
16
+ </nav>
17
+
18
+ <h3>Ordered List</h3>
19
+ <nav class="c-nav {{modifier_class}} {{ html }}">
20
+ <ol>
21
+ <li><a href="#alabama">Alabama</a></li>
22
+ <li><a href="#alaska">Alaska</a></li>
23
+ <li><a href="#arizona">Arizona</a></li>
24
+ <li><a href="#arkansas">Arkansas</a></li>
25
+ <li><a href="#california">California</a></li>
26
+ <li><a href="#colorado">Colorado</a></li>
27
+ <li><a href="#connecticut">Connecticut</a></li>
28
+ <li><a href="#deleware">Delware</a></li>
29
+ <li><a href="#florida">Florida</a></li>
30
+ </ol>
31
+ </nav>
32
+
33
+ <h3>No List</h3>
34
+ <p>(requires <code>c-nav--no-list</code>)</p>
35
+ <nav class="c-nav c-nav--no-list {{modifier_class}} {{ html }}">
36
+ <a href="#alabama">Alabama</a>
37
+ <a href="#alaska">Alaska</a>
38
+ <a href="#arizona">Arizona</a>
39
+ <a href="#arkansas">Arkansas</a>
40
+ <a href="#california">California</a>
41
+ <a href="#colorado">Colorado</a>
42
+ <a href="#connecticut">Connecticut</a>
43
+ <a href="#deleware">Delware</a>
44
+ <a href="#florida">Florida</a>
45
+ </nav>
@@ -0,0 +1,95 @@
1
+ /*
2
+ Pagination
3
+
4
+ A navigation list of sequential page toggles with end cap links.
5
+
6
+ Markup: c-page.html
7
+
8
+ Styleguide Components.Pagination
9
+ */
10
+
11
+
12
+
13
+ /* Pagination: Variables */
14
+
15
+ .c-page-list {
16
+ --item-width: 2em;
17
+ --item-buffer: 3px;
18
+ --item-border: var(--global-border-width--normal); /* WARNING: assumption */
19
+ }
20
+
21
+
22
+
23
+ /* Pagination: List */
24
+
25
+ .c-page-list {
26
+ display: flex;
27
+ flex-direction: row;
28
+ align-items: baseline;
29
+ list-style: none;
30
+
31
+ font-size: 14px; /* TEMPORARY: Should be 14px and have commented rem value */
32
+ }
33
+ ul.c-page-list {
34
+ list-style: none;
35
+ }
36
+
37
+ /* Pagination: List: Constant Hover */
38
+
39
+ .c-page-link--always-click {
40
+ position: relative;
41
+ box-sizing: content-box;
42
+ }
43
+ .c-page-link--always-click::before,
44
+ .c-page-link--always-click::after {
45
+ --width: var(--item-buffer);
46
+ --vert-offset: calc( -1 * var(--item-border) );
47
+ --horz-offset: calc( 100% + var(--item-border) );
48
+
49
+ content: '';
50
+ width: var(--width);
51
+ position: absolute;
52
+ top: var(--vert-offset);
53
+ bottom: var(--vert-offset);
54
+ }
55
+ .c-page-link--always-click.c-button {
56
+ overflow: visible; /* overwrite `.c-button` so pseudo elements show */
57
+ }
58
+ .c-page-link--always-click::before { right: var(--horz-offset) }
59
+ .c-page-link--always-click::after { left: var(--horz-offset) }
60
+
61
+
62
+
63
+
64
+
65
+ /* Pagination: Item */
66
+
67
+ .c-page-item { margin-inline: var(--item-buffer) }
68
+ .c-page-item:first-child { margin-left: 0 }
69
+ .c-page-item:last-child { margin-right: 0 }
70
+
71
+ /* Pagination: Item: Truncated */
72
+
73
+ .c-page-item--etcetera {
74
+ min-width: var(--item-width);
75
+ margin-inline: 2px;
76
+ text-align: center;
77
+
78
+ cursor: default;
79
+ }
80
+
81
+
82
+
83
+ /* Pagination: End */
84
+
85
+ .c-page-end { padding: 4px 12px }
86
+
87
+
88
+
89
+ /* Pagination: Link */
90
+
91
+ .c-page-link {
92
+ padding: 5px 0;
93
+ min-width: var(--item-width);
94
+ line-height: 1.2;
95
+ }