@tacc/core-styles 0.8.7 → 0.10.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.modal/docs.css +1 -0
- package/dist/components/bootstrap/portal/bootstrap.form/docs.css +1 -0
- package/dist/components/bootstrap.container.css +1 -2
- package/dist/components/bootstrap.figure.css +1 -2
- package/dist/components/bootstrap.form.css +1 -2
- 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 -0
- 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 -0
- package/dist/elements/form.cms.css +1 -0
- package/dist/elements/html-elements.cms.css +1 -0
- 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/BentonSans-Bold.otf +0 -0
- package/dist/fonts/BentonSans-Medium.otf +0 -0
- package/dist/fonts/BentonSans-MediumItalic.otf +0 -0
- package/dist/fonts/BentonSans-Regular.otf +0 -0
- 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 -0
- 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 +1 -0
- package/package.json +28 -12
- 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/_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/bootstrap.container.hbs +4 -0
- package/src/lib/_imports/components/bootstrap/bootstrap.container/config.yml +3 -0
- package/src/lib/_imports/components/bootstrap/bootstrap.container/readme.md +54 -0
- package/src/lib/_imports/components/bootstrap/bootstrap.modal/bootstrap.modal.hbs +53 -0
- package/src/lib/_imports/components/bootstrap/bootstrap.modal/config.yml +2 -0
- package/src/lib/_imports/components/bootstrap/bootstrap.modal/docs.css +12 -0
- package/src/lib/_imports/components/bootstrap/bootstrap.modal/readme.md +8 -0
- package/src/lib/_imports/components/bootstrap/portal/bootstrap.form/bootstrap.form.hbs +19 -0
- package/src/lib/_imports/components/bootstrap/portal/bootstrap.form/config.yml +3 -0
- package/src/lib/_imports/components/bootstrap/portal/bootstrap.form/docs.css +5 -0
- package/src/lib/_imports/components/bootstrap/portal/bootstrap.form/readme.md +17 -0
- package/src/lib/_imports/components/bootstrap.container.css +3 -11
- 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 +10 -0
- 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 +14 -5
- package/src/lib/_imports/components/c-message.css +53 -0
- package/src/lib/_imports/elements/_elements.config.yml +2 -1
- package/src/lib/_imports/elements/bootstrap.css +19 -0
- package/src/lib/_imports/elements/form.cms.css +115 -0
- package/src/lib/_imports/elements/{html-elements.css → html-elements.cms.css} +20 -31
- package/src/lib/_imports/elements/links/docs.css +6 -0
- package/src/lib/_imports/elements/links/links.hbs +12 -0
- package/src/lib/_imports/elements/links/readme.md +8 -0
- package/src/lib/_imports/elements/links.css +11 -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/generics/fonts.css +54 -0
- package/src/lib/_imports/objects/_objects.config.yml +2 -1
- package/src/lib/_imports/settings/color.css +9 -3
- package/src/lib/_imports/settings/font.css +6 -5
- 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 +3 -0
- package/src/lib/_imports/tools/x-link.css +18 -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 +2 -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 +32 -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 +19 -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/src/lib/fonts/BentonSans-Bold.otf +0 -0
- package/src/lib/fonts/BentonSans-Medium.otf +0 -0
- package/src/lib/fonts/BentonSans-MediumItalic.otf +0 -0
- package/src/lib/fonts/BentonSans-Regular.otf +0 -0
- 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
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Forms
|
|
3
|
+
|
|
4
|
+
Elements that create forms which the user can fill out and submit to the Web site or application.
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
<form> <fieldset> <legend> <label> <input> <select> <optgroup> <option> <textarea> <button> <output> <progress> <meter> <datalist>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
> **⚠️ Warning**
|
|
11
|
+
>
|
|
12
|
+
> Relies on Bootstrap.
|
|
13
|
+
|
|
14
|
+
Reference:
|
|
15
|
+
|
|
16
|
+
- [HTML element reference: Forms | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Forms)
|
|
17
|
+
- [Bootstrap Reboot: Forms](https://getbootstrap.com/docs/4.0/content/reboot/#forms)
|
|
18
|
+
|
|
19
|
+
Styleguide Elements.Forms
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/* Fonts */
|
|
25
|
+
|
|
26
|
+
/* FAQ: Setting font on form would erroneously apply to links and buttons */
|
|
27
|
+
label,
|
|
28
|
+
input,
|
|
29
|
+
select,
|
|
30
|
+
textarea {
|
|
31
|
+
font-family: var(--global-font-family--sans--portal);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
/* Labels */
|
|
37
|
+
|
|
38
|
+
label {
|
|
39
|
+
font-size: var(--global-font-size--small);
|
|
40
|
+
|
|
41
|
+
line-height: normal;
|
|
42
|
+
margin-bottom: 0.75em;
|
|
43
|
+
}
|
|
44
|
+
/* To avoid extra space between field wrappers */
|
|
45
|
+
/* FAQ: The known use case is a django.cms.forms `.checkboxselectmultiple` */
|
|
46
|
+
li > label:only-child {
|
|
47
|
+
margin-bottom: unset;
|
|
48
|
+
}
|
|
49
|
+
/* To avoid inline labels for raw form elements */
|
|
50
|
+
/* FAQ: Any specific form styling (e.g. django.cms.forms) manages this */
|
|
51
|
+
:not(input[type="checkbox"]) + label {
|
|
52
|
+
display: block;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/* Fieldsets */
|
|
58
|
+
|
|
59
|
+
fieldset:not(:last-child) {
|
|
60
|
+
margin-bottom: 3.5rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/* Fields */
|
|
66
|
+
|
|
67
|
+
input,
|
|
68
|
+
select,
|
|
69
|
+
textarea {
|
|
70
|
+
border: var(--global-border--normal);
|
|
71
|
+
}
|
|
72
|
+
::placeholder {
|
|
73
|
+
color: var(--global-color-primary--dark);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
input[type="time"],
|
|
77
|
+
input[type="date"] {
|
|
78
|
+
font-family: var(--global-font-family--mono);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* To prevent super-long fields */
|
|
82
|
+
input:not(
|
|
83
|
+
/* FAQ: These types of fields should not grow to a max */
|
|
84
|
+
[type=time],
|
|
85
|
+
[type=date],
|
|
86
|
+
[type=checkbox],
|
|
87
|
+
[type=radio]
|
|
88
|
+
),
|
|
89
|
+
select,
|
|
90
|
+
textarea {
|
|
91
|
+
max-width: 50ch;
|
|
92
|
+
}
|
|
93
|
+
input:where( /* Use `:where` so rules are easier to override */
|
|
94
|
+
[type=time],
|
|
95
|
+
[type=date],
|
|
96
|
+
[type=checkbox],
|
|
97
|
+
[type=radio]
|
|
98
|
+
) {
|
|
99
|
+
width: min-content;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media (pointer: coarse) {
|
|
103
|
+
input,
|
|
104
|
+
select,
|
|
105
|
+
textarea {
|
|
106
|
+
padding: 12px 12px;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
@media (pointer: fine), (pointer: none) {
|
|
110
|
+
input,
|
|
111
|
+
select,
|
|
112
|
+
textarea {
|
|
113
|
+
padding: 5px 10px;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -14,6 +14,9 @@ Reference:
|
|
|
14
14
|
|
|
15
15
|
Styleguide Elements.MainSectioningRoots
|
|
16
16
|
*/
|
|
17
|
+
@import url('../settings/color.css');
|
|
18
|
+
@import url('../settings/font.css');
|
|
19
|
+
@import url('../settings/space.css');
|
|
17
20
|
|
|
18
21
|
html {
|
|
19
22
|
/* Set base font but support user-defined browser font size */
|
|
@@ -33,7 +36,7 @@ body {
|
|
|
33
36
|
|
|
34
37
|
/* To overwrite Bootstrap */
|
|
35
38
|
color: var(--global-color-primary--x-dark);
|
|
36
|
-
font-family: var(--global-font-family);
|
|
39
|
+
font-family: var(--global-font-family--sans--cms);
|
|
37
40
|
font-size: var(--global-font-size--medium);
|
|
38
41
|
line-height: 1.4;
|
|
39
42
|
}
|
|
@@ -187,15 +190,18 @@ Styleguide Elements.InlineTextSemantics
|
|
|
187
190
|
|
|
188
191
|
/* Links */
|
|
189
192
|
|
|
190
|
-
a
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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
|
+
}
|
|
199
205
|
|
|
200
206
|
/* Monospace */
|
|
201
207
|
|
|
@@ -363,27 +369,10 @@ th {
|
|
|
363
369
|
border: var(--global-border--normal);
|
|
364
370
|
}
|
|
365
371
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
/*
|
|
371
|
-
Forms
|
|
372
|
-
|
|
373
|
-
Elements that create forms which the user can fill out and submit to the Web site or application.
|
|
374
|
-
|
|
375
|
-
```
|
|
376
|
-
<form> <fieldset> <legend> <label> <input> <select> <optgroup> <option> <textarea> <button> <output> <progress> <meter> <datalist>
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
Reference:
|
|
380
|
-
|
|
381
|
-
- [HTML element reference: Forms | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Forms)
|
|
382
|
-
|
|
383
|
-
Styleguide Elements.Forms
|
|
384
|
-
*/
|
|
385
|
-
|
|
386
|
-
/* … */
|
|
372
|
+
caption {
|
|
373
|
+
font-size: var(--global-font-size--small);
|
|
374
|
+
text-align: unset; /* undo Bootstrap _reboot.css */
|
|
375
|
+
}
|
|
387
376
|
|
|
388
377
|
|
|
389
378
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
The [`<a>` anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a).
|
|
2
|
+
|
|
3
|
+
<script>
|
|
4
|
+
/* To open external links in new window */
|
|
5
|
+
Array.from(document.links)
|
|
6
|
+
.filter(link => link.hostname != window.location.hostname)
|
|
7
|
+
.forEach(link => link.target = '_blank');
|
|
8
|
+
</script>
|
|
File without changes
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
context:
|
|
2
|
+
subdir: "generics"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Fonts
|
|
3
|
+
|
|
4
|
+
Load standard fonts for a TACC website.
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
```
|
|
8
|
+
.something {
|
|
9
|
+
// BentonSans-MediumItalic
|
|
10
|
+
font-family: 'Benton Sans';
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
font-style: italic;
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Reference:
|
|
17
|
+
- [Keep Font CSS Simple](https://www.456bereastreet.com/archive/201012/font-face_tip_define_font-weight_and_font-style_to_keep_your_css_simple/)
|
|
18
|
+
- [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
|
|
19
|
+
- [Shared UI - Constants - Font](https://confluence.tacc.utexas.edu/x/cYAZCg)
|
|
20
|
+
|
|
21
|
+
Styleguide Generics.Fonts
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
@font-face {
|
|
25
|
+
font-family: 'Benton Sans';
|
|
26
|
+
src: url("../../fonts/BentonSans-Regular.otf") format("opentype");
|
|
27
|
+
font-weight: 400;
|
|
28
|
+
font-style: normal;
|
|
29
|
+
font-display: swap;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@font-face {
|
|
33
|
+
font-family: 'Benton Sans';
|
|
34
|
+
src: url("../../fonts/BentonSans-Bold.otf") format("opentype");
|
|
35
|
+
font-weight: 700;
|
|
36
|
+
font-style: normal;
|
|
37
|
+
font-display: swap;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@font-face {
|
|
41
|
+
font-family: 'Benton Sans';
|
|
42
|
+
src: url("../../fonts/BentonSans-Medium.otf") format("opentype");
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
font-style: normal;
|
|
45
|
+
font-display: swap;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@font-face {
|
|
49
|
+
font-family: 'Benton Sans';
|
|
50
|
+
src: url("../../fonts/BentonSans-MediumItalic.otf") format("opentype");
|
|
51
|
+
font-weight: 500;
|
|
52
|
+
font-style: italic;
|
|
53
|
+
font-display: swap;
|
|
54
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
context:
|
|
2
|
+
subdir: "objects"
|
|
@@ -42,18 +42,24 @@
|
|
|
42
42
|
--global-color-info--dark: var(--global-color-primary--x-dark);
|
|
43
43
|
--global-color-info--normal: var(--global-color-primary--normal);
|
|
44
44
|
--global-color-info--light: var(--global-color-primary--x-light);
|
|
45
|
+
--global-color-success--dark: #237119;
|
|
45
46
|
--global-color-success--normal: #43d130;
|
|
46
47
|
--global-color-success--weak: #43d13020;
|
|
47
48
|
--global-color-success--alt: var(--global-color-warning--normal);
|
|
48
49
|
--global-color-success--alt-weak: var(--global-color-warning--weak);
|
|
50
|
+
--global-color-warning--dark: #717411;
|
|
49
51
|
--global-color-warning--normal: #c7ce1d;
|
|
50
52
|
--global-color-warning--weak: #c7ce1d20;
|
|
51
53
|
--global-color-warning--alt: var(--global-color-accent--dark);
|
|
52
54
|
--global-color-warning--alt-weak: var(--global-color-accent--weak);
|
|
53
|
-
--global-color-danger--dark: #
|
|
54
|
-
--global-color-danger--normal: #
|
|
55
|
-
--global-color-danger--weak: #
|
|
55
|
+
--global-color-danger--dark: #AF1818;
|
|
56
|
+
--global-color-danger--normal: #F09393;
|
|
57
|
+
--global-color-danger--weak: #F0939320;
|
|
56
58
|
|
|
57
59
|
/* Generic */
|
|
58
60
|
--global-color-background--app: var(--global-color-primary--xx-light);
|
|
61
|
+
|
|
62
|
+
/* Link */
|
|
63
|
+
--global-color-link-on-light--normal: var(--global-color-accent--normal);
|
|
64
|
+
--global-color-link-on-dark--normal: var(--global-color-accent--light);
|
|
59
65
|
}
|
|
@@ -18,14 +18,15 @@ Reference:
|
|
|
18
18
|
|
|
19
19
|
Styleguide Settings.CustomProperties.Font
|
|
20
20
|
*/
|
|
21
|
+
@import url('../generics/fonts.css');
|
|
22
|
+
@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap');
|
|
21
23
|
|
|
22
24
|
:root {
|
|
23
25
|
/* Family */
|
|
24
|
-
|
|
25
|
-
--global-font-family--sans: sans-serif;
|
|
26
|
-
--global-font-family--serif: serif;
|
|
27
|
-
--global-font-family--mono: monospace;
|
|
28
|
-
|
|
26
|
+
--global-font-family--sans--cms: "Benton Sans", "Roboto", sans-serif;
|
|
27
|
+
--global-font-family--sans--portal: "Roboto", sans-serif;
|
|
28
|
+
--global-font-family--serif: Times, sans-serif;
|
|
29
|
+
--global-font-family--mono: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
29
30
|
|
|
30
31
|
/* Size */
|
|
31
32
|
/* SEE: https://confluence.tacc.utexas.edu/x/nh4FDg */
|
|
@@ -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,18 @@
|
|
|
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
|
+
.x-link--active {
|
|
16
|
+
text-decoration-line: underline;
|
|
17
|
+
text-decoration-style: dotted;
|
|
18
|
+
}
|
|
@@ -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,32 @@
|
|
|
1
|
+
<link rel="stylesheet" href="{{path '/elements/form.cms.css'}}" />
|
|
2
|
+
|
|
3
|
+
<dl>
|
|
4
|
+
<dt>Prefix</dt>
|
|
5
|
+
<dd class="s-affixed-input-wrapper s-affixed-input-wrapper--prefix">
|
|
6
|
+
<label for="field-dollars">How many dollars to you have?</label>
|
|
7
|
+
|
|
8
|
+
<span class="s-affixed-input-wrapper__prefix">$</span>
|
|
9
|
+
<input
|
|
10
|
+
type="number"
|
|
11
|
+
name="dollars"
|
|
12
|
+
id="field-dollars"
|
|
13
|
+
inputmode="numeric"
|
|
14
|
+
step="0.01"
|
|
15
|
+
min="0.01"
|
|
16
|
+
/>
|
|
17
|
+
</dd>
|
|
18
|
+
<dt>Suffix</dt>
|
|
19
|
+
<dd class="s-affixed-input-wrapper s-affixed-input-wrapper--suffix">
|
|
20
|
+
<label for="field-usd">How many US Dollars to you have?</label>
|
|
21
|
+
|
|
22
|
+
<input
|
|
23
|
+
type="number"
|
|
24
|
+
name="usd"
|
|
25
|
+
id="field-usd"
|
|
26
|
+
inputmode="numeric"
|
|
27
|
+
step="0.01"
|
|
28
|
+
min="0.01"
|
|
29
|
+
/>
|
|
30
|
+
<span class="s-affixed-input-wrapper__suffix">$</span>
|
|
31
|
+
</dd>
|
|
32
|
+
</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,19 @@
|
|
|
1
|
+
.s-irregular-links a {
|
|
2
|
+
text-decoration-line: underline;
|
|
3
|
+
}
|
|
4
|
+
.s-irregular-links a:hover {
|
|
5
|
+
text-decoration-style: dashed;
|
|
6
|
+
}
|
|
7
|
+
.s-irregular-links a:active {
|
|
8
|
+
text-decoration-style: dotted;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.s-irregular-links .c-button--as-link {
|
|
12
|
+
text-decoration-line: underline;
|
|
13
|
+
}
|
|
14
|
+
.s-irregular-links .c-button--as-link:hover {
|
|
15
|
+
text-decoration-style: dashed;
|
|
16
|
+
}
|
|
17
|
+
.s-irregular-links .c-button--as-link:active {
|
|
18
|
+
text-decoration-style: dotted;
|
|
19
|
+
}
|