@tacc/core-styles 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/.postcssrc.base.yml +48 -0
  2. package/README.md +244 -0
  3. package/bin/build.js +40 -0
  4. package/bin/config.js +90 -0
  5. package/bin/version.js +24 -0
  6. package/cli.js +77 -0
  7. package/dist/branding_logos.css +2 -0
  8. package/dist/components/README.css +1 -0
  9. package/dist/components/bootstrap.container.css +2 -0
  10. package/dist/components/bootstrap.figure.css +2 -0
  11. package/dist/components/bootstrap.pagination.css +2 -0
  12. package/dist/components/c-button.css +2 -0
  13. package/dist/components/c-callout.css +2 -0
  14. package/dist/components/c-card.css +2 -0
  15. package/dist/components/c-data-list.css +2 -0
  16. package/dist/components/c-footer.css +2 -0
  17. package/dist/components/c-image-map.css +2 -0
  18. package/dist/components/c-image-map.skin.css +1 -0
  19. package/dist/components/c-image-map.structure.css +2 -0
  20. package/dist/components/c-nav.css +2 -0
  21. package/dist/components/c-page.css +2 -0
  22. package/dist/components/c-recognition.css +2 -0
  23. package/dist/components/c-see-all-link.css +2 -0
  24. package/dist/components/c-show-more.css +2 -0
  25. package/dist/elements/README.css +1 -0
  26. package/dist/elements/figure.css +2 -0
  27. package/dist/elements/html-elements.css +2 -0
  28. package/dist/elements/tacc-search-bar.css +2 -0
  29. package/dist/generics/README.css +1 -0
  30. package/dist/objects/README.css +1 -0
  31. package/dist/objects/o-flex-item-table-wrap.css +2 -0
  32. package/dist/objects/o-grid.css +2 -0
  33. package/dist/objects/o-offset-content.css +2 -0
  34. package/dist/objects/o-section.css +2 -0
  35. package/dist/objects/o-site.css +2 -0
  36. package/dist/settings/README.css +1 -0
  37. package/dist/settings/border.css +2 -0
  38. package/dist/settings/color.css +2 -0
  39. package/dist/settings/font.css +2 -0
  40. package/dist/settings/max-width.css +2 -0
  41. package/dist/settings/space.css +2 -0
  42. package/dist/tools/README.css +1 -0
  43. package/dist/tools/media-queries.css +1 -0
  44. package/dist/tools/x-article-link.css +2 -0
  45. package/dist/tools/x-center.css +2 -0
  46. package/dist/tools/x-fake-border.css +2 -0
  47. package/dist/tools/x-grid.css +1 -0
  48. package/dist/tools/x-layout.css +2 -0
  49. package/dist/tools/x-overlay.css +1 -0
  50. package/dist/tools/x-truncate.css +2 -0
  51. package/dist/trumps/README.css +1 -0
  52. package/dist/trumps/icon.css +2 -0
  53. package/dist/trumps/icon.fonts.css +2 -0
  54. package/dist/trumps/s-article-list.css +2 -0
  55. package/dist/trumps/s-article-preview.css +2 -0
  56. package/dist/trumps/s-blockquote.css +2 -0
  57. package/dist/trumps/s-breadcrumbs.css +2 -0
  58. package/dist/trumps/s-cms-nav.css +1 -0
  59. package/dist/trumps/s-document.css +2 -0
  60. package/dist/trumps/s-footer.css +2 -0
  61. package/dist/trumps/s-guide-doc.css +2 -0
  62. package/dist/trumps/s-header.css +2 -0
  63. package/dist/trumps/s-inline-dl.css +2 -0
  64. package/dist/trumps/s-portal-nav.css +2 -0
  65. package/dist/trumps/s-style-guide.css +2 -0
  66. package/dist/trumps/s-system-specs.css +2 -0
  67. package/dist/trumps/tacc-search-bar.css +2 -0
  68. package/dist/trumps/u-empty.css +1 -0
  69. package/dist/trumps/u-hide.css +2 -0
  70. package/dist/trumps/u-nested-text-content.css +2 -0
  71. package/index.js +45 -0
  72. package/package.json +49 -0
  73. package/source/README.md +8 -0
  74. package/source/_imports/README.md +47 -0
  75. package/source/_imports/branding_logos.css +73 -0
  76. package/source/_imports/components/README.css +26 -0
  77. package/source/_imports/components/bootstrap.container.css +23 -0
  78. package/source/_imports/components/bootstrap.figure.css +17 -0
  79. package/source/_imports/components/bootstrap.pagination.css +29 -0
  80. package/source/_imports/components/c-button.css +210 -0
  81. package/source/_imports/components/c-button.html +31 -0
  82. package/source/_imports/components/c-callout.css +183 -0
  83. package/source/_imports/components/c-callout.html +52 -0
  84. package/source/_imports/components/c-card.css +57 -0
  85. package/source/_imports/components/c-card.html +32 -0
  86. package/source/_imports/components/c-data-list.css +222 -0
  87. package/source/_imports/components/c-data-list.html +145 -0
  88. package/source/_imports/components/c-footer.css +67 -0
  89. package/source/_imports/components/c-footer.html +3 -0
  90. package/source/_imports/components/c-image-map.css +26 -0
  91. package/source/_imports/components/c-image-map.html +4 -0
  92. package/source/_imports/components/c-image-map.skin.css +1 -0
  93. package/source/_imports/components/c-image-map.structure.css +285 -0
  94. package/source/_imports/components/c-nav.css +164 -0
  95. package/source/_imports/components/c-nav.html +45 -0
  96. package/source/_imports/components/c-page.css +95 -0
  97. package/source/_imports/components/c-page.html +192 -0
  98. package/source/_imports/components/c-recognition.css +102 -0
  99. package/source/_imports/components/c-see-all-link.css +52 -0
  100. package/source/_imports/components/c-show-more.css +50 -0
  101. package/source/_imports/elements/README.css +47 -0
  102. package/source/_imports/elements/figure.css +23 -0
  103. package/source/_imports/elements/html-elements.css +386 -0
  104. package/source/_imports/elements/tacc-search-bar.css +19 -0
  105. package/source/_imports/elements/tacc-search-bar.md +20 -0
  106. package/source/_imports/generics/README.css +24 -0
  107. package/source/_imports/generics/README.md +9 -0
  108. package/source/_imports/objects/README.css +22 -0
  109. package/source/_imports/objects/o-flex-item-table-wrap.css +50 -0
  110. package/source/_imports/objects/o-grid.css +131 -0
  111. package/source/_imports/objects/o-grid.html +64 -0
  112. package/source/_imports/objects/o-offset-content.css +51 -0
  113. package/source/_imports/objects/o-section.css +270 -0
  114. package/source/_imports/objects/o-section.html +73 -0
  115. package/source/_imports/objects/o-site.css +26 -0
  116. package/source/_imports/objects/o-site.html +11 -0
  117. package/source/_imports/settings/README.css +65 -0
  118. package/source/_imports/settings/border.css +15 -0
  119. package/source/_imports/settings/color.css +30 -0
  120. package/source/_imports/settings/font.css +49 -0
  121. package/source/_imports/settings/max-width.css +31 -0
  122. package/source/_imports/settings/space.css +36 -0
  123. package/source/_imports/tools/README.css +17 -0
  124. package/source/_imports/tools/media-queries.css +48 -0
  125. package/source/_imports/tools/x-article-link.css +62 -0
  126. package/source/_imports/tools/x-center.css +60 -0
  127. package/source/_imports/tools/x-fake-border.css +72 -0
  128. package/source/_imports/tools/x-grid.css +116 -0
  129. package/source/_imports/tools/x-layout.css +86 -0
  130. package/source/_imports/tools/x-overlay.css +28 -0
  131. package/source/_imports/tools/x-truncate.css +47 -0
  132. package/source/_imports/trumps/README.css +79 -0
  133. package/source/_imports/trumps/icon.css +31 -0
  134. package/source/_imports/trumps/icon.fonts.css +316 -0
  135. package/source/_imports/trumps/s-article-list.css +240 -0
  136. package/source/_imports/trumps/s-article-list.html +20 -0
  137. package/source/_imports/trumps/s-article-preview.css +253 -0
  138. package/source/_imports/trumps/s-article-preview.html +30 -0
  139. package/source/_imports/trumps/s-blockquote.css +45 -0
  140. package/source/_imports/trumps/s-breadcrumbs.css +69 -0
  141. package/source/_imports/trumps/s-cms-nav.css +11 -0
  142. package/source/_imports/trumps/s-cms-nav.html +41 -0
  143. package/source/_imports/trumps/s-document.css +142 -0
  144. package/source/_imports/trumps/s-footer.css +16 -0
  145. package/source/_imports/trumps/s-footer.html +3 -0
  146. package/source/_imports/trumps/s-guide-doc.css +77 -0
  147. package/source/_imports/trumps/s-header.css +181 -0
  148. package/source/_imports/trumps/s-header.html +46 -0
  149. package/source/_imports/trumps/s-inline-dl.css +35 -0
  150. package/source/_imports/trumps/s-portal-nav.css +20 -0
  151. package/source/_imports/trumps/s-portal-nav.html +37 -0
  152. package/source/_imports/trumps/s-style-guide.css +52 -0
  153. package/source/_imports/trumps/s-system-specs.css +123 -0
  154. package/source/_imports/trumps/tacc-search-bar.css +108 -0
  155. package/source/_imports/trumps/tacc-search-bar.html +11 -0
  156. package/source/_imports/trumps/u-empty.css +18 -0
  157. package/source/_imports/trumps/u-hide.css +27 -0
  158. package/source/_imports/trumps/u-nested-text-content.css +14 -0
  159. package/source/_tests/README.md +33 -0
  160. package/source/_tests/postcss-extend.css +80 -0
  161. package/source/_tests/postcss-preset-env.css +75 -0
  162. package/source/_tests.css +12 -0
  163. package/source/_themes/README.md +5 -0
  164. package/source/_themes/TODO.md +4 -0
  165. package/source/_themes/default.json +21 -0
  166. package/source/_themes/has-dark-logo.json +21 -0
@@ -0,0 +1,386 @@
1
+ /*
2
+ Main Root & Sectioning Root
3
+
4
+ Elements that represent the root of a document or document content.
5
+
6
+ ```
7
+ <html> <body>
8
+ ```
9
+
10
+ Reference:
11
+
12
+ - [MDN: HTML element reference: Main root](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Main_root)
13
+ - [MDN: HTML element reference: Sectioning root](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Sectioning_root)
14
+
15
+ Styleguide Elements.MainSectioningRoots
16
+ */
17
+
18
+ html {
19
+ /* Set base font but support user-defined browser font size */
20
+ /* SEE: https://snook.ca/archives/html_and_css/font-size-with-rem */
21
+ font-size: 62.5%; /* 16px */
22
+ }
23
+
24
+ /* The webpage must be at least as tall as the viewport */
25
+ html,
26
+ body {
27
+ height: 100%;
28
+ }
29
+
30
+ body {
31
+ /* To avoid negative whitespace at right on horz scroll on tiny screen */
32
+ min-width: 290px; /* developer-decided value */
33
+
34
+ /* To overwrite Bootstrap */
35
+ color: var(--global-color-primary--x-dark);
36
+ font-family: var(--global-font-family);
37
+ font-size: var(--global-font-size--medium);
38
+ line-height: 1.4;
39
+ }
40
+
41
+
42
+
43
+
44
+
45
+ /*
46
+ Content Sectioning
47
+
48
+ Elements that organize a document into logical pieces and create a broad outline for page content.
49
+
50
+ ```
51
+ <main> <nav> <section> <header> <h1> <h2> <h3> <h4> <h5> <h6> <hgroup> <footer> <article> <aside> <address>
52
+ ```
53
+
54
+ Reference:
55
+
56
+ - [HTML element reference: Content sectioning | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Content_sectioning)
57
+
58
+ Styleguide Elements.ContentSectioning
59
+ */
60
+
61
+ main {
62
+ padding-bottom: var(--global-space--section-gap);
63
+ }
64
+
65
+ h1, h2, h3, h4, h5, h6 {
66
+ margin-top: revert; /* to overwrite Bootstrap `_reboot.css` */
67
+
68
+ font-weight: var(--bold);
69
+ color: var(--global-color-primary--xx-dark);
70
+ }
71
+ h1 {
72
+ font-size: var(--global-font-size--xxx-large);
73
+ }
74
+ h2 {
75
+ font-size: var(--global-font-size--xx-large);
76
+ }
77
+ h3, h4, h5, h6 {
78
+ margin-bottom: 15px; /* overwrite Bootstrap */
79
+ }
80
+ h3 {
81
+ font-size: var(--global-font-size--x-large);
82
+ }
83
+ h4 {
84
+ font-size: var(--global-font-size--large);
85
+ }
86
+ h4, h5 {
87
+ text-transform: uppercase;
88
+ }
89
+ h5, h6 {
90
+ font-size: var(--global-font-size--medium);
91
+ }
92
+
93
+
94
+
95
+
96
+
97
+ /*
98
+ Text Content
99
+
100
+ Elements that organize blocks or sections of content placed (includes lists).
101
+
102
+ ```
103
+ <blockquote> <dd> <div> <dl> <dt> <figcaption> <figure> <hr> <li> <ol> <p> <pre> <ul>
104
+ ```
105
+
106
+ Reference:
107
+
108
+ - [HTML element reference: Text content | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Text_content)
109
+
110
+ Styleguide Elements.TextContent
111
+ */
112
+
113
+ p {
114
+ margin-bottom: 2rem; /* overwrite Bootstrap */
115
+ }
116
+
117
+ /* Lists */
118
+
119
+ ol, ul,
120
+ dl dl /* Treat nested definition lists like other nested lists */ {
121
+ padding-left: var(--global-space--list-indent);
122
+ }
123
+ ol ol, ol ul, ul ol, ul ul {
124
+ margin: revert; /* Undo Bootstrap `_reboot.css` */
125
+ }
126
+ /* Add space between `dt` and `dd` */
127
+ dt {
128
+ margin-bottom: .5rem; /* overwrite Bootstrap */
129
+ font-weight: initial; /* overwrite Bootstrap */
130
+ }
131
+
132
+ li {
133
+ line-height: 1.6;
134
+ }
135
+
136
+ /* Misc. */
137
+
138
+ hr {
139
+ margin-block: var(--global-space--hr-margin);
140
+ }
141
+
142
+
143
+
144
+
145
+
146
+ /*
147
+ Inline Text Semantics
148
+
149
+ Elements that define the meaning, structure, or style of a word, line, or any arbitrary piece of text.
150
+
151
+ ```
152
+ <a> <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>
153
+ ```
154
+
155
+ Reference:
156
+
157
+ - [HTML element reference: Inline text semantics | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Inline_text_semantics)
158
+
159
+ Styleguide Elements.InlineTextSemantics
160
+ */
161
+
162
+ /* Links */
163
+
164
+ a,
165
+ a:hover { color: var(--global-color-link-on-light--normal); /* overwrite Bootstrap */ }
166
+ a:focus { text-decoration: underline dotted; }
167
+
168
+ /* FAQ: Bootstrap already provides basic text-decoration */
169
+ /*
170
+ a { text-decoration: none; }
171
+ a:hover { text-decoration: underline; }
172
+ */
173
+
174
+ /* Monospace */
175
+
176
+ var,
177
+ /* Overwrite Bootstrap (which does not use its `--font-family-monospace`) */
178
+ code, kbd, pre, samp {
179
+ font-family: var(--global-font-family--mono);
180
+ }
181
+ code kbd {
182
+ display: inline-block; /* ensure element does not bleed outside parent */
183
+ padding: .1rem .2rem; /* overwrites Bootstrap */
184
+ margin-left: .2rem;
185
+ margin-right: .2rem;
186
+
187
+ font-size: inherit;
188
+ }
189
+
190
+ /* Code (<code>, <samp>, <pre>) */
191
+
192
+ /* Code: any content or context) */ code,
193
+ /* Code: content has only output */ pre > samp {
194
+ /* Undo Bootstrap */
195
+ color: unset;
196
+ }
197
+ /* Code: context is inline */ :not(pre) > code {
198
+ display: inline-block;
199
+ padding: var(--global-space--xx-small) var(--global-space--x-small);
200
+ }
201
+ /* Code: context is block, content has input */ pre > code,
202
+ /* Code: context is block, content has only ouput */ pre > samp {
203
+ display: inline-block; /* FAQ: If `block`, then background color is cropped */
204
+ padding: var(--global-space--x-small) var(--global-space--small);
205
+ }
206
+ /* Code: context is block, container probably has inline-style width set */
207
+ /* FAQ: Stretch code to meet container width */
208
+ pre[style] > code,
209
+ pre[style] > samp {
210
+ min-width: 100%;
211
+ }
212
+
213
+ /* Code: context is inline, content has only output */
214
+ /* FAQ: Examples: command output within CLI illustration */
215
+ pre samp {
216
+ opacity: 0.75;
217
+ text-decoration: none;
218
+ }
219
+ /* Code: context is inline, content has context-agnostic output */
220
+ /* FAQ: Examples: command prompt within CLI illustration */
221
+ pre code u {
222
+ opacity: 0.50;
223
+ text-decoration: none;
224
+ }
225
+
226
+
227
+
228
+
229
+
230
+ /*
231
+ Demarcating Edits
232
+
233
+ Elements that provide indications that specific parts of the text have been altered.
234
+
235
+ ```
236
+ <del> <ins>
237
+ ```
238
+
239
+ Reference:
240
+
241
+ - [HTML element reference: Demarcating edits | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Demarcating_edits)
242
+
243
+ Styleguide Elements.DemarcatingEdits
244
+ */
245
+
246
+ /* … */
247
+
248
+
249
+
250
+
251
+
252
+ /*
253
+ Image & Multimedia
254
+
255
+ Elements that support various multimedia resources such as images, audio, and video.
256
+
257
+ ```
258
+ <area> <audio> <img> <map> <track> <video>
259
+ ```
260
+
261
+ Reference:
262
+
263
+ - [HTML element reference: Image and multimedia | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Image_and_multimedia)
264
+
265
+ Styleguide Elements.Media
266
+ */
267
+
268
+ /* … */
269
+
270
+
271
+
272
+
273
+
274
+ /*
275
+ Embedded Content
276
+
277
+ Elements that support various other media that has limited interaction.
278
+
279
+ ```
280
+ <embed> <iframe> <object> <param> <picture> <source>
281
+ ```
282
+
283
+ Reference:
284
+
285
+ - [HTML element reference: Embedded content | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Embedded_content)
286
+
287
+ Styleguide Elements.EmbeddedContent
288
+ */
289
+
290
+ /* … */
291
+
292
+
293
+
294
+
295
+
296
+ /*
297
+ SVG & MathML
298
+
299
+ Elements for Scalable Vector Graphics and Mathematical Markup Language.
300
+
301
+ ```
302
+ <svg> <math>
303
+ ```
304
+
305
+ Reference:
306
+
307
+ - [HTML element reference: Demarcating edits | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Demarcating_edits)
308
+
309
+ Styleguide Elements.DemarcatingEdits
310
+ */
311
+
312
+ /* … */
313
+
314
+
315
+
316
+
317
+
318
+ /*
319
+ Table Content
320
+
321
+ Elements that create and handle tabular data.
322
+
323
+ ```
324
+ <table> <thead> <tbody> <th> <td> <tfoot> <colgroup> <col> <caption>
325
+ ```
326
+
327
+ Reference:
328
+
329
+ - [HTML element reference: Table content | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Table_content)
330
+
331
+ Styleguide Elements.Tables
332
+ */
333
+
334
+ table,
335
+ td,
336
+ th {
337
+ border: var(--global-border--normal);
338
+ }
339
+
340
+
341
+
342
+
343
+
344
+ /*
345
+ Forms
346
+
347
+ Elements that create forms which the user can fill out and submit to the Web site or application.
348
+
349
+ ```
350
+ <form> <fieldset> <legend> <label> <input> <select> <optgroup> <option> <textarea> <button> <output> <progress> <meter> <datalist>
351
+ ```
352
+
353
+ Reference:
354
+
355
+ - [HTML element reference: Forms | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Forms)
356
+
357
+ Styleguide Elements.Forms
358
+ */
359
+
360
+ /* … */
361
+
362
+
363
+
364
+
365
+
366
+ /*
367
+ Interactive Elements
368
+
369
+ Elements that help to create interactive user interface objects.
370
+
371
+ ```
372
+ <details> <summary> <dialog> <menu>
373
+ ```
374
+
375
+ Reference:
376
+
377
+ - [HTML element reference: Interactive elements | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Interactive_elements)
378
+
379
+ Styleguide Elements.Interactive
380
+ */
381
+
382
+ /* Clone Bootstrap's <p> and <ul> margins */
383
+ details {
384
+ margin-top: 0;
385
+ margin-bottom: 1rem;
386
+ }
@@ -0,0 +1,19 @@
1
+ /* SEE: _imports/trumps/tacc-search-bar.css */
2
+ /*
3
+ Search Bar
4
+
5
+ Unopinionated styles for TACC search bar.
6
+
7
+ Markup: tacc-search-bar.html
8
+
9
+ Styleguide Elements.TACC.SearchBar
10
+ */
11
+
12
+ [part="form"] {
13
+ /* To fill available space of `:host` */
14
+ width: 100%;
15
+ height: 100%;
16
+ }
17
+
18
+ /* SEE: https://github.com/TACC/Core-Styles/blob/main/source/_imports/elements/tacc-search-bar.md */
19
+ :host { visibility: visible; height: auto; }
@@ -0,0 +1,20 @@
1
+ # TACC - Stylesheets - Search Bar
2
+
3
+ The search bar (as implemented in TACC/Core-CMS) _currently_ has a caveat (that will be resolved via TACC/Core-CMS#101).
4
+
5
+ Certain styles need to load **before** all search bar styles and markup:
6
+
7
+ ```css
8
+ :host { visibility: hidden; height: 0; }
9
+ ```
10
+
11
+ Certain styles need to load **after** all search bar styles and markup:
12
+
13
+ ```css
14
+ :host { visibility: visible; height: auto; }
15
+ ```
16
+
17
+ This avoids [FOUC] by hiding the search bar _until_ all styles and markup are loaded.
18
+
19
+ [TACC/Core-CMS#101]: https://github.com/TACC/Core-CMS/issues/101
20
+ [FOUC]: https://en.wikipedia.org/wiki/Flash_of_unstyled_content
@@ -0,0 +1,24 @@
1
+ /* DO NOT ADD STYLES HERE; ADD THEM INSIDE STYLESHEETS IN THIS DIRECTORY */
2
+
3
+ /*
4
+ Generics
5
+
6
+ Generic styles are very high-level, far-reaching styles. They are seldom modified.
7
+ Examples are reset, normalize, box-sizing styles, and browser fixes.
8
+
9
+ Reference:
10
+
11
+ - [Creative Bloq: Manage Large CSS Projects With ITCSS](https://www.creativebloq.com/web-design/manage-large-css-projects-itcss-101517528) (find "Generic")
12
+
13
+ Rules:
14
+
15
+ - Classes and IDs must not be styled.
16
+ - Opinionated high-level styles may be here.
17
+ - Element tags may be styled.
18
+ - Pseudo classes may be styled.
19
+ - Pseudo elements may be styled.
20
+
21
+ Weight: 3
22
+
23
+ Styleguide Generics
24
+ */
@@ -0,0 +1,9 @@
1
+ # TACC - Stylesheets - Generics
2
+
3
+ Bootstrap provides our generics styles.[^1] Bootstrap is loaded from a CDN.
4
+
5
+ This directory is here to show and document all [ITCSS] directories.
6
+
7
+ [^1]: Bootstrap also provides its own objects, components, elements, and trumps.
8
+
9
+ [ITCSS]: https://confluence.tacc.utexas.edu/x/IAA9Cw
@@ -0,0 +1,22 @@
1
+ /* DO NOT ADD STYLES HERE; ADD THEM INSIDE STYLESHEETS IN THIS DIRECTORY */
2
+
3
+ /*
4
+ Object
5
+
6
+ Object are repetitive, shared, and purely-structural parts of an interface. They are seldom modified. Changing these styles may unintentionally break many layouts.
7
+
8
+ Reference:
9
+
10
+ - [BEM with Namespaces: Object Namespaces](https://csswizardry.com/2015/03/more-transparent-ui-code-with-namespaces/#object-namespaces-o-)
11
+
12
+ Guidelines:
13
+
14
+ - Objects are abstract.
15
+ - They are often used for high-level layout management.
16
+ - Avoid modifying their styles.
17
+ - Be careful around anything with a leading `o-`.
18
+
19
+ Weight: 5
20
+
21
+ Styleguide Objects
22
+ */
@@ -0,0 +1,50 @@
1
+ /*
2
+ Flex-Item Table-Wrap
3
+
4
+ A wrapper to allow a table to behave like a flex item (because a `<table>` can __not__ be a flex item).
5
+
6
+ Reference:
7
+ - [Why does flex-box work with a div, but not a table?](https://stackoverflow.com/q/41421512/11817077))
8
+
9
+ Markup:
10
+ <section style="display: flex; flex-direction: column">
11
+ <header>Section Title</header>
12
+ <p>Section/Table Description</p>
13
+ <div class="o-flex-item-table-wrap">
14
+ <table>
15
+ <thead>
16
+ <tr>
17
+ <th>A</th>
18
+ <th>B</th>
19
+ <th>C</th>
20
+ </tr>
21
+ </thead>
22
+ <tbody>
23
+ <tr>
24
+ <td>A</td>
25
+ <td>B</td>
26
+ <td>C</td>
27
+ </tr>
28
+ </thead>
29
+ </table>
30
+ </div>
31
+ </section>
32
+
33
+ Styleguide Objects.FlexItemTableWrap
34
+ */
35
+ /* Constrain stretched <table>'s position and dimension */
36
+ .o-flex-item-table-wrap {
37
+ /* Ensure wrapper has dimensions (which will be remaining space in parent) */
38
+ flex-grow: 1;
39
+
40
+ /* Set position and maximum dimensions for child <table> */
41
+ position: relative;
42
+ }
43
+ /* Strech <table> to fill available space of flex item (the wrapper) */
44
+ .o-flex-item-table-wrap > table {
45
+ position: absolute;
46
+ top: 0;
47
+ bottom: 0;
48
+ left: 0;
49
+ right: 0;
50
+ }
@@ -0,0 +1,131 @@
1
+ /*
2
+ Grid
3
+
4
+ A grid of items e.g. images, avatars, article previews.
5
+
6
+ Caveats:
7
+ - Do not combine two `o-grid--col-…`.
8
+
9
+ .o-grid--image-fill - Image fills its cell or container which fills cell (supports: `<img>`, `<img>` in `<figure>` (no class), `<img>` in `<a>`)
10
+ .o-grid--center-align - Align content vertically and horizontally center
11
+ .o-grid--col-auto-count - Same width columns; wider window equals more columns
12
+ .o-grid--col-min-width - Same width columns; auto. column count; minimum width (custom properties: `--width`)
13
+
14
+ Markup: o-grid.html
15
+
16
+ Styleguide Objects.Grid
17
+ */
18
+ @import url("_imports/tools/media-queries.css");
19
+ @import url("_imports/tools/x-grid.css");
20
+
21
+
22
+
23
+
24
+
25
+ /* Block */
26
+
27
+ .o-grid {
28
+ --gap: var(--global-space--grid-gap, 15px); /* Bootstrap grid spacing */
29
+
30
+ display: grid;
31
+ gap: var(--gap);
32
+
33
+ /* To always have equal height rows that match tallest content */
34
+ @extend %x-grid--layout-rows-equal-max-height;
35
+ }
36
+
37
+
38
+
39
+
40
+
41
+ /* Elements */
42
+
43
+ /* Avoid leting image size exceed cell size */
44
+ /* FAQ: An intentionally loose limitation (so user can choose to ignore it) */
45
+ .o-grid img {
46
+ max-height: 100%;
47
+ max-width: 100%;
48
+ }
49
+
50
+ /* Hide content that does exceed cell size */
51
+ .o-grid > * {
52
+ overflow: hidden;
53
+ }
54
+
55
+
56
+
57
+
58
+
59
+ /* Modifiers */
60
+
61
+
62
+
63
+ /* Layout: Columns */
64
+
65
+ /* Layout: Columns: Same Width, Preset Col. Count */
66
+
67
+ .o-grid--col-auto-count {
68
+ @extend %x-grid--layout-cols-equal-set-count;
69
+ }
70
+ @media (--x-narrow-and-below) { .o-grid--col-auto-count { --count: 1; } }
71
+ @media (--x-narrow-to-narrow) { .o-grid--col-auto-count { --count: 2; } }
72
+ @media (--narrow-to-medium) { .o-grid--col-auto-count { --count: 3; } }
73
+ @media (--medium-to-wide) { .o-grid--col-auto-count { --count: 4; } }
74
+ @media (--wide-to-x-wide) { .o-grid--col-auto-count { --count: 5; } }
75
+ @media (--x-wide-to-xx-wide) { .o-grid--col-auto-count { --count: 6; } }
76
+ @media (--xx-wide-to-xxx-wide) { .o-grid--col-auto-count { --count: 7; } }
77
+ @media (--xxx-wide-to-max-wide) { .o-grid--col-auto-count { --count: 8; } }
78
+ @media (--max-wide-and-above) { .o-grid--col-auto-count { --count: 9; } }
79
+
80
+ /* Layout: Columns: Same Width, Preset Min. Width */
81
+
82
+ .o-grid--col-min-width {
83
+ --width: 250px;
84
+
85
+ @extend %x-grid--layout-cols-equal-min-width;
86
+ }
87
+ /* Prevent content overflow */
88
+ /* FAQ: Excluding `img` because `.o-grid img` already sets this for images */
89
+ .o-grid--col-min-width > *:not(img) {
90
+ max-width: 100%; /* used if cell width is smaller than content */
91
+ max-height: 100%; /* used if cell height is smaller than content */
92
+ }
93
+
94
+
95
+
96
+ /* Layout: Content */
97
+
98
+ /* Layout: Content: Align Vert/Horz Center */
99
+
100
+ .o-grid--center-align {
101
+ @extend %x-grid--content-align-center;
102
+ }
103
+
104
+ /* Layout: Content: Image Fills Cell/Container */
105
+
106
+ .o-grid--image-fill > :is(a, figure):not(img) {
107
+ width: 100%;
108
+ height: 100%;
109
+ }
110
+ .o-grid--image-fill > img,
111
+ .o-grid--image-fill > figure > img,
112
+ .o-grid--image-fill > a > img:only-child {
113
+ object-fit: cover;
114
+
115
+ height: 100%;
116
+ width: 100%;
117
+ }
118
+ /* Manage layout of figures without classes */
119
+ /* FAQ: Plugins in CMS Edit mode have this first if no other classes */
120
+ .o-grid--image-fill > figure:not([class]),
121
+ .o-grid--image-fill > figure[class=""],
122
+ .o-grid--image-fill > figure[class*="cms-plugin"] {
123
+ display: flex;
124
+ flex-direction: column;
125
+ }
126
+ .o-grid--image-fill > figure:not([class]) > img,
127
+ .o-grid--image-fill > figure[class=""] > img,
128
+ .o-grid--image-fill > figure[class*="cms-plugin"] > img {
129
+ flex-grow: 1;
130
+ min-height: 0; /* to allow flex item to shrink less than actual size */
131
+ }