@tacc/core-styles 0.8.0-beta → 0.8.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.
Files changed (120) hide show
  1. package/README.md +8 -5
  2. package/dist/_fonts/BentonSans-Bold.otf +0 -0
  3. package/dist/_fonts/BentonSans-Medium.otf +0 -0
  4. package/dist/_fonts/BentonSans-MediumItalic.otf +0 -0
  5. package/dist/_fonts/BentonSans-Regular.otf +0 -0
  6. package/dist/_fonts/_fonts/BentonSans-Bold.otf +0 -0
  7. package/dist/_fonts/_fonts/BentonSans-Medium.otf +0 -0
  8. package/dist/_fonts/_fonts/BentonSans-MediumItalic.otf +0 -0
  9. package/dist/_fonts/_fonts/BentonSans-Regular.otf +0 -0
  10. package/dist/branding_logos.css +1 -1
  11. package/dist/components/README.css +1 -1
  12. package/dist/components/bootstrap.container.css +1 -1
  13. package/dist/components/bootstrap.figure.css +1 -1
  14. package/dist/components/bootstrap.form.css +2 -0
  15. package/dist/components/bootstrap.modal.css +2 -0
  16. package/dist/components/bootstrap.pagination.css +1 -1
  17. package/dist/components/c-button/c-button_docs.css +2 -2
  18. package/dist/components/c-button.css +2 -2
  19. package/dist/components/c-callout.css +1 -1
  20. package/dist/components/c-card.css +1 -1
  21. package/dist/components/c-data-list.css +1 -1
  22. package/dist/components/c-footer.css +1 -1
  23. package/dist/components/c-image-map.css +1 -1
  24. package/dist/components/c-image-map.skin.css +1 -1
  25. package/dist/components/c-image-map.structure.css +1 -1
  26. package/dist/components/c-nav.css +1 -1
  27. package/dist/components/c-page.css +1 -1
  28. package/dist/components/c-recognition.css +1 -1
  29. package/dist/components/c-see-all-link.css +1 -1
  30. package/dist/components/c-show-more.css +1 -1
  31. package/dist/components/cortal.icon.css +2 -0
  32. package/dist/components/cortal.icon.font.css +2 -0
  33. package/dist/elements/README.css +1 -1
  34. package/dist/elements/bootstrap.css +2 -0
  35. package/dist/elements/form.cms.css +2 -0
  36. package/dist/elements/html-elements.cms.css +2 -0
  37. package/dist/elements/html-elements.css +1 -1
  38. package/dist/elements/tacc-search-bar.css +1 -1
  39. package/dist/fonts/BentonSans-Bold.otf +0 -0
  40. package/dist/fonts/BentonSans-Medium.otf +0 -0
  41. package/dist/fonts/BentonSans-MediumItalic.otf +0 -0
  42. package/dist/fonts/BentonSans-Regular.otf +0 -0
  43. package/dist/fonts/fonts/BentonSans-Bold.otf +0 -0
  44. package/dist/fonts/fonts/BentonSans-Medium.otf +0 -0
  45. package/dist/fonts/fonts/BentonSans-MediumItalic.otf +0 -0
  46. package/dist/fonts/fonts/BentonSans-Regular.otf +0 -0
  47. package/dist/generics/README.css +1 -1
  48. package/dist/generics/fonts.css +2 -0
  49. package/dist/objects/README.css +1 -1
  50. package/dist/objects/o-fixed-header-table.css +2 -0
  51. package/dist/objects/o-flex-item-table-wrap.css +1 -1
  52. package/dist/objects/o-grid.css +1 -1
  53. package/dist/objects/o-offset-content.css +1 -1
  54. package/dist/objects/o-section.css +1 -1
  55. package/dist/objects/o-site.css +1 -1
  56. package/dist/settings/README.css +1 -1
  57. package/dist/settings/border.css +1 -1
  58. package/dist/settings/color.css +1 -1
  59. package/dist/settings/font.css +2 -2
  60. package/dist/settings/max-width.css +1 -1
  61. package/dist/settings/space.css +1 -1
  62. package/dist/tools/README.css +1 -1
  63. package/dist/tools/media-queries.css +1 -1
  64. package/dist/tools/x-article-link.css +1 -1
  65. package/dist/tools/x-center.css +1 -1
  66. package/dist/tools/x-fake-border.css +1 -1
  67. package/dist/tools/x-grid.css +1 -1
  68. package/dist/tools/x-layout.css +1 -1
  69. package/dist/tools/x-overlay.css +1 -1
  70. package/dist/tools/x-truncate.css +1 -1
  71. package/dist/trumps/README.css +1 -1
  72. package/dist/trumps/icon.css +1 -1
  73. package/dist/trumps/icon.fonts.css +1 -1
  74. package/dist/trumps/s-article-list.css +1 -1
  75. package/dist/trumps/s-article-preview.css +1 -1
  76. package/dist/trumps/s-blockquote.css +1 -1
  77. package/dist/trumps/s-breadcrumbs.css +1 -1
  78. package/dist/trumps/s-cms-nav.css +1 -1
  79. package/dist/trumps/s-document.css +1 -1
  80. package/dist/trumps/s-footer.css +1 -1
  81. package/dist/trumps/s-guide-doc.css +1 -1
  82. package/dist/trumps/s-header.css +1 -1
  83. package/dist/trumps/s-inline-dl.css +1 -1
  84. package/dist/trumps/s-portal-nav.css +1 -1
  85. package/dist/trumps/s-style-guide.css +1 -1
  86. package/dist/trumps/s-system-specs.css +1 -1
  87. package/dist/trumps/tacc-search-bar.css +2 -2
  88. package/dist/trumps/u-empty.css +1 -1
  89. package/dist/trumps/u-hide.css +1 -1
  90. package/dist/trumps/u-nested-text-content.css +1 -1
  91. package/package.json +4 -4
  92. package/src/lib/_imports/_preview.hbs +7 -10
  93. package/src/lib/_imports/components/bootstrap.container.css +1 -1
  94. package/src/lib/_imports/components/bootstrap.form.css +21 -0
  95. package/src/lib/_imports/components/bootstrap.modal.css +74 -0
  96. package/src/lib/_imports/components/bootstrap.pagination.css +1 -1
  97. package/src/lib/_imports/components/c-button/c-button.hbs +159 -65
  98. package/src/lib/_imports/components/c-button/c-button_docs.css +5 -0
  99. package/src/lib/_imports/components/c-button.css +27 -10
  100. package/src/lib/_imports/components/c-callout.css +2 -2
  101. package/src/lib/_imports/components/c-card.css +1 -1
  102. package/src/lib/_imports/components/c-data-list.css +1 -1
  103. package/src/lib/_imports/components/c-nav.css +1 -1
  104. package/src/lib/_imports/components/c-see-all-link.css +1 -1
  105. package/src/lib/_imports/components/c-show-more.css +1 -1
  106. package/src/lib/_imports/components/cortal.icon.css +79 -0
  107. package/src/lib/_imports/components/cortal.icon.font.css +464 -0
  108. package/src/lib/_imports/components/cortal.icon.font.md +3 -0
  109. package/src/lib/_imports/objects/o-fixed-header-table.css +33 -0
  110. package/src/lib/_imports/objects/o-grid.css +2 -2
  111. package/src/lib/_imports/objects/o-offset-content.css +1 -1
  112. package/src/lib/_imports/objects/o-section.css +3 -3
  113. package/src/lib/_imports/settings/font.css +7 -0
  114. package/src/lib/_imports/tools/x-layout.css +1 -1
  115. package/src/lib/_imports/trumps/s-article-list.css +3 -3
  116. package/src/lib/_imports/trumps/s-article-preview.css +2 -2
  117. package/src/lib/_imports/trumps/s-breadcrumbs.css +1 -1
  118. package/src/lib/_imports/trumps/s-header.css +1 -1
  119. package/src/lib/_imports/trumps/s-system-specs.css +1 -1
  120. package/src/lib/_tests.css +1 -1
@@ -1,2 +1,2 @@
1
- /*! @tacc/core-styles 0.8.0-beta+ | MIT | github.com/TACC/Core-Styles */
2
- :host{--button-horz-pad:10px;--input-horz-pad:0.125em;--input-height:26px;--button-font-size:18px;--input-font-size:14px}:host{font-size:0}:host [part=form]{font-family:Roboto;display:flex;align-items:center;position:relative}:host [part=button]{font-size:16px;position:absolute;left:0;top:50%;transform:translateY(-50%);box-sizing:content-box;height:var(--input-height,38px);align-items:center;margin:0;padding:0 var(--button-horz-pad);background-color:transparent;border:none;color:var(--global-color-primary--xx-light);font-size:var(--button-font-size)}:host [part=input]{display:block;width:100%;height:var(--input-height);margin:0;padding-top:0;padding-bottom:0;padding-left:calc(var(--button-horz-pad) + var(--button-font-size) + var(--button-horz-pad) + var(--input-horz-pad));padding-right:var(--input-horz-pad);background-color:#313131;border:var(--global-border-width--normal) solid var(--global-color-primary--dark);border-radius:5px;color:var(--global-color-primary--xx-light);font-size:var(--input-font-size)}:host [part=input]::-moz-placeholder{color:var(--global-color-primary--xx-light);opacity:.5}:host [part=input]::placeholder{color:var(--global-color-primary--xx-light);opacity:.5}
1
+ /*! @tacc/core-styles 0.8.0+ | MIT | github.com/TACC/Core-Styles */
2
+ :host{--button-horz-pad:10px;--input-horz-pad:0.125em;--input-height:26px;--button-font-size:18px;--input-font-size:14px}:host{font-size:0}:host [part=form]{font-family:Roboto;display:flex;align-items:center;position:relative}:host [part=button]{font-size:16px;position:absolute;left:0;top:50%;transform:translateY(-50%);box-sizing:content-box;height:var(--input-height,38px);align-items:center;margin:0;padding:0 var(--button-horz-pad);background-color:transparent;border:none;color:var(--global-color-primary--xx-light);font-size:var(--button-font-size)}:host [part=input]{display:block;width:100%;height:var(--input-height);margin:0;padding-top:0;padding-bottom:0;padding-left:calc(var(--button-horz-pad) + var(--button-font-size) + var(--button-horz-pad) + var(--input-horz-pad));padding-right:var(--input-horz-pad);background-color:#313131;border:var(--global-border-width--normal) solid var(--global-color-primary--dark);border-radius:5px;color:var(--global-color-primary--xx-light);font-size:var(--input-font-size)}:host [part=input]::-moz-placeholder{color:var(--global-color-primary--xx-light);opacity:.5}:host [part=input]:-ms-input-placeholder{color:var(--global-color-primary--xx-light);opacity:.5}:host [part=input]::placeholder{color:var(--global-color-primary--xx-light);opacity:.5}
@@ -1 +1 @@
1
- /*! @tacc/core-styles 0.8.0-beta+ | MIT | github.com/TACC/Core-Styles */
1
+ /*! @tacc/core-styles 0.8.0+ | MIT | github.com/TACC/Core-Styles */
@@ -1,2 +1,2 @@
1
- /*! @tacc/core-styles 0.8.0-beta+ | MIT | github.com/TACC/Core-Styles */
1
+ /*! @tacc/core-styles 0.8.0+ | MIT | github.com/TACC/Core-Styles */
2
2
  .u-hide--visually:not(:focus,:active){clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;border:none;padding:0}
@@ -1,2 +1,2 @@
1
- /*! @tacc/core-styles 0.8.0-beta+ | MIT | github.com/TACC/Core-Styles */
1
+ /*! @tacc/core-styles 0.8.0+ | MIT | github.com/TACC/Core-Styles */
2
2
  .u-nested-text-content{padding-left:var(--global-space--list-indent)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tacc/core-styles",
3
- "version": "0.8.0-beta",
3
+ "version": "0.8.0",
4
4
  "license": "MIT",
5
5
  "author": "TACC ACI WMA <wma-portals@gmail.com>",
6
6
  "description": "CSS source and processor for TACC Core-CMS and Core-Portal.",
@@ -19,9 +19,9 @@
19
19
  "scripts": {
20
20
  "start": "fractal start --sync",
21
21
  "build": "npm run build:css && npm run build:demo",
22
- "build:css": "bin/build-css.js",
22
+ "build:css": "bin/build.js",
23
23
  "build:demo": "fractal build",
24
- "test": "bin/test-css.js && echo \"Test output at 'dist/_tests' (compare to test input)",
24
+ "test": "bin/test.js && echo \"Test output at 'dist/_tests' (compare to test input)\"",
25
25
  "prepublishOnly": "npm run build # && npm test && npm run lint"
26
26
  },
27
27
  "engines": {
@@ -54,7 +54,7 @@
54
54
  "postcss-extend": "To extend CSS rule sets at build-time",
55
55
  "postcss-preset-env": "To use future CSS features now"
56
56
  },
57
- "peerDependencies": {
57
+ "devDependencies": {
58
58
  "@frctl/fractal": "^1.5.13",
59
59
  "@frctl/mandelbrot": "^1.10.1"
60
60
  }
@@ -8,15 +8,12 @@
8
8
 
9
9
  {{! styles: global (for every component) }}
10
10
  {{! (manually configured) }}
11
- {{#if styles.external.global}}
12
- {{#each styles.external.global}}
13
- <link rel='stylesheet' href='{{this}}' />
14
- {{/each}}
15
- {{else if styles.internal.global}}
16
- {{#each styles.internal.global}}
17
- <link rel='stylesheet' href='{{path this}}' />
18
- {{/each}}
19
- {{/if}}
11
+ {{#each styles.external.global}}
12
+ <link rel='stylesheet' href='{{this}}' />
13
+ {{/each}}
14
+ {{#each styles.internal.global}}
15
+ <link rel='stylesheet' href='{{path this}}' />
16
+ {{/each}}
20
17
 
21
18
  {{! styles: local (for current component) }}
22
19
  {{! (automatically found) }}
@@ -47,4 +44,4 @@
47
44
  {{/each}}
48
45
 
49
46
  {{! markup }}
50
- {{{yield}}}
47
+ {{{yield}}}
@@ -7,7 +7,7 @@ Add to Bootstrap styles. See:
7
7
 
8
8
  Styleguide Components.Bootstrap.Grid
9
9
  */
10
- @import url("_imports/tools/media-queries.css");
10
+ @import url("../tools/media-queries.css");
11
11
 
12
12
  @media (--x-wide-and-above) {
13
13
  .container { max-width: var(--global-max-width--x-wide); }
@@ -0,0 +1,21 @@
1
+ /*
2
+ Form (Bootstrap)
3
+ Override Bootstrap styles. See:
4
+ - [ReactStrap Forms](https://reactstrap.github.io/components/form/)
5
+ - [Bootstrap Forms](https://getbootstrap.com/docs/4.4/components/forms/)
6
+ Styleguide Components.Bootstrap.Form
7
+ */
8
+ @import url('../settings/border.css');
9
+
10
+ .form-control {
11
+ border: var(--global-border--normal);
12
+ border-radius: 0;
13
+ }
14
+ input.form-control,
15
+ textarea.form-control {
16
+ /* FAQ: Vertical padding reduced by 1px each to near input height of design * 1.2 */
17
+ padding: 6px 12px; /* 6px 10px design * 1.2 design-to-app ratio */
18
+ }
19
+ .input-group-prepend {
20
+ z-index: 1; /* so child button border is above sibling input border */
21
+ }
@@ -0,0 +1,74 @@
1
+ /* TODO: Migrate any other should-be-global Portal modal styles to here */
2
+ /* FP-344: Consider a Modal component and a CSS module */
3
+ /*
4
+ Modal (Bootstrap)
5
+
6
+ Override Bootstrap styles. See:
7
+
8
+ - [ReactStrap Forms](https://reactstrap.github.io/components/modals/)
9
+ - [Bootstrap Forms](https://getbootstrap.com/docs/4.4/components/modal/)
10
+
11
+ Styleguide Components.Bootstrap.Modal
12
+ */
13
+ @import url('../tools/x-truncate.css');
14
+
15
+ .modal-content,
16
+ .modal-header,
17
+ .modal-body,
18
+ .modal-footer {
19
+ border-radius: 0;
20
+ }
21
+ .modal-content,
22
+ .modal-header,
23
+ .modal-body {
24
+ border: none;
25
+ }
26
+ .modal-footer {
27
+ border-left: none;
28
+ border-right: none;
29
+ border-bottom: none;
30
+ }
31
+
32
+ .modal-header {
33
+ background-color: var(--global-color-primary--x-light);
34
+ padding: 1.35rem 1.75rem; /* (18px 23.5px design * 1.2 design-to-app ratio) */
35
+ }
36
+ .modal-title {
37
+ color: var(--global-color-primary--xx-dark);
38
+ font-weight: normal;
39
+ font-size: 1.2rem; /* 16px design * 1.2 design-to-app ratio */
40
+
41
+ @extend .x-truncate--one-line;
42
+ }
43
+
44
+ /* To darken close button */
45
+ .modal-header .close {
46
+ color: var(--global-color-primary--x-dark);
47
+ opacity: 1;
48
+ }
49
+ /* FAQ: The specificity matches Bootstrap */
50
+ .modal-header .close:not(:disabled):not(.disabled):focus,
51
+ .modal-header .close:not(:disabled):not(.disabled):hover {
52
+ color: var(--global-color-primary--xx-dark);
53
+ opacity: 1;
54
+ }
55
+
56
+ /* To render modal close button icon as a Cortal icon */
57
+ /* CAVEAT: Pass `charCode="&#xe912;"` to `<ModalHeader>` */
58
+ .modal-header .close span {
59
+ /* To mimic `.icon` styles without `@extend` or `composes` (unavailable) */
60
+ /* HACK: Copied (and reduced and edited) from `src/styles/trumps/icon...` */
61
+ font-size: 1.5rem; /* bigger to match header text font height (like design) */
62
+ font-family: Cortal-Icons !important;
63
+ }
64
+
65
+ .modal-header.has-MuiTabs {
66
+ flex-direction: row;
67
+ position: relative;
68
+ height: 63.5px;
69
+ border-bottom: 1px solid #afafaf;
70
+ padding: 5px;
71
+ }
72
+ .modal-header.has-MuiTabs .close {
73
+ transform: translate(-25%, 25%);
74
+ }
@@ -7,7 +7,7 @@ Style Bootstrap pagination. See:
7
7
 
8
8
  Styleguide Components.Bootstrap.Pagination
9
9
  */
10
- @import url("_imports/components/c-page.css");
10
+ @import url("../components/c-page.css");
11
11
 
12
12
 
13
13
 
@@ -1,91 +1,185 @@
1
1
  <dl>
2
2
  {{#if supports.type}}
3
3
  <dt>Type</dt>
4
- <dd>
5
- <button class="c-button c-button--{{this._self.name}} c-button--secondary"
6
- {{#if disabled}}disabled{{/if}}>
7
- <span class="c-button__text">--secondary</span>
8
- </button>
9
- {{#if small}}
10
- <small>(no small primary allowed)</small>
11
- {{else}}
12
- <button class="c-button c-button--{{this._self.name}} c-button--primary"
13
- {{#if disabled}}disabled{{/if}}>
14
- <span class="c-button__text">--primary</span>
4
+ <dd><dl>
5
+ <dt><code>&lt;button&gt;</code></dt>
6
+ <dd>
7
+ <button class="c-button c-button--{{this._self.name}} c-button--secondary"
8
+ {{#if disabled}}disabled{{/if}}>
9
+ <span class="c-button__text">--secondary</span>
15
10
  </button>
16
- {{/if}}
17
- <button class="c-button c-button--{{this._self.name}} c-button--tertiary"
18
- {{#if disabled}}disabled{{/if}}>
19
- <span class="c-button__text">--tertiary</span>
20
- </button>
21
- </dd>
11
+ {{#if small}}
12
+ <small>(no small primary allowed)</small>
13
+ {{else}}
14
+ <button class="c-button c-button--{{this._self.name}} c-button--primary"
15
+ {{#if disabled}}disabled{{/if}}>
16
+ <span class="c-button__text">--primary</span>
17
+ </button>
18
+ {{/if}}
19
+ <button class="c-button c-button--{{this._self.name}} c-button--tertiary"
20
+ {{#if disabled}}disabled{{/if}}>
21
+ <span class="c-button__text">--tertiary</span>
22
+ </button>
23
+ </dd>
24
+
25
+ <dt><code>&lt;a&gt;</code></dt>
26
+ <dd>
27
+ <a href="#" class="c-button c-button--{{this._self.name}} c-button--secondary"
28
+ {{#if disabled}}disabled{{/if}}>
29
+ <span class="c-button__text">--secondary</span>
30
+ </a>
31
+ {{#if small}}
32
+ <small>(no small primary allowed)</small>
33
+ {{else}}
34
+ <a href="#" class="c-button c-button--{{this._self.name}} c-button--primary"
35
+ {{#if disabled}}disabled{{/if}}>
36
+ <span class="c-button__text">--primary</span>
37
+ </a>
38
+ {{/if}}
39
+ <a href="#" class="c-button c-button--{{this._self.name}} c-button--tertiary"
40
+ {{#if disabled}}disabled{{/if}}>
41
+ <span class="c-button__text">--tertiary</span>
42
+ </a>
43
+ </dd>
44
+ </dl><dd>
22
45
  {{/if}}
23
46
 
24
47
  {{#if supports.states}}
25
48
  <dt>States</dt>
26
- <dd>
27
- <button class="c-button c-button--{{this._self.name}}
28
- {{#if type}}{{type}}{{/if}}"
29
- {{#if disabled}}disabled{{/if}}>
30
- <span class="c-button__text">default</span>
31
- </button>
32
- <button class="c-button c-button--{{this._self.name}} c-button--is-busy
33
- {{#if type}}{{type}}{{/if}}"
34
- disabled>
35
- <span class="c-button__text">--is-busy</span>
36
- </button>
37
- </dd>
49
+ <dd><dl>
50
+ <dt><code>&lt;button&gt;</code></dt>
51
+ <dd>
52
+ <button class="c-button c-button--{{this._self.name}}
53
+ {{#if type}}{{type}}{{/if}}"
54
+ {{#if disabled}}disabled{{/if}}>
55
+ <span class="c-button__text">default</span>
56
+ </button>
57
+ <button class="c-button c-button--{{this._self.name}} c-button--is-busy
58
+ {{#if type}}{{type}}{{/if}}"
59
+ disabled>
60
+ <span class="c-button__text">--is-busy</span>
61
+ </dd>
62
+
63
+ <dt><code>&lt;a&gt;</code></dt>
64
+ <dd>
65
+ <a href="#" class="c-button c-button--{{this._self.name}}
66
+ {{#if type}}{{type}}{{/if}}"
67
+ {{#if disabled}}disabled{{/if}}>
68
+ <span class="c-button__text">default</span>
69
+ </a>
70
+ <a href="#" class="c-button c-button--{{this._self.name}} c-button--is-busy
71
+ {{#if type}}{{type}}{{/if}}"
72
+ disabled>
73
+ <span class="c-button__text">--is-busy</span>
74
+ </a>
75
+ </dd>
76
+ </dl><dd>
38
77
  {{/if}}
39
78
 
40
79
  {{#if supports.icons}}
41
80
  <dt>Icons</dt>
42
- <dd>
43
- <button class="c-button c-button--{{this._self.name}}
44
- {{#if type}}{{type}}{{/if}}"
45
- {{#if disabled}}disabled{{/if}}>
46
- <i class="c-button__icon--before" aria-description="validate input">…</i>
47
- <span class="c-button__text">__icon--before</span>
48
- </button>
49
- <button class="c-button c-button--{{this._self.name}}
50
- {{#if type}}{{type}}{{/if}}"
51
- {{#if disabled}}disabled{{/if}}>
52
- <span class="c-button__text">__icon--after</span>
53
- <i class="c-button__icon--after" aria-description="exit page">X</i>
54
- </button>
55
- </dd>
81
+ <dd><dl>
82
+ <dt><code>&lt;button&gt;</code></dt>
83
+ <dd>
84
+ <button class="c-button c-button--{{this._self.name}}
85
+ {{#if supports.width}}c-button--width-long{{/if}}
86
+ {{#if type}}{{type}}{{/if}}"
87
+ {{#if disabled}}disabled{{/if}}>
88
+ <i class="c-button__icon--before" aria-description="validate input">…</i>
89
+ <span class="c-button__text">__icon--before</span>
90
+ </button>
91
+ <button class="c-button c-button--{{this._self.name}}
92
+ {{#if supports.width}}c-button--width-long{{/if}}
93
+ {{#if type}}{{type}}{{/if}}"
94
+ {{#if disabled}}disabled{{/if}}>
95
+ <span class="c-button__text">__icon--after</span>
96
+ <i class="c-button__icon--after" aria-description="exit page">X</i>
97
+ </dd>
98
+
99
+ <dt><code>&lt;a&gt;</code></dt>
100
+ <dd>
101
+ <a href="#" class="c-button c-button--{{this._self.name}}
102
+ {{#if supports.width}}c-button--width-long{{/if}}
103
+ {{#if type}}{{type}}{{/if}}"
104
+ {{#if disabled}}disabled{{/if}}>
105
+ <i class="c-button__icon--before" aria-description="validate input">…</i>
106
+ <span class="c-button__text">__icon--before</span>
107
+ </a>
108
+ <a href="#" class="c-button c-button--{{this._self.name}}
109
+ {{#if supports.width}}c-button--width-long{{/if}}
110
+ {{#if type}}{{type}}{{/if}}"
111
+ {{#if disabled}}disabled{{/if}}>
112
+ <span class="c-button__text">__icon--after</span>
113
+ <i class="c-button__icon--after" aria-description="exit page">X</i>
114
+ </a>
115
+ </dd>
116
+ </dl><dd>
56
117
  {{/if}}
57
118
 
58
119
  {{#if supports.width}}
59
120
  <dt>Width</dt>
60
- <dd>
61
- <button class="c-button c-button--{{this._self.name}} c-button--width-short
62
- {{#if type}}{{type}}{{/if}}"
63
- {{#if disabled}}disabled{{/if}}>
64
- <span class="c-button__text">--width-short</span>
65
- </button>
66
- <button class="c-button c-button--{{this._self.name}} c-button--width-medium {{#if type}}{{type}}{{/if}}"
67
- {{#if disabled}}disabled{{/if}}>
68
- <span class="c-button__text">--width-medium</span>
69
- </button>
70
- <button class="c-button c-button--{{this._self.name}} c-button--width-large {{#if type}}{{type}}{{/if}}"
71
- {{#if disabled}}disabled{{/if}}>
72
- <span class="c-button__text">--width-large</span>
73
- </button>
74
- </dd>
121
+ <dd><dl>
122
+ <dt><code>&lt;button&gt;</code></dt>
123
+ <dd>
124
+ <button class="c-button c-button--{{this._self.name}}
125
+ {{#if type}}{{type}}{{/if}}"
126
+ {{#if disabled}}disabled{{/if}}>
127
+ <span class="c-button__text">--width-short</span>
128
+ </button>
129
+ <button class="c-button c-button--{{this._self.name}} c-button--width-medium {{#if type}}{{type}}{{/if}}"
130
+ {{#if disabled}}disabled{{/if}}>
131
+ <span class="c-button__text">--width-medium</span>
132
+ </button>
133
+ <button class="c-button c-button--{{this._self.name}} c-button--width-long {{#if type}}{{type}}{{/if}}"
134
+ {{#if disabled}}disabled{{/if}}>
135
+ <span class="c-button__text">--width-long</span>
136
+ </dd>
137
+
138
+ <dt><code>&lt;a&gt;</code></dt>
139
+ <dd>
140
+ <a href="#" class="c-button c-button--{{this._self.name}}
141
+ {{#if type}}{{type}}{{/if}}"
142
+ {{#if disabled}}disabled{{/if}}>
143
+ <span class="c-button__text">--width-short</span>
144
+ </a>
145
+ <a href="#" class="c-button c-button--{{this._self.name}} c-button--width-medium {{#if type}}{{type}}{{/if}}"
146
+ {{#if disabled}}disabled{{/if}}>
147
+ <span class="c-button__text">--width-medium</span>
148
+ </a>
149
+ <a href="#" class="c-button c-button--{{this._self.name}} c-button--width-long {{#if type}}{{type}}{{/if}}"
150
+ {{#if disabled}}disabled{{/if}}>
151
+ <span class="c-button__text">--width-long</span>
152
+ </a>
153
+ </dd>
154
+ </dl><dd>
75
155
  {{/if}}
76
156
 
77
157
  {{#if supports.size}}
78
158
  <dt>Size</dt>
79
159
  <dd>
80
160
  {{#if supports.size-small}}
81
- <button class="c-button c-button--{{this._self.name}} c-button--size-small
82
- {{#if type}}{{type}}{{/if}}"
83
- {{#if disabled}}disabled{{/if}}>
84
- <span class="c-button__text">--size-small</span>
85
- </button>
161
+ <dl>
162
+ <dt><code>&lt;button&gt;</code></dt>
163
+ <dd>
164
+ <button class="c-button c-button--{{this._self.name}} c-button--size-small
165
+ {{#if type}}{{type}}{{/if}}"
166
+ {{#if disabled}}disabled{{/if}}>
167
+ <span class="c-button__text">--size-small</span>
168
+ </button>
169
+ </dd>
170
+
171
+ <dt><code>&lt;a&gt;</code></dt>
172
+ <dd>
173
+ <a href="#" class="c-button c-button--{{this._self.name}} c-button--size-small
174
+ {{#if type}}{{type}}{{/if}}"
175
+ {{#if disabled}}disabled{{/if}}>
176
+ <span class="c-button__text">--size-small</span>
177
+ </a>
178
+ </dd>
179
+ </dl>
86
180
  {{else}}
87
- <small>(no small size allowed)</small>
181
+ <small>(no small size allowed)</small>
88
182
  {{/if}}
89
- </dd>
183
+ <dd>
90
184
  {{/if}}
91
185
  </dl>
@@ -1,3 +1,8 @@
1
1
  dd > * {
2
2
  margin-right: 0.5em;
3
+ vertical-align: middle;
4
+ }
5
+
6
+ .c-button > i {
7
+ font-style: normal;
3
8
  }
@@ -1,5 +1,8 @@
1
- @import url("_imports/tools/x-truncate.css");
1
+ @import url("../tools/x-truncate.css");
2
2
 
3
+ @custom-selector :--disabled
4
+ :disabled,
5
+ :where(a[disabled]);
3
6
 
4
7
 
5
8
 
@@ -21,17 +24,20 @@
21
24
 
22
25
  @extend %x-truncate--one-line;
23
26
  }
27
+ a.c-button {
28
+ text-decoration: none;
29
+ }
24
30
 
25
- .c-button:not(:disabled) {
31
+ .c-button:not(:--disabled) {
26
32
  cursor: pointer; /* WARNING: Opinionated */
27
33
  }
28
- .c-button:disabled:not(.c-button--is-busy) {
34
+ .c-button:--disabled:not(.c-button--is-busy) {
29
35
  color: var(--global-color-primary--dark);
30
36
  border-color: var(--global-color-primary--dark);
31
37
 
32
38
  pointer-events: none;
33
39
  }
34
- .c-button:disabled:not(.c-button--is-busy, .c-button--as-link) {
40
+ .c-button:--disabled:not(.c-button--is-busy, .c-button--as-link) {
35
41
  background-color: var(--global-color-primary--xx-light);
36
42
  }
37
43
 
@@ -86,7 +92,7 @@
86
92
  .c-button:hover,
87
93
  .c-button:focus,
88
94
  .c-button:active,
89
- .c-button:disabled
95
+ .c-button:--disabled
90
96
  ) {
91
97
  color: var(--global-color-primary--xx-light);
92
98
  background-color: var(--global-color-accent--normal);
@@ -121,13 +127,13 @@
121
127
  }
122
128
 
123
129
  .c-button--secondary.c-button--is-busy,
124
- .c-button--secondary:not(.c-button:hover, .c-button:focus, .c-button:active, .c-button:disabled) {
130
+ .c-button--secondary:not(.c-button:hover, .c-button:focus, .c-button:active, .c-button:--disabled) {
125
131
  color: var(--global-color-primary--xx-dark);
126
132
  background-color: var(--global-color-primary--x-light);
127
133
  border-color: var(--global-color-primary--xx-dark);
128
134
  }
129
135
 
130
- .c-button/* for specificity to override */.c-button--secondary:disabled {
136
+ .c-button/* for specificity to override */.c-button--secondary:--disabled {
131
137
  background-color: var(--global-color-primary--x-light);
132
138
  }
133
139
 
@@ -163,7 +169,7 @@
163
169
  .c-button:hover,
164
170
  .c-button:focus,
165
171
  .c-button:active,
166
- .c-button:disabled
172
+ .c-button:--disabled
167
173
  ) {
168
174
  color: var(--global-color-primary--xx-dark);
169
175
  background-color: var(--global-color-primary--xx-light);
@@ -202,7 +208,7 @@
202
208
  .c-button:hover,
203
209
  .c-button:focus,
204
210
  .c-button:active,
205
- .c-button:disabled
211
+ .c-button:--disabled
206
212
  ) {
207
213
  color: var(--global-color-primary--xx-dark);
208
214
  background-color: var(--global-color-accent--x-light);
@@ -218,7 +224,7 @@
218
224
  border: unset;
219
225
  padding-inline: unset;
220
226
  }
221
- .c-button--as-link:not(:disabled):hover {
227
+ .c-button--as-link:not(:--disabled):hover {
222
228
  text-decoration: underline;
223
229
  }
224
230
 
@@ -235,6 +241,13 @@
235
241
 
236
242
  /* Modifiers: Sizes */
237
243
 
244
+ .c-button:not(
245
+ .c-button--width-short,
246
+ .c-button--width-medium,
247
+ .c-button--width-long,
248
+ .c-button--size-small,
249
+ .c-button--as-link
250
+ ),
238
251
  .c-button--width-short {
239
252
  width: var(--min-width);
240
253
  }
@@ -256,6 +269,10 @@
256
269
 
257
270
  /* Elements */
258
271
 
272
+ .c-button > * {
273
+ vertical-align: middle;
274
+ }
275
+
259
276
  .c-button__icon--before {
260
277
  margin-right: 0.5em;
261
278
  }
@@ -7,8 +7,8 @@ Markup: c-callout.html
7
7
 
8
8
  Styleguide Components.Callout
9
9
  */
10
- @import url("_imports/tools/media-queries.css");
11
- @import url("_imports/tools/x-article-link.css");
10
+ @import url("../tools/media-queries.css");
11
+ @import url("../tools/x-article-link.css");
12
12
 
13
13
 
14
14
 
@@ -11,7 +11,7 @@ Markup: c-card.html
11
11
 
12
12
  Styleguide Components.Card
13
13
  */
14
- @import url("_imports/tools/x-article-link.css");
14
+ @import url("../tools/x-article-link.css");
15
15
 
16
16
  /* Modifiers */
17
17
 
@@ -29,7 +29,7 @@ Markup: c-data-list.html
29
29
 
30
30
  Styleguide Components.DataList
31
31
  */
32
- @import url("_imports/tools/x-truncate.css");
32
+ @import url("../tools/x-truncate.css");
33
33
 
34
34
 
35
35
 
@@ -17,7 +17,7 @@ Markup: c-nav.html
17
17
 
18
18
  Styleguide Components.Nav
19
19
  */
20
- @import url("_imports/tools/media-queries.css");
20
+ @import url("../tools/media-queries.css");
21
21
 
22
22
 
23
23
 
@@ -11,7 +11,7 @@ Markup:
11
11
 
12
12
  Styleguide Components.SeeAllLink
13
13
  */
14
- @import url("_imports/tools/x-truncate.css");
14
+ @import url("../tools/x-truncate.css");
15
15
 
16
16
 
17
17
 
@@ -11,7 +11,7 @@ A CSS-only way to support a "Show More…" feature. It requires a container and
11
11
 
12
12
  Styleguide: Components.ShowMore
13
13
  */
14
- @import url("_imports/tools/x-truncate.css");
14
+ @import url("../tools/x-truncate.css");
15
15
 
16
16
  /* Truncation */
17
17