@tacc/core-styles 0.9.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/README.md +21 -11
- package/dist/branding_logos.css +1 -2
- 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/bootstrap.modal/docs.css +1 -0
- package/dist/components/bootstrap/docs.css +1 -0
- package/dist/components/bootstrap/portal/bootstrap.form/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 -2
- package/dist/components/bootstrap.css +1 -0
- package/dist/components/bootstrap.figure.css +1 -2
- package/dist/components/bootstrap.form/docs.css +1 -0
- package/dist/components/bootstrap.form.css +1 -2
- package/dist/components/bootstrap.modal/docs.css +1 -0
- package/dist/components/bootstrap.modal.css +1 -2
- package/dist/components/bootstrap.pagination.css +1 -2
- package/dist/components/c-button/docs.css +1 -0
- package/dist/components/c-button.css +1 -2
- package/dist/components/c-callout.css +1 -2
- package/dist/components/c-card.css +1 -2
- package/dist/components/c-data-list.css +1 -2
- package/dist/components/c-footer.css +1 -2
- package/dist/components/c-image-map.css +1 -2
- package/dist/components/c-image-map.skin.css +1 -1
- package/dist/components/c-image-map.structure.css +1 -2
- package/dist/components/c-message.css +1 -2
- package/dist/components/c-nav.css +1 -2
- package/dist/components/c-page.css +1 -2
- package/dist/components/c-recognition.css +1 -2
- package/dist/components/c-see-all-link.css +1 -2
- package/dist/components/c-show-more.css +1 -2
- package/dist/components/cortal.icon.css +1 -2
- package/dist/components/cortal.icon.font.css +1 -2
- package/dist/elements/README.css +1 -1
- package/dist/elements/bootstrap.css +1 -2
- package/dist/elements/form.cms.css +1 -2
- package/dist/elements/html-elements.cms.css +1 -2
- package/dist/elements/links/docs.css +1 -0
- package/dist/elements/links.css +1 -0
- package/dist/elements/table/docs.css +1 -0
- package/dist/elements/table/table.docs.css +1 -0
- package/dist/elements/table copy.css +1 -0
- package/dist/elements/table--basic.css +1 -0
- package/dist/elements/table--nested.css +1 -0
- package/dist/elements/table.css +1 -0
- package/dist/elements/tacc-search-bar.css +1 -2
- package/dist/fonts/fonts/BentonSans-Bold.otf +0 -0
- package/dist/fonts/fonts/BentonSans-Medium.otf +0 -0
- package/dist/fonts/fonts/BentonSans-MediumItalic.otf +0 -0
- package/dist/fonts/fonts/BentonSans-Regular.otf +0 -0
- package/dist/fractal.server.css +1 -0
- package/dist/fractal.server.refresh.css +1 -0
- package/dist/fractal.server.reload.css +1 -0
- package/dist/generics/README.css +1 -1
- package/dist/generics/fonts.css +1 -2
- package/dist/objects/README.css +1 -1
- package/dist/objects/o-fixed-header-table.css +1 -2
- package/dist/objects/o-flex-item-table-wrap.css +1 -2
- package/dist/objects/o-float-content.css +1 -2
- package/dist/objects/o-grid.css +1 -2
- package/dist/objects/o-offset-content.css +1 -2
- package/dist/objects/o-section.css +1 -2
- package/dist/objects/o-site.css +1 -1
- package/dist/settings/README.css +1 -1
- package/dist/settings/border.css +1 -2
- package/dist/settings/color.css +1 -2
- package/dist/settings/font.css +1 -2
- package/dist/settings/max-width.css +1 -2
- package/dist/settings/space.css +1 -2
- package/dist/tools/README.css +1 -1
- package/dist/tools/media-queries.css +1 -1
- package/dist/tools/x-article-link.css +1 -2
- package/dist/tools/x-center.css +1 -2
- package/dist/tools/x-fake-border.css +1 -2
- package/dist/tools/x-grid.css +1 -1
- package/dist/tools/x-layout.css +1 -2
- package/dist/tools/x-link/docs.css +1 -0
- package/dist/tools/x-link.css +1 -0
- 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 -2
- package/dist/trumps/README.css +1 -1
- package/dist/trumps/icon.css +1 -2
- package/dist/trumps/icon.fonts.css +1 -2
- package/dist/trumps/s-affixed-input-wrapper.css +1 -0
- package/dist/trumps/s-article-list.css +1 -2
- package/dist/trumps/s-article-preview.css +1 -2
- package/dist/trumps/s-blockquote.css +1 -2
- package/dist/trumps/s-breadcrumbs.css +1 -2
- package/dist/trumps/s-cms-nav.css +1 -1
- package/dist/trumps/s-document.css +1 -2
- package/dist/trumps/s-footer.css +1 -2
- package/dist/trumps/s-guide-doc.css +1 -2
- package/dist/trumps/s-header.css +1 -2
- package/dist/trumps/s-inline-dl.css +1 -2
- package/dist/trumps/s-irregular-links.css +1 -0
- package/dist/trumps/s-portal-nav.css +1 -2
- package/dist/trumps/s-style-guide.css +1 -2
- package/dist/trumps/s-system-specs.css +1 -2
- package/dist/trumps/tacc-search-bar.css +1 -2
- package/dist/trumps/u-empty.css +1 -1
- package/dist/trumps/u-hide.css +1 -2
- package/dist/trumps/u-mailto-text-replace.css +1 -2
- package/dist/trumps/u-nested-text-content.css +1 -2
- package/fractal.config.js +7 -5
- package/package.json +26 -13
- package/src/lib/_imports/README.md +13 -20
- package/src/lib/_imports/_partials/bootstrap.css.hbs +1 -0
- package/src/lib/_imports/_partials/bootstrap.js.hbs +2 -0
- package/src/lib/_imports/_partials/cms.css.hbs +3 -0
- package/src/lib/_imports/_partials/css.hbs +27 -0
- package/src/lib/_imports/_partials/loremipsum.hbs +18 -0
- package/src/lib/_imports/_partials/text-and-button-as-link.hbs +1 -0
- package/src/lib/_imports/_partials/text-and-link.hbs +1 -0
- package/src/lib/_imports/_partials/text-of-one-paragraph.hbs +1 -0
- package/src/lib/_imports/_preview.bootstrap-cms.hbs +5 -0
- package/src/lib/_imports/_preview.bootstrap.hbs +5 -0
- package/src/lib/_imports/_preview.cms.hbs +3 -0
- package/src/lib/_imports/_preview.hbs +22 -10
- package/src/lib/_imports/components/_components.config.yml +2 -1
- package/src/lib/_imports/components/bootstrap/bootstrap--container.hbs +4 -0
- package/src/lib/_imports/components/bootstrap/bootstrap--container.readme.md +54 -0
- package/src/lib/_imports/components/bootstrap/bootstrap--form.docs.css +5 -0
- package/src/lib/_imports/components/bootstrap/bootstrap--form.hbs +17 -0
- package/src/lib/_imports/components/bootstrap/bootstrap--form.readme.md +17 -0
- package/src/lib/_imports/components/bootstrap/bootstrap--modal.docs.css +12 -0
- package/src/lib/_imports/components/bootstrap/bootstrap--modal.hbs +51 -0
- package/src/lib/_imports/components/bootstrap/bootstrap--modal.readme.md +8 -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.container.css +3 -11
- package/src/lib/_imports/components/bootstrap.css +3 -0
- package/src/lib/_imports/components/bootstrap.form.css +0 -7
- package/src/lib/_imports/components/bootstrap.modal.css +0 -12
- package/src/lib/_imports/components/c-button/c-button.hbs +22 -18
- package/src/lib/_imports/components/c-button/{c-button.config.yml → config.yml} +2 -0
- package/src/lib/_imports/components/c-button/{c-button_docs.css → docs.css} +2 -0
- package/src/lib/_imports/components/c-button.css +25 -10
- package/src/lib/_imports/elements/_elements.config.yml +2 -1
- package/src/lib/_imports/elements/form.cms.css +50 -0
- package/src/lib/_imports/elements/html-elements.cms.css +3 -66
- package/src/lib/_imports/elements/links/config.yml +3 -0
- package/src/lib/_imports/elements/links/docs.css +6 -0
- package/src/lib/_imports/elements/links/links.hbs +10 -0
- package/src/lib/_imports/elements/links/readme.md +8 -0
- package/src/lib/_imports/elements/links.css +11 -0
- 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/fractal.server.refresh.css +0 -0
- package/src/lib/_imports/generics/_generics.config.yml +2 -1
- package/src/lib/_imports/objects/_objects.config.yml +2 -1
- package/src/lib/_imports/tools/_tools.config.yml +2 -0
- package/src/lib/_imports/tools/x-link/docs.css +6 -0
- package/src/lib/_imports/tools/x-link/readme.md +14 -0
- package/src/lib/_imports/tools/x-link/x-link.hbs +14 -0
- package/src/lib/_imports/tools/x-link.css +38 -0
- package/src/lib/_imports/tools/x-mailto-text-replace.css +6 -4
- package/src/lib/_imports/trumps/_trumps.config.yml +3 -1
- package/src/lib/_imports/trumps/s-affixed-input-wrapper/config.yml +5 -0
- package/src/lib/_imports/trumps/s-affixed-input-wrapper/readme.md +22 -0
- package/src/lib/_imports/trumps/s-affixed-input-wrapper/s-affixed-input-wrapper.hbs +30 -0
- package/src/lib/_imports/trumps/s-affixed-input-wrapper.css +94 -0
- package/src/lib/_imports/trumps/s-irregular-links/config.yml +8 -0
- package/src/lib/_imports/trumps/s-irregular-links/readme.md +29 -0
- package/src/lib/_imports/trumps/s-irregular-links/s-irregular-links.hbs +10 -0
- package/src/lib/_imports/trumps/s-irregular-links.css +14 -0
- package/src/lib/_imports/trumps/u-mailto-text-replace/config.yml +4 -0
- package/src/lib/_imports/trumps/u-mailto-text-replace/readme.md +15 -0
- package/src/lib/_imports/trumps/u-mailto-text-replace.css +1 -1
- package/dist/components/c-button/c-button_docs.css +0 -2
- package/dist/elements/html-elements.css +0 -2
- package/src/lib/_imports/components/_components.preview.hbs +0 -1
- package/src/lib/_imports/elements/_elements.preview.hbs +0 -1
- package/src/lib/_imports/generics/_generics.preview.hbs +0 -1
- package/src/lib/_imports/objects/_objects.preview.hbs +0 -1
- package/src/lib/_imports/trumps/_trumps.preview.hbs +0 -1
- package/src/lib/_imports/trumps/u-mailto-text-replace/u-mailto-text-replace.config.yml +0 -7
- 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
|
@@ -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
|
+
}
|
|
File without changes
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
context:
|
|
2
|
+
subdir: "generics"
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
context:
|
|
2
|
+
subdir: "objects"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
UI states of [`<a>` anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) as mixins.
|
|
2
|
+
|
|
3
|
+
| Mixin | Description
|
|
4
|
+
| - | -
|
|
5
|
+
| `.x-link` | default state
|
|
6
|
+
| `.x-link--hover` | `:hover` state
|
|
7
|
+
| `.x-link--active` | `:active` (click) state
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
/* To open external links in new window */
|
|
11
|
+
Array.from(document.links)
|
|
12
|
+
.filter(link => link.hostname != window.location.hostname)
|
|
13
|
+
.forEach(link => link.target = '_blank');
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{{!-- FAQ: The `class` var may be set by patterns including this template --}}
|
|
2
|
+
|
|
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>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@import url('../settings/color.css');
|
|
2
|
+
@import url('../settings/border.css');
|
|
3
|
+
|
|
4
|
+
.x-link {
|
|
5
|
+
color: var(--global-color-link-on-light--normal);
|
|
6
|
+
|
|
7
|
+
text-decoration: none;
|
|
8
|
+
text-underline-offset: 0.2em;
|
|
9
|
+
text-decoration-thickness: var(--global-border-width--normal);
|
|
10
|
+
}
|
|
11
|
+
.x-link--hover {
|
|
12
|
+
text-decoration-line: underline;
|
|
13
|
+
text-decoration-style: solid;
|
|
14
|
+
|
|
15
|
+
/* To overwrite Bootstrap (on Client) */
|
|
16
|
+
color: var(--global-color-link-on-light--normal);
|
|
17
|
+
text-decoration-thickness: var(--global-border-width--normal);
|
|
18
|
+
}
|
|
19
|
+
.x-link--active {
|
|
20
|
+
text-decoration-line: underline;
|
|
21
|
+
text-decoration-style: dotted;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.x-link--irregular {
|
|
25
|
+
@extend .x-link;
|
|
26
|
+
|
|
27
|
+
text-decoration-line: underline;
|
|
28
|
+
}
|
|
29
|
+
.x-link--irregular--hover {
|
|
30
|
+
@extend .x-link--hover;
|
|
31
|
+
|
|
32
|
+
text-decoration-style: dashed;
|
|
33
|
+
}
|
|
34
|
+
.x-link--irregular--active {
|
|
35
|
+
@extend .x-link--active;
|
|
36
|
+
|
|
37
|
+
text-decoration-style: dotted;
|
|
38
|
+
}
|
|
@@ -6,13 +6,15 @@ Replace mailto link rendered text with virtual text from data-attributes
|
|
|
6
6
|
Styleguide Tools.ExtendsAndMixins.MailtoTextReplace
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
/* To replace actual link text with generated link text */
|
|
9
10
|
%x-mailto-text-replace {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
/* FAQ: Using `display: none` would hide pseudo element text */
|
|
12
|
+
visibility: hidden; /* to hide actual link text */
|
|
13
|
+
font-size: 0; /* to remove space of hidden text */
|
|
12
14
|
}
|
|
13
15
|
%x-mailto-text-replace::before {
|
|
14
16
|
display: inline;
|
|
15
17
|
content: attr(data-user) "@" attr(data-domain);
|
|
16
|
-
font-size: initial;
|
|
17
|
-
visibility: visible;
|
|
18
|
+
font-size: initial; /* to restore font size */
|
|
19
|
+
visibility: visible; /* to restore visibility */
|
|
18
20
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
To affix a symbol before or after a field.
|
|
2
|
+
|
|
3
|
+
_This is an isolated feature from [Bootstrap Input Group](https://getbootstrap.com/docs/4.0/components/input-group/#basic-example)._
|
|
4
|
+
|
|
5
|
+
**Use Cases**
|
|
6
|
+
|
|
7
|
+
- [APCD](https://apcd-qa.tacc.utexas.edu/register/request-to-submit) "Total Claims Value"
|
|
8
|
+
|
|
9
|
+
**Known Bugs**
|
|
10
|
+
|
|
11
|
+
1. Using `s-affixed-input-wrapper__suffix` shrinks field width.
|
|
12
|
+
2. A `s-affixed-input-wrapper__suffix` overlaps with browser controls e.g.
|
|
13
|
+
- `<input type="number">` arrows
|
|
14
|
+
- `<input type="date">` calendar
|
|
15
|
+
- `<input type="time">` clock
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
/* To open external links in new window */
|
|
19
|
+
Array.from(document.links)
|
|
20
|
+
.filter(link => link.hostname != window.location.hostname)
|
|
21
|
+
.forEach(link => link.target = '_blank');
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<dl>
|
|
2
|
+
<dt>Prefix</dt>
|
|
3
|
+
<dd class="s-affixed-input-wrapper s-affixed-input-wrapper--prefix">
|
|
4
|
+
<label for="field-dollars">How many dollars to you have?</label>
|
|
5
|
+
|
|
6
|
+
<span class="s-affixed-input-wrapper__prefix">$</span>
|
|
7
|
+
<input
|
|
8
|
+
type="number"
|
|
9
|
+
name="dollars"
|
|
10
|
+
id="field-dollars"
|
|
11
|
+
inputmode="numeric"
|
|
12
|
+
step="0.01"
|
|
13
|
+
min="0.01"
|
|
14
|
+
/>
|
|
15
|
+
</dd>
|
|
16
|
+
<dt>Suffix</dt>
|
|
17
|
+
<dd class="s-affixed-input-wrapper s-affixed-input-wrapper--suffix">
|
|
18
|
+
<label for="field-usd">How many US Dollars to you have?</label>
|
|
19
|
+
|
|
20
|
+
<input
|
|
21
|
+
type="number"
|
|
22
|
+
name="usd"
|
|
23
|
+
id="field-usd"
|
|
24
|
+
inputmode="numeric"
|
|
25
|
+
step="0.01"
|
|
26
|
+
min="0.01"
|
|
27
|
+
/>
|
|
28
|
+
<span class="s-affixed-input-wrapper__suffix">$</span>
|
|
29
|
+
</dd>
|
|
30
|
+
</dl>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
@import url("../settings/border.css");
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/* Layout */
|
|
6
|
+
|
|
7
|
+
.s-affixed-input-wrapper:not(
|
|
8
|
+
.checkboxinput,
|
|
9
|
+
.radio,
|
|
10
|
+
.select,
|
|
11
|
+
.checkboxselectmultiple,
|
|
12
|
+
.textarea
|
|
13
|
+
) {
|
|
14
|
+
display: grid;
|
|
15
|
+
align-items: start;
|
|
16
|
+
grid-template-columns: auto 1fr;
|
|
17
|
+
grid-template-areas:
|
|
18
|
+
"label label"
|
|
19
|
+
var(--input-row, "input input")
|
|
20
|
+
"help help"
|
|
21
|
+
"error error";
|
|
22
|
+
}
|
|
23
|
+
@supports selector(:has(*)) {
|
|
24
|
+
.s-affixed-input-wrapper:has(.s-affixed-input-wrapper__prefix) {
|
|
25
|
+
--input-row: "prefix input";
|
|
26
|
+
}
|
|
27
|
+
.s-affixed-input-wrapper:has(.s-affixed-input-wrapper__suffix) {
|
|
28
|
+
--input-row: "input suffix";
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
@supports not selector(:has(*)) {
|
|
32
|
+
.s-affixed-input-wrapper--prefix {
|
|
33
|
+
--input-row: "prefix input";
|
|
34
|
+
}
|
|
35
|
+
.s-affixed-input-wrapper--suffix {
|
|
36
|
+
--input-row: "input suffix";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
.s-affixed-input-wrapper label { grid-area: label; }
|
|
40
|
+
.s-affixed-input-wrapper input { grid-area: input; }
|
|
41
|
+
.s-affixed-input-wrapper__prefix { grid-area: prefix; }
|
|
42
|
+
.s-affixed-input-wrapper__suffix { grid-area: suffix; }
|
|
43
|
+
.s-affixed-input-wrapper .help-text { grid-area: help; }
|
|
44
|
+
.s-affixed-input-wrapper .field-errors { grid-area: error; }
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
/* Variables */
|
|
49
|
+
|
|
50
|
+
.s-affixed-input-wrapper {
|
|
51
|
+
--width: 1em;
|
|
52
|
+
--padding-vert: 5px; /* mimic input */
|
|
53
|
+
--padding-horz: 10px; /* mimic input */
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/* Prefix & Suffix */
|
|
59
|
+
|
|
60
|
+
.s-affixed-input-wrapper__prefix,
|
|
61
|
+
.s-affixed-input-wrapper__suffix {
|
|
62
|
+
/* To mimic shape of an input */
|
|
63
|
+
display: inline-block;
|
|
64
|
+
padding: var(--padding-vert) var(--padding-horz);
|
|
65
|
+
|
|
66
|
+
/* To have consistent size */
|
|
67
|
+
width: var(--width);
|
|
68
|
+
text-align: center;
|
|
69
|
+
box-sizing: content-box;
|
|
70
|
+
|
|
71
|
+
/* To limit interaction */
|
|
72
|
+
user-select: none;
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
|
|
75
|
+
/* To mimic input font */
|
|
76
|
+
font-family: var(--global-font-family--sans--portal);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* To render <span> atop and (as if) within input */
|
|
80
|
+
.s-affixed-input-wrapper__prefix {
|
|
81
|
+
position: relative;
|
|
82
|
+
top: var(--global-border-width--normal);
|
|
83
|
+
left: var(--global-border-width--normal);
|
|
84
|
+
margin-right: calc(-1 * var(--width) - var(--padding-horz) * 2);
|
|
85
|
+
}
|
|
86
|
+
.s-affixed-input-wrapper__suffix {
|
|
87
|
+
position: relative;
|
|
88
|
+
top: var(--global-border-width--normal);
|
|
89
|
+
right: var(--global-border-width--normal);
|
|
90
|
+
margin-left: calc(-1 * var(--width) - var(--padding-horz) * 2);
|
|
91
|
+
}
|
|
92
|
+
.s-affixed-input-wrapper__prefix + input {
|
|
93
|
+
text-indent: calc(var(--width) + var(--padding-horz));
|
|
94
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
This allows us to satisfy clients who strongly prefer [standard CMS links]¹ are underlined.
|
|
2
|
+
|
|
3
|
+
> **⚠️ Warning**
|
|
4
|
+
>
|
|
5
|
+
> Do **not** add to `<body>` tag, otherwise header may adversely inherit styles.
|
|
6
|
+
|
|
7
|
+
**Instructions**
|
|
8
|
+
|
|
9
|
+
1. Add `s-irregular-links` class to an ancestor element.
|
|
10
|
+
|
|
11
|
+
**Examples**
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
<main class="s-irregular-links">
|
|
15
|
+
... <a href="...">Click me</a> ...
|
|
16
|
+
</main>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
<section class="some-unique-content s-irregular-links">
|
|
21
|
+
... <a href="...">Click me</a> ...
|
|
22
|
+
</section>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
<small>¹ The [standard CMS links] do meet “WCAG 2.0 Level AA” link contrast.</small>
|
|
28
|
+
|
|
29
|
+
[standard CMS links]: /components/detail/links.cms
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@import url('../tools/x-link.css');
|
|
2
|
+
|
|
3
|
+
.s-irregular-links a,
|
|
4
|
+
.s-irregular-links .c-button--as-link {
|
|
5
|
+
@extend .x-link--irregular;
|
|
6
|
+
}
|
|
7
|
+
.s-irregular-links a:hover,
|
|
8
|
+
.s-irregular-links .c-button--as-link:hover {
|
|
9
|
+
@extend .x-link--irregular--hover;
|
|
10
|
+
}
|
|
11
|
+
.s-irregular-links a:active,
|
|
12
|
+
.s-irregular-links .c-button--as-link:active {
|
|
13
|
+
@extend .x-link--irregular--active;
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
To render an accurate e-mail that is unlikely to read by read by a robot thus recieve spam.
|
|
2
|
+
|
|
3
|
+
Replaces the display text of an `<a href="mailto:…" data-user="bob" data-domain="">` link with the e-mail address constructed from the `data-user` and `data-domain` attributes.
|
|
4
|
+
|
|
5
|
+
> **☞ Remember**
|
|
6
|
+
>
|
|
7
|
+
> The default display text should be an _**in**accurate_ e-mail address.
|
|
8
|
+
|
|
9
|
+
> **⚠️ Important**
|
|
10
|
+
>
|
|
11
|
+
> To make sure link is discernable if CSS does not load, make it obvious to users what part of an e-mail is inaccurate, e.g. `__REMOVE_THIS__`.
|
|
12
|
+
|
|
13
|
+
**Known Bugs**
|
|
14
|
+
|
|
15
|
+
1. The underline (on hover) is not offset from generated text (because the font-size of actual text is zero).
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! @tacc/core-styles 0.8.6+ | MIT | github.com/TACC/Core-Styles */
|
|
2
|
-
html{font-size:62.5%}body,html{height:100%}body{min-width:290px;color:var(--global-color-primary--x-dark);font-family:var(--global-font-family);font-size:var(--global-font-size--medium);line-height:1.4}body>main{margin-bottom:var(--global-space--section-gap)}body>main+footer{position:-webkit-sticky;position:sticky;top:100vh}h1,h2,h3,h4,h5,h6{color:var(--global-color-primary--xx-dark)}h1,h2,h4,h5,h6{font-weight:var(--bold)}h1{margin-top:27px;margin-bottom:27px}h2{margin-top:30px;margin-bottom:var(--global-space--normal)}h1+h2,h1+hr{margin-top:-12px}h1{font-size:var(--global-font-size--xxx-large)}h2{font-size:var(--global-font-size--x-large)}h3,h4,h5,h6{margin-top:var(--global-space--normal);margin-bottom:var(--global-space--normal)}h3{font-size:var(--global-font-size--x-large)}h4{font-size:var(--global-font-size--large)}h5{text-transform:uppercase}h5,h6{font-size:var(--global-font-size--medium)}p{margin-bottom:2rem}dl dl,ol,ul{padding-left:var(--global-space--list-indent)}ol ol,ol ul,ul ol,ul ul{margin:revert}dt{margin-bottom:.5rem;font-weight:400}li{line-height:1.6}hr{margin-top:var(--global-space--hr-buffer-above);border-top:1px solid var(--global-color-primary--light);margin-bottom:var(--global-space--hr-buffer-below)}a,a:hover{color:var(--global-color-link-on-light--normal)}a:focus{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}code,kbd,pre,samp,var{font-family:var(--global-font-family--mono)}code kbd{display:inline-block;padding:.1rem .2rem;margin-left:.2rem;margin-right:.2rem;font-size:inherit}code,pre>samp{color:unset}:not(pre)>code{display:inline-block;padding:var(--global-space--xx-small) var(--global-space--x-small)}pre>code,pre>samp{display:inline-block;padding:var(--global-space--x-small) var(--global-space--small)}pre[style]>code,pre[style]>samp{min-width:100%}pre samp{opacity:.75;text-decoration:none}pre code u{opacity:.5;text-decoration:none}table,td,th{border:var(--global-border--normal)}details{margin-top:0;margin-bottom:1rem}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{> @preview subdir="components" }}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{> @preview subdir="elements" }}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{> @preview subdir="generics" }}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{> @preview subdir="objects" }}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{> @preview subdir="trumps" }}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
label: Mailto Link Text Replacement
|
|
2
|
-
notes: |-
|
|
3
|
-
Replaces the display text of an `<a href="mailto:…" data-user="bob" data-domain="">` link with the e-mail address constructed from the `data-user` and `data-domain` attributes.
|
|
4
|
-
|
|
5
|
-
This can be used to render an accurate e-mail that will not be recognized by a generic web scraper. The default display text should be an inaccurate e-mail address.
|
|
6
|
-
|
|
7
|
-
_To make sure link is accessible if CSS does not load, make it obvious to humans what part of an e-mail is inaccurate, e.g. `__REMOVE_THIS__`._
|