@tacc/core-styles 0.10.0 → 0.11.0
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.
- package/dist/branding_logos.css +1 -1
- package/dist/components/README.css +1 -1
- package/dist/components/bootstrap/bootstrap--form.docs.css +1 -0
- package/dist/components/bootstrap/bootstrap--modal.docs.css +1 -0
- package/dist/components/bootstrap/docs.css +1 -0
- package/dist/components/bootstrap--container.css +1 -0
- package/dist/components/bootstrap--form/docs.css +1 -0
- package/dist/components/bootstrap--form.css +1 -0
- package/dist/components/bootstrap--modal/docs.css +1 -0
- package/dist/components/bootstrap--modal.css +1 -0
- package/dist/components/bootstrap.container.css +1 -1
- package/dist/components/bootstrap.css +1 -0
- package/dist/components/bootstrap.figure.css +1 -1
- package/dist/components/bootstrap.form/docs.css +1 -0
- package/dist/components/bootstrap.form.css +1 -1
- package/dist/components/bootstrap.modal/docs.css +1 -0
- package/dist/components/bootstrap.modal.css +1 -1
- package/dist/components/bootstrap.pagination.css +1 -1
- package/dist/components/c-button/docs.css +1 -1
- package/dist/components/c-button.css +1 -1
- package/dist/components/c-callout.css +1 -1
- package/dist/components/c-card.css +1 -1
- package/dist/components/c-data-list.css +1 -1
- package/dist/components/c-footer.css +1 -1
- package/dist/components/c-image-map.css +1 -1
- package/dist/components/c-image-map.skin.css +1 -1
- package/dist/components/c-image-map.structure.css +1 -1
- package/dist/components/c-message.css +1 -1
- package/dist/components/c-nav.css +1 -1
- package/dist/components/c-page.css +1 -1
- package/dist/components/c-recognition.css +1 -1
- package/dist/components/c-see-all-link.css +1 -1
- package/dist/components/c-show-more.css +1 -1
- package/dist/components/cortal.icon.css +1 -1
- package/dist/components/cortal.icon.font.css +1 -1
- package/dist/elements/README.css +1 -1
- package/dist/elements/bootstrap.css +1 -1
- package/dist/elements/form.cms.css +1 -1
- package/dist/elements/html-elements.cms.css +1 -1
- package/dist/elements/links/docs.css +1 -1
- package/dist/elements/links.css +1 -1
- package/dist/elements/table--basic.css +1 -1
- package/dist/elements/table--nested.css +1 -1
- package/dist/elements/table.css +1 -1
- package/dist/elements/tacc-search-bar.css +1 -1
- package/dist/fractal.server.refresh.css +1 -1
- package/dist/generics/README.css +1 -1
- package/dist/generics/fonts.css +1 -1
- package/dist/objects/README.css +1 -1
- package/dist/objects/o-fixed-header-table.css +1 -1
- package/dist/objects/o-flex-item-table-wrap.css +1 -1
- package/dist/objects/o-float-content.css +1 -1
- package/dist/objects/o-grid.css +1 -1
- package/dist/objects/o-offset-content.css +1 -1
- package/dist/objects/o-section.css +1 -1
- package/dist/objects/o-site.css +1 -1
- package/dist/settings/README.css +1 -1
- package/dist/settings/border.css +1 -1
- package/dist/settings/color.css +1 -1
- package/dist/settings/font.css +1 -1
- package/dist/settings/max-width.css +1 -1
- package/dist/settings/space.css +1 -1
- package/dist/tools/README.css +1 -1
- package/dist/tools/media-queries.css +1 -1
- package/dist/tools/x-article-link.css +1 -1
- package/dist/tools/x-center.css +1 -1
- package/dist/tools/x-fake-border.css +1 -1
- package/dist/tools/x-grid.css +1 -1
- package/dist/tools/x-layout.css +1 -1
- package/dist/tools/x-link/docs.css +1 -1
- package/dist/tools/x-link.css +1 -1
- package/dist/tools/x-mailto-text-replace.css +1 -1
- package/dist/tools/x-overlay.css +1 -1
- package/dist/tools/x-truncate.css +1 -1
- package/dist/trumps/README.css +1 -1
- package/dist/trumps/icon.css +1 -1
- package/dist/trumps/icon.fonts.css +1 -1
- package/dist/trumps/s-affixed-input-wrapper.css +1 -1
- package/dist/trumps/s-article-list.css +1 -1
- package/dist/trumps/s-article-preview.css +1 -1
- package/dist/trumps/s-blockquote.css +1 -1
- package/dist/trumps/s-breadcrumbs.css +1 -1
- package/dist/trumps/s-cms-nav.css +1 -1
- package/dist/trumps/s-document.css +1 -1
- package/dist/trumps/s-footer.css +1 -1
- package/dist/trumps/s-guide-doc.css +1 -1
- package/dist/trumps/s-header.css +1 -1
- package/dist/trumps/s-inline-dl.css +1 -1
- package/dist/trumps/s-irregular-links.css +1 -1
- package/dist/trumps/s-portal-nav.css +1 -1
- package/dist/trumps/s-style-guide.css +1 -1
- package/dist/trumps/s-system-specs.css +1 -1
- package/dist/trumps/tacc-search-bar.css +1 -1
- package/dist/trumps/u-empty.css +1 -1
- package/dist/trumps/u-hide.css +1 -1
- package/dist/trumps/u-mailto-text-replace.css +1 -1
- package/dist/trumps/u-nested-text-content.css +1 -1
- package/fractal.config.js +6 -5
- package/package.json +1 -1
- package/src/lib/_imports/_partials/cms.css.hbs +2 -2
- package/src/lib/_imports/_partials/text-of-one-paragraph.hbs +1 -0
- package/src/lib/_imports/_preview.hbs +1 -1
- package/src/lib/_imports/components/bootstrap/{bootstrap.container/bootstrap.container.hbs → bootstrap--container.hbs} +0 -0
- package/src/lib/_imports/components/bootstrap/{bootstrap.container/readme.md → bootstrap--container.readme.md} +0 -0
- package/src/lib/_imports/components/bootstrap/{portal/bootstrap.form/docs.css → bootstrap--form.docs.css} +0 -0
- package/src/lib/_imports/components/bootstrap/{portal/bootstrap.form/bootstrap.form.hbs → bootstrap--form.hbs} +0 -2
- package/src/lib/_imports/components/bootstrap/{portal/bootstrap.form/readme.md → bootstrap--form.readme.md} +0 -0
- package/src/lib/_imports/components/bootstrap/{bootstrap.modal/docs.css → bootstrap--modal.docs.css} +0 -0
- package/src/lib/_imports/components/bootstrap/{bootstrap.modal/bootstrap.modal.hbs → bootstrap--modal.hbs} +0 -2
- package/src/lib/_imports/components/bootstrap/{bootstrap.modal/readme.md → bootstrap--modal.readme.md} +0 -0
- package/src/lib/_imports/components/bootstrap/bootstrap.hbs +6 -0
- package/src/lib/_imports/components/bootstrap/bootstrap.readme.md +14 -0
- package/src/lib/_imports/components/bootstrap/config.yml +16 -0
- package/src/lib/_imports/components/bootstrap/docs.css +7 -0
- package/src/lib/_imports/components/bootstrap.css +3 -0
- package/src/lib/_imports/components/c-button/c-button.hbs +12 -18
- package/src/lib/_imports/components/c-button.css +12 -6
- package/src/lib/_imports/elements/html-elements.cms.css +3 -49
- package/src/lib/_imports/elements/links/config.yml +3 -0
- package/src/lib/_imports/elements/links/links.hbs +0 -2
- package/src/lib/_imports/elements/table/config.yml +149 -0
- package/src/lib/_imports/elements/table/readme.md +12 -0
- package/src/lib/_imports/elements/table/table--nested.readme.md +12 -0
- package/src/lib/_imports/elements/table/table--paragraph.readme.md +12 -0
- package/src/lib/_imports/elements/table/table.hbs +44 -0
- package/src/lib/_imports/elements/table--basic.css +102 -0
- package/src/lib/_imports/elements/table--nested.css +61 -0
- package/src/lib/_imports/elements/table.css +2 -0
- package/src/lib/_imports/tools/x-link/x-link.hbs +13 -2
- package/src/lib/_imports/tools/x-link.css +20 -0
- package/src/lib/_imports/trumps/s-affixed-input-wrapper/config.yml +3 -0
- package/src/lib/_imports/trumps/s-affixed-input-wrapper/s-affixed-input-wrapper.hbs +0 -2
- package/src/lib/_imports/trumps/s-irregular-links/config.yml +3 -3
- package/src/lib/_imports/trumps/s-irregular-links.css +7 -12
- package/src/lib/_imports/trumps/u-mailto-text-replace/config.yml +1 -1
- package/src/lib/_imports/components/bootstrap/bootstrap.container/config.yml +0 -3
- package/src/lib/_imports/components/bootstrap/bootstrap.modal/config.yml +0 -2
- package/src/lib/_imports/components/bootstrap/portal/bootstrap.form/config.yml +0 -3
- package/src/lib/_tests/README.md +0 -38
- package/src/lib/_tests/postcss-extend.css +0 -80
- package/src/lib/_tests/postcss-preset-env.css +0 -75
- package/src/lib/_tests.css +0 -12
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
<dt><code><a></code></dt>
|
|
27
27
|
<dd>
|
|
28
28
|
<a href="#" class="c-button c-button--{{this._self.name}} c-button--secondary"
|
|
29
|
-
{{#if disabled}}disabled{{/if}}>
|
|
29
|
+
{{#if disabled}}disabled tabindex="-1"{{/if}}>
|
|
30
30
|
<span class="c-button__text">--secondary</span>
|
|
31
31
|
</a>
|
|
32
32
|
{{#if small}}
|
|
33
33
|
<small>(no small primary allowed)</small>
|
|
34
34
|
{{else}}
|
|
35
35
|
<a href="#" class="c-button c-button--{{this._self.name}} c-button--primary"
|
|
36
|
-
{{#if disabled}}disabled{{/if}}>
|
|
36
|
+
{{#if disabled}}disabled tabindex="-1"{{/if}}>
|
|
37
37
|
<span class="c-button__text">--primary</span>
|
|
38
38
|
</a>
|
|
39
39
|
{{/if}}
|
|
40
40
|
<a href="#" class="c-button c-button--{{this._self.name}} c-button--tertiary"
|
|
41
|
-
{{#if disabled}}disabled{{/if}}>
|
|
41
|
+
{{#if disabled}}disabled tabindex="-1"{{/if}}>
|
|
42
42
|
<span class="c-button__text">--tertiary</span>
|
|
43
43
|
</a>
|
|
44
44
|
</dd>
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
<dd>
|
|
68
68
|
<a href="#" class="c-button c-button--{{this._self.name}}
|
|
69
69
|
{{#if type}}{{type}}{{/if}}"
|
|
70
|
-
{{#if disabled}}disabled{{/if}}>
|
|
70
|
+
{{#if disabled}}disabled tabindex="-1"{{/if}}>
|
|
71
71
|
<span class="c-button__text">default</span>
|
|
72
72
|
</a>
|
|
73
73
|
<a href="#" class="c-button c-button--{{this._self.name}} c-button--is-busy
|
|
74
74
|
{{#if type}}{{type}}{{/if}}"
|
|
75
|
-
disabled>
|
|
75
|
+
disabled tabindex="-1">
|
|
76
76
|
<span class="c-button__text">--is-busy</span>
|
|
77
77
|
</a>
|
|
78
78
|
</dd>
|
|
@@ -86,14 +86,12 @@
|
|
|
86
86
|
<dt><code><button></code></dt>
|
|
87
87
|
<dd>
|
|
88
88
|
<button class="c-button c-button--{{this._self.name}}
|
|
89
|
-
{{#if supports.width}}c-button--width-long{{/if}}
|
|
90
89
|
{{#if type}}{{type}}{{/if}}"
|
|
91
90
|
{{#if disabled}}disabled{{/if}}>
|
|
92
91
|
<i class="c-button__icon--before" aria-description="validate input">…</i>
|
|
93
92
|
<span class="c-button__text">__icon--before</span>
|
|
94
93
|
</button>
|
|
95
94
|
<button class="c-button c-button--{{this._self.name}}
|
|
96
|
-
{{#if supports.width}}c-button--width-long{{/if}}
|
|
97
95
|
{{#if type}}{{type}}{{/if}}"
|
|
98
96
|
{{#if disabled}}disabled{{/if}}>
|
|
99
97
|
<span class="c-button__text">__icon--after</span>
|
|
@@ -104,16 +102,14 @@
|
|
|
104
102
|
<dt><code><a></code></dt>
|
|
105
103
|
<dd>
|
|
106
104
|
<a href="#" class="c-button c-button--{{this._self.name}}
|
|
107
|
-
{{#if supports.width}}c-button--width-long{{/if}}
|
|
108
105
|
{{#if type}}{{type}}{{/if}}"
|
|
109
|
-
{{#if disabled}}disabled{{/if}}>
|
|
106
|
+
{{#if disabled}}disabled tabindex="-1"{{/if}}>
|
|
110
107
|
<i class="c-button__icon--before" aria-description="validate input">…</i>
|
|
111
108
|
<span class="c-button__text">__icon--before</span>
|
|
112
109
|
</a>
|
|
113
110
|
<a href="#" class="c-button c-button--{{this._self.name}}
|
|
114
|
-
{{#if supports.width}}c-button--width-long{{/if}}
|
|
115
111
|
{{#if type}}{{type}}{{/if}}"
|
|
116
|
-
{{#if disabled}}disabled{{/if}}>
|
|
112
|
+
{{#if disabled}}disabled tabindex="-1"{{/if}}>
|
|
117
113
|
<span class="c-button__text">__icon--after</span>
|
|
118
114
|
<i class="c-button__icon--after" aria-description="exit page">X</i>
|
|
119
115
|
</a>
|
|
@@ -127,8 +123,7 @@
|
|
|
127
123
|
<dd><dl>
|
|
128
124
|
<dt><code><button></code></dt>
|
|
129
125
|
<dd>
|
|
130
|
-
<button class="c-button c-button--{{this._self.name}}
|
|
131
|
-
{{#if type}}{{type}}{{/if}}"
|
|
126
|
+
<button class="c-button c-button--{{this._self.name}} c-button--width-short {{#if type}}{{type}}{{/if}}"
|
|
132
127
|
{{#if disabled}}disabled{{/if}}>
|
|
133
128
|
<span class="c-button__text">--width-short</span>
|
|
134
129
|
</button>
|
|
@@ -144,17 +139,16 @@
|
|
|
144
139
|
{{#if supports.link-tag}}
|
|
145
140
|
<dt><code><a></code></dt>
|
|
146
141
|
<dd>
|
|
147
|
-
<a href="#" class="c-button c-button--{{this._self.name}}
|
|
148
|
-
{{#if
|
|
149
|
-
{{#if disabled}}disabled{{/if}}>
|
|
142
|
+
<a href="#" class="c-button c-button--{{this._self.name}} c-button--width-short {{#if type}}{{type}}{{/if}}"
|
|
143
|
+
{{#if disabled}}disabled tabindex="-1"{{/if}}>
|
|
150
144
|
<span class="c-button__text">--width-short</span>
|
|
151
145
|
</a>
|
|
152
146
|
<a href="#" class="c-button c-button--{{this._self.name}} c-button--width-medium {{#if type}}{{type}}{{/if}}"
|
|
153
|
-
{{#if disabled}}disabled{{/if}}>
|
|
147
|
+
{{#if disabled}}disabled tabindex="-1"{{/if}}>
|
|
154
148
|
<span class="c-button__text">--width-medium</span>
|
|
155
149
|
</a>
|
|
156
150
|
<a href="#" class="c-button c-button--{{this._self.name}} c-button--width-long {{#if type}}{{type}}{{/if}}"
|
|
157
|
-
{{#if disabled}}disabled{{/if}}>
|
|
151
|
+
{{#if disabled}}disabled tabindex="-1"{{/if}}>
|
|
158
152
|
<span class="c-button__text">--width-long</span>
|
|
159
153
|
</a>
|
|
160
154
|
</dd>
|
|
@@ -21,12 +21,17 @@
|
|
|
21
21
|
border-width: var(--global-border-width--normal);
|
|
22
22
|
border-style: solid;
|
|
23
23
|
|
|
24
|
-
font-weight: 500;
|
|
25
|
-
|
|
26
24
|
@extend %x-truncate--one-line;
|
|
27
25
|
}
|
|
26
|
+
.c-button:not(.c-button--as-link) {
|
|
27
|
+
font-weight: var(--medium);
|
|
28
|
+
}
|
|
28
29
|
a.c-button {
|
|
29
30
|
text-decoration: none;
|
|
31
|
+
text-align: center;
|
|
32
|
+
}
|
|
33
|
+
a.c-button--is-busy {
|
|
34
|
+
cursor: default;
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
.c-button:not(:--disabled) {
|
|
@@ -79,7 +84,7 @@ a.c-button {
|
|
|
79
84
|
var(--global-color-accent--dark);
|
|
80
85
|
}
|
|
81
86
|
|
|
82
|
-
.c-button--primary:focus:not(:active) {
|
|
87
|
+
.c-button--primary:focus:not(:active, .c-button--is-busy) {
|
|
83
88
|
color: var(--global-color-primary--xx-light);
|
|
84
89
|
background-color: var(--global-color-accent--normal);
|
|
85
90
|
border-color: var(--global-color-primary--xx-light);
|
|
@@ -118,7 +123,7 @@ a.c-button {
|
|
|
118
123
|
var(--global-color-accent--dark);
|
|
119
124
|
}
|
|
120
125
|
|
|
121
|
-
.c-button--secondary:focus:not(:active) {
|
|
126
|
+
.c-button--secondary:focus:not(:active, .c-button--is-busy) {
|
|
122
127
|
color: var(--global-color-primary--xx-dark);
|
|
123
128
|
background-color: var(--global-color-accent--weak);
|
|
124
129
|
border-color: var(--global-color-primary--xx-dark);
|
|
@@ -156,7 +161,7 @@ a.c-button {
|
|
|
156
161
|
var(--global-color-accent--dark);
|
|
157
162
|
}
|
|
158
163
|
|
|
159
|
-
.c-button--tertiary:focus:not(:active) {
|
|
164
|
+
.c-button--tertiary:focus:not(:active, .c-button--is-busy) {
|
|
160
165
|
color: var(--global-color-primary--xx-dark);
|
|
161
166
|
background-color: var(--global-color-primary--light);
|
|
162
167
|
border-color: var(--global-color-primary--xx-dark);
|
|
@@ -226,6 +231,7 @@ a.c-button {
|
|
|
226
231
|
padding-inline: unset;
|
|
227
232
|
|
|
228
233
|
font-size: inherit;
|
|
234
|
+
font-family: inherit;
|
|
229
235
|
}
|
|
230
236
|
.c-button--as-link:where(:not(:--disabled)):hover {
|
|
231
237
|
@extend .x-link--hover;
|
|
@@ -255,7 +261,7 @@ a.c-button {
|
|
|
255
261
|
.c-button--as-link
|
|
256
262
|
) {
|
|
257
263
|
width: auto;
|
|
258
|
-
--max-width:
|
|
264
|
+
--max-width: auto;
|
|
259
265
|
}
|
|
260
266
|
.c-button--width-short {
|
|
261
267
|
width: var(--min-width);
|
|
@@ -156,7 +156,7 @@ dt {
|
|
|
156
156
|
font-weight: initial; /* overwrite Bootstrap */
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
li {
|
|
159
|
+
li:not(td li) {
|
|
160
160
|
line-height: 1.6;
|
|
161
161
|
}
|
|
162
162
|
|
|
@@ -175,10 +175,10 @@ hr {
|
|
|
175
175
|
/*
|
|
176
176
|
Inline Text Semantics
|
|
177
177
|
|
|
178
|
-
Elements that define the meaning, structure, or style of a word, line, or any arbitrary piece of text.
|
|
178
|
+
Elements that define the meaning, structure, or style of a word, line, or any arbitrary piece of text. (The [<a>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) is styled in `../links.css`.)
|
|
179
179
|
|
|
180
180
|
```
|
|
181
|
-
<
|
|
181
|
+
<abbr> <b> <bdi> <bdo> <br> <cite> <code> <data> <dfn> <em> <i> <kbd> <mark> <q> <rb> <rp> <rt> <rtc> <ruby> <s> <samp> <small> <span> <strong> <sub> <sup> <time> <u> <var> <wbr>
|
|
182
182
|
```
|
|
183
183
|
|
|
184
184
|
Reference:
|
|
@@ -188,21 +188,6 @@ Reference:
|
|
|
188
188
|
Styleguide Elements.InlineTextSemantics
|
|
189
189
|
*/
|
|
190
190
|
|
|
191
|
-
/* Links */
|
|
192
|
-
|
|
193
|
-
a {
|
|
194
|
-
color: var(--global-color-link-on-light--normal);
|
|
195
|
-
text-decoration-thickness: var(--global-border-width--normal);
|
|
196
|
-
}
|
|
197
|
-
a:hover {
|
|
198
|
-
text-decoration-line: underline;
|
|
199
|
-
text-decoration-style: dashed;
|
|
200
|
-
}
|
|
201
|
-
a:focus {
|
|
202
|
-
text-decoration-line: underline;
|
|
203
|
-
text-decoration-style: dotted;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
191
|
/* Monospace */
|
|
207
192
|
|
|
208
193
|
var,
|
|
@@ -347,37 +332,6 @@ Styleguide Elements.DemarcatingEdits
|
|
|
347
332
|
|
|
348
333
|
|
|
349
334
|
|
|
350
|
-
/*
|
|
351
|
-
Table Content
|
|
352
|
-
|
|
353
|
-
Elements that create and handle tabular data.
|
|
354
|
-
|
|
355
|
-
```
|
|
356
|
-
<table> <thead> <tbody> <th> <td> <tfoot> <colgroup> <col> <caption>
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
Reference:
|
|
360
|
-
|
|
361
|
-
- [HTML element reference: Table content | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Table_content)
|
|
362
|
-
|
|
363
|
-
Styleguide Elements.Tables
|
|
364
|
-
*/
|
|
365
|
-
|
|
366
|
-
table,
|
|
367
|
-
td,
|
|
368
|
-
th {
|
|
369
|
-
border: var(--global-border--normal);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
caption {
|
|
373
|
-
font-size: var(--global-font-size--small);
|
|
374
|
-
text-align: unset; /* undo Bootstrap _reboot.css */
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
335
|
/*
|
|
382
336
|
Interactive Elements
|
|
383
337
|
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
preview: '@preview.cms'
|
|
2
|
+
context:
|
|
3
|
+
supportStyles:
|
|
4
|
+
- /assets/elements/links.css
|
|
5
|
+
- /assets/components/c-button.css
|
|
6
|
+
variants:
|
|
7
|
+
- name: default
|
|
8
|
+
label: Basic
|
|
9
|
+
context:
|
|
10
|
+
data:
|
|
11
|
+
cols:
|
|
12
|
+
- ID
|
|
13
|
+
- Name
|
|
14
|
+
- Size
|
|
15
|
+
- Time
|
|
16
|
+
- Actions
|
|
17
|
+
rows:
|
|
18
|
+
- id: n234as
|
|
19
|
+
name-link: apple-sauce
|
|
20
|
+
custom-1: 0.5 KB
|
|
21
|
+
time: 12/01/2019 11:04:19
|
|
22
|
+
acts:
|
|
23
|
+
- is-link: true
|
|
24
|
+
text: View Details
|
|
25
|
+
- is-button: true
|
|
26
|
+
text: Delete
|
|
27
|
+
- id: 56l810
|
|
28
|
+
name-link: milk-shake-032
|
|
29
|
+
custom-1: 300.0 KB
|
|
30
|
+
time: 03/22/2021 05:23:01
|
|
31
|
+
acts:
|
|
32
|
+
- is-link: true
|
|
33
|
+
text: View Details
|
|
34
|
+
- is-button: true
|
|
35
|
+
text: Delete
|
|
36
|
+
- id: 3r56xc
|
|
37
|
+
name-link: white-candy-5
|
|
38
|
+
custom-1: 1.5 MB
|
|
39
|
+
time: 12/01/2019 11:04:19
|
|
40
|
+
acts:
|
|
41
|
+
- is-link: true
|
|
42
|
+
text: View Details
|
|
43
|
+
- is-button: true
|
|
44
|
+
text: Delete
|
|
45
|
+
- name: paragraph
|
|
46
|
+
context:
|
|
47
|
+
data:
|
|
48
|
+
cols:
|
|
49
|
+
- Name
|
|
50
|
+
- Summary
|
|
51
|
+
- Actions
|
|
52
|
+
rows:
|
|
53
|
+
- name: apple-sauce
|
|
54
|
+
paragraph: true
|
|
55
|
+
acts:
|
|
56
|
+
- is-link: true
|
|
57
|
+
text: View Details
|
|
58
|
+
- is-button: true
|
|
59
|
+
text: Delete
|
|
60
|
+
- name: milk-shake-032
|
|
61
|
+
paragraph: true
|
|
62
|
+
acts:
|
|
63
|
+
- is-link: true
|
|
64
|
+
text: View Details
|
|
65
|
+
- is-button: true
|
|
66
|
+
text: Delete
|
|
67
|
+
- name: white-candy-5
|
|
68
|
+
paragraph: true
|
|
69
|
+
acts:
|
|
70
|
+
- is-link: true
|
|
71
|
+
text: View Details
|
|
72
|
+
- is-button: true
|
|
73
|
+
text: Delete
|
|
74
|
+
- name: nested
|
|
75
|
+
context:
|
|
76
|
+
data:
|
|
77
|
+
has-table: true
|
|
78
|
+
cols:
|
|
79
|
+
- Title
|
|
80
|
+
- Principal Investigator
|
|
81
|
+
- Team
|
|
82
|
+
- Usage
|
|
83
|
+
rows:
|
|
84
|
+
- id: Copper
|
|
85
|
+
name: Paul Bunyan
|
|
86
|
+
name-link: View Team
|
|
87
|
+
table:
|
|
88
|
+
cols:
|
|
89
|
+
- Systems
|
|
90
|
+
- Awarded
|
|
91
|
+
- Remaining
|
|
92
|
+
- Expires
|
|
93
|
+
rows:
|
|
94
|
+
- name: Corral
|
|
95
|
+
custom-1: 50 GB
|
|
96
|
+
custom-2: <span class="c-pill">13 GB</span>
|
|
97
|
+
time: 12/01/2019 11:04:19
|
|
98
|
+
- name: Hikari
|
|
99
|
+
custom-1: 21 SU
|
|
100
|
+
custom-2: <span class="c-pill">1.5 SU</span>
|
|
101
|
+
time: 03/22/2021 05:23:01
|
|
102
|
+
- name: Ranch
|
|
103
|
+
custom-1: 1 TB
|
|
104
|
+
custom-2: <span class="c-pill">932 GB</span>
|
|
105
|
+
time: 12/01/2019 11:04:19
|
|
106
|
+
- id: Vermillion
|
|
107
|
+
name: Nathan Fillion
|
|
108
|
+
name-link: View Team
|
|
109
|
+
table:
|
|
110
|
+
cols:
|
|
111
|
+
- Systems
|
|
112
|
+
- Awarded
|
|
113
|
+
- Remaining
|
|
114
|
+
- Expires
|
|
115
|
+
rows:
|
|
116
|
+
- name: Corral
|
|
117
|
+
custom-1: 50 GB
|
|
118
|
+
custom-2: <span class="c-pill">13 GB</span>
|
|
119
|
+
time: 12/01/2019 11:04:19
|
|
120
|
+
- name: Hikari
|
|
121
|
+
custom-1: 21 SU
|
|
122
|
+
custom-2: <span class="c-pill">1.5 SU</span>
|
|
123
|
+
time: 03/22/2021 05:23:01
|
|
124
|
+
- name: Ranch
|
|
125
|
+
custom-1: 1 TB
|
|
126
|
+
custom-2: <span class="c-pill">932 GB</span>
|
|
127
|
+
time: 12/01/2019 11:04:19
|
|
128
|
+
- id: Emerald
|
|
129
|
+
name: Wesley Snipes
|
|
130
|
+
name-link: View Team
|
|
131
|
+
table:
|
|
132
|
+
cols:
|
|
133
|
+
- Systems
|
|
134
|
+
- Awarded
|
|
135
|
+
- Remaining
|
|
136
|
+
- Expires
|
|
137
|
+
rows:
|
|
138
|
+
- name: Corral
|
|
139
|
+
custom-1: 50 GB
|
|
140
|
+
custom-2: <span class="c-pill">13 GB</span>
|
|
141
|
+
time: 12/01/2019 11:04:19
|
|
142
|
+
- name: Hikari
|
|
143
|
+
custom-1: 21 SU
|
|
144
|
+
custom-2: <span class="c-pill">1.5 SU</span>
|
|
145
|
+
time: 03/22/2021 05:23:01
|
|
146
|
+
- name: Ranch
|
|
147
|
+
custom-1: 1 TB
|
|
148
|
+
custom-2: <span class="c-pill">932 GB</span>
|
|
149
|
+
time: 12/01/2019 11:04:19
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
[Table elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#table_content) create and handle tabular data.
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
<table> <thead> <tbody> <th> <td> <tfoot> <colgroup> <col> <caption>
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
/* To open external links in new window */
|
|
9
|
+
Array.from(document.links)
|
|
10
|
+
.filter(link => link.hostname != window.location.hostname)
|
|
11
|
+
.forEach(link => link.target = '_blank');
|
|
12
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
A [table]({{path './table' }}) nested inside a [table]({{path './table' }}).
|
|
2
|
+
|
|
3
|
+
> **⚠️ Workaround**
|
|
4
|
+
>
|
|
5
|
+
> Nested tables require `.has-table` class on **both** parent table **and** containing cell.
|
|
6
|
+
>
|
|
7
|
+
> <small>This is only **until** [`:has()` pseudo-class support](https://caniuse.com/css-has) exists on all major browsers.</small>
|
|
8
|
+
|
|
9
|
+
| Class | Example | On
|
|
10
|
+
| - | - | - |
|
|
11
|
+
| `.has-table` | `<table class="has-table"> … </table>` | parent table
|
|
12
|
+
| `.has-table` | `<td class="has-table"> … </td>` | cell that contains nested table
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
A [table]({{path './table' }}) with cells that have [paragraphs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p).
|
|
2
|
+
|
|
3
|
+
> **ⓘ Notice**
|
|
4
|
+
>
|
|
5
|
+
> Text will truncate at N lines; see [truncate mixin]({{path './x-truncate' }}) to control line count.
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
/* To open external links in new window */
|
|
9
|
+
Array.from(document.links)
|
|
10
|
+
.filter(link => link.hostname != window.location.hostname)
|
|
11
|
+
.forEach(link => link.target = '_blank');
|
|
12
|
+
</script>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<table {{#if data.has-table }}class="has-table"{{/if}}>
|
|
2
|
+
<thead>
|
|
3
|
+
<tr>
|
|
4
|
+
{{#each data.cols}}<th>{{ this }}</th>{{/each}}
|
|
5
|
+
</tr>
|
|
6
|
+
</thead>
|
|
7
|
+
<tbody>
|
|
8
|
+
{{#each data.rows}}
|
|
9
|
+
<tr>
|
|
10
|
+
{{#if id}}<th>{{ id }}</th>{{/if}}
|
|
11
|
+
{{#if name}}<th>{{ name }}</th>{{/if}}
|
|
12
|
+
{{#if name-link}}<th><a href="#">{{ name-link }}</a></th>{{/if}}
|
|
13
|
+
{{#if paragraph}}
|
|
14
|
+
<td title="{{> @text-of-one-paragraph }}">
|
|
15
|
+
<p>{{> @text-of-one-paragraph }}</p>
|
|
16
|
+
</td>
|
|
17
|
+
{{/if}}
|
|
18
|
+
{{#if custom-1}}<td>{{{ custom-1 }}}</td>{{/if}}
|
|
19
|
+
{{#if custom-2}}<td>{{{ custom-2 }}}</td>{{/if}}
|
|
20
|
+
{{#if custom-3}}<td>{{{ custom-3 }}}</td>{{/if}}
|
|
21
|
+
{{#if time}}<td><time>{{ time }}</time></td>{{/if}}
|
|
22
|
+
{{#if acts}}
|
|
23
|
+
<td>
|
|
24
|
+
<ul>
|
|
25
|
+
{{#each acts}}
|
|
26
|
+
{{#if is-link }}<li><a href="#">{{ text }}</a></li>{{/if}}
|
|
27
|
+
{{#if is-button}}<li>
|
|
28
|
+
<button class="c-button c-button--as-link">
|
|
29
|
+
{{ text }}
|
|
30
|
+
</button>
|
|
31
|
+
</li>{{/if}}
|
|
32
|
+
{{/each}}
|
|
33
|
+
</ul>
|
|
34
|
+
</td>
|
|
35
|
+
{{/if}}
|
|
36
|
+
{{#if table}}
|
|
37
|
+
<td class="has-table">
|
|
38
|
+
{{> @table data=table }}
|
|
39
|
+
</td>
|
|
40
|
+
{{/if}}
|
|
41
|
+
</tr>
|
|
42
|
+
{{/each}}
|
|
43
|
+
</tbody>
|
|
44
|
+
</table>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
@import url("../tools/x-truncate.css");
|
|
2
|
+
|
|
3
|
+
table {
|
|
4
|
+
/* To prevent borders from being hidden */
|
|
5
|
+
/* NOTE: Specifically, the right border of pinned columns (narrow windows) */
|
|
6
|
+
border-collapse: separate; /* overwrite Bootstrap */
|
|
7
|
+
border-spacing: 0;
|
|
8
|
+
|
|
9
|
+
font-family: var(--global-font-family--sans--portal);
|
|
10
|
+
font-size: var(--global-font-size--small);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* To add border to bottom of all rows */
|
|
14
|
+
/* FAQ: Added to cell, not row, because `border-collapse: separate` */
|
|
15
|
+
thead tr :is(td, th),
|
|
16
|
+
tr:not(:last-of-type) > :is(td, th) {
|
|
17
|
+
border-bottom: var(--global-border--normal);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* To alternate table row colors (by coloring cells, not rows) */
|
|
21
|
+
/* FAQ: Colored cells hide sibling column cells scrolled underneath */
|
|
22
|
+
/* NOTE: On narrow screens, first column is pinned and others scroll under it */
|
|
23
|
+
tr:nth-child(odd) :is(th, td) {
|
|
24
|
+
background: var(--global-color-background--app);
|
|
25
|
+
}
|
|
26
|
+
tr:nth-child(even) :is(th, td) {
|
|
27
|
+
background: var(--global-color-primary--x-light);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:is(td, th) {
|
|
31
|
+
vertical-align: top;
|
|
32
|
+
padding-block: 8px;
|
|
33
|
+
padding-inline: 16px;
|
|
34
|
+
|
|
35
|
+
color: var(--global-color-primary--dark);
|
|
36
|
+
}
|
|
37
|
+
/* To ensure <thead> height matches between browsers */
|
|
38
|
+
:is(td, th) {
|
|
39
|
+
/* FAQ: Line-height > font-size accomodates ascender & descender letters */
|
|
40
|
+
/* HACK: Units for line-height are discouraged */
|
|
41
|
+
/* NOTE: If line-height unitless, Firefox & Chrome give different height */
|
|
42
|
+
/* IMPORTANT: More than for consistency; `table--nested.css` requires this */
|
|
43
|
+
line-height: var(--global-font-size--medium);
|
|
44
|
+
}
|
|
45
|
+
/* To pin first column to left of table even during scroll */
|
|
46
|
+
/* WARNING: Design has not reviewed this (but not designed responsive table) */
|
|
47
|
+
:is(th, td):first-child {
|
|
48
|
+
position: sticky;
|
|
49
|
+
left: 0;
|
|
50
|
+
|
|
51
|
+
border-right: var(--global-border-width--normal) solid var(--global-color-primary--light);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
th {
|
|
55
|
+
color: var(--global-color-primary--x-dark);
|
|
56
|
+
|
|
57
|
+
text-align: inherit; /* copied from Bootstrap 4.0.0 */
|
|
58
|
+
}
|
|
59
|
+
thead > tr > th {
|
|
60
|
+
font-weight: var(--bold);
|
|
61
|
+
}
|
|
62
|
+
tbody > tr > th {
|
|
63
|
+
font-weight: var(--normal);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
caption {
|
|
67
|
+
font-size: var(--global-font-size--small);
|
|
68
|
+
text-align: unset; /* undo Bootstrap _reboot.css */
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/* Cell Content */
|
|
74
|
+
|
|
75
|
+
/* To override browser */
|
|
76
|
+
td ul {
|
|
77
|
+
list-style: none;
|
|
78
|
+
padding-inline-start: 0;
|
|
79
|
+
margin-block: 0;
|
|
80
|
+
}
|
|
81
|
+
td li:not(:last-of-type) {
|
|
82
|
+
/* To match line-height of other cells, but still allow space between items */
|
|
83
|
+
margin-bottom: 0.5em;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* To override browser */
|
|
87
|
+
td button {
|
|
88
|
+
/* To match font-size of table cell text and links */
|
|
89
|
+
font-size: inherit;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* To override `site.css` or browser */
|
|
93
|
+
table p {
|
|
94
|
+
margin-top: 0;
|
|
95
|
+
}
|
|
96
|
+
table p:last-child {
|
|
97
|
+
margin-bottom: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
table p {
|
|
101
|
+
@extend %x-truncate--many-lines;
|
|
102
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@import url('../tools/x-truncate.css');
|
|
2
|
+
|
|
3
|
+
@supports selector(:has(table)) {
|
|
4
|
+
/* To ensure matching row height of nested table and parent table */
|
|
5
|
+
table:has(table) :is(td, th) { white-space: nowrap; }
|
|
6
|
+
|
|
7
|
+
/* To move even row background to nested table only */
|
|
8
|
+
table:has(table) tr:nth-child(even) :is(th, td) {
|
|
9
|
+
background: var(--global-color-background--app);
|
|
10
|
+
}
|
|
11
|
+
td:has(table) tr:nth-child(even) :is(th, td) {
|
|
12
|
+
background: var(--global-color-primary--x-light);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* To align nested table cells with parent table cells */
|
|
16
|
+
td:has(table) { padding: 0; }
|
|
17
|
+
}
|
|
18
|
+
@supports not selector(:has(table)) {
|
|
19
|
+
/* To ensure matching row height of nested table and parent table */
|
|
20
|
+
table.has-table :is(td, th) { white-space: nowrap; }
|
|
21
|
+
|
|
22
|
+
/* To move even row background to nested table only */
|
|
23
|
+
table.has-table tr:nth-child(even) :is(th, td) {
|
|
24
|
+
background: var(--global-color-background--app);
|
|
25
|
+
}
|
|
26
|
+
td.has-table tr:nth-child(even) :is(th, td) {
|
|
27
|
+
background: var(--global-color-primary--x-light);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* To align nested table cells with parent table cells */
|
|
31
|
+
td.has-table { padding: 0; }
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* To replace parent table columns above with nested table columns */
|
|
35
|
+
/* FAQ: Pulls nested table up by the height of the parent table head */
|
|
36
|
+
tr table {
|
|
37
|
+
--offset: calc(-1 * 33px); /* WARNING: manually calculated */
|
|
38
|
+
|
|
39
|
+
transform: translateY(var(--offset));
|
|
40
|
+
margin-bottom: var(--offset);
|
|
41
|
+
}
|
|
42
|
+
/* FAQ: Hides any parent table head underneath nested table head */
|
|
43
|
+
tr:first-of-type thead {
|
|
44
|
+
background: var(--global-color-background--app);
|
|
45
|
+
}
|
|
46
|
+
/* FAQ: Hides all successive (thus redundant) nested table heads */
|
|
47
|
+
tr:not(:first-of-type) thead {
|
|
48
|
+
visibility: hidden;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* To reduce inline padding
|
|
52
|
+
at start and end of nested table
|
|
53
|
+
unless at start or end of parent table */
|
|
54
|
+
td:not(:first-child) th:first-child,
|
|
55
|
+
td:not(:first-child) td:first-child {
|
|
56
|
+
padding-inline-start: 8px;
|
|
57
|
+
}
|
|
58
|
+
td:not(:last-child) th:last-child,
|
|
59
|
+
td:not(:last-child) td:last-child {
|
|
60
|
+
padding-inline-end: 8px;
|
|
61
|
+
}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
{{!-- FAQ: The `class` var may be set by patterns including this template --}}
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<dl>
|
|
4
|
+
<dt>Standard</dt>
|
|
5
|
+
<dd><span class="x-link">default</span></dd>
|
|
6
|
+
<dd><span class="x-link x-link--hover">:hover</span></dd>
|
|
7
|
+
<dd><span class="x-link x-link--active">:active</span></dd>
|
|
8
|
+
<dd><span class="x-link x-link--hover x-link--active">:hover and :active</span></dd>
|
|
9
|
+
<dt>Irregular</dt>
|
|
10
|
+
<dd><span class="x-link--irregular">default</span></dd>
|
|
11
|
+
<dd><span class="x-link x-link--irregular--hover">:hover</span></dd>
|
|
12
|
+
<dd><span class="x-link x-link--irregular--active">:active</span></dd>
|
|
13
|
+
<dd><span class="x-link x-link--irregular--hover x-link--irregular--active">:hover and :active</span></dd>
|
|
14
|
+
</dl>
|