@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.
- package/.postcssrc.base.yml +48 -0
- package/README.md +244 -0
- package/bin/build.js +40 -0
- package/bin/config.js +90 -0
- package/bin/version.js +24 -0
- package/cli.js +77 -0
- package/dist/branding_logos.css +2 -0
- package/dist/components/README.css +1 -0
- package/dist/components/bootstrap.container.css +2 -0
- package/dist/components/bootstrap.figure.css +2 -0
- package/dist/components/bootstrap.pagination.css +2 -0
- package/dist/components/c-button.css +2 -0
- package/dist/components/c-callout.css +2 -0
- package/dist/components/c-card.css +2 -0
- package/dist/components/c-data-list.css +2 -0
- package/dist/components/c-footer.css +2 -0
- package/dist/components/c-image-map.css +2 -0
- package/dist/components/c-image-map.skin.css +1 -0
- package/dist/components/c-image-map.structure.css +2 -0
- package/dist/components/c-nav.css +2 -0
- package/dist/components/c-page.css +2 -0
- package/dist/components/c-recognition.css +2 -0
- package/dist/components/c-see-all-link.css +2 -0
- package/dist/components/c-show-more.css +2 -0
- package/dist/elements/README.css +1 -0
- package/dist/elements/figure.css +2 -0
- package/dist/elements/html-elements.css +2 -0
- package/dist/elements/tacc-search-bar.css +2 -0
- package/dist/generics/README.css +1 -0
- package/dist/objects/README.css +1 -0
- package/dist/objects/o-flex-item-table-wrap.css +2 -0
- package/dist/objects/o-grid.css +2 -0
- package/dist/objects/o-offset-content.css +2 -0
- package/dist/objects/o-section.css +2 -0
- package/dist/objects/o-site.css +2 -0
- package/dist/settings/README.css +1 -0
- package/dist/settings/border.css +2 -0
- package/dist/settings/color.css +2 -0
- package/dist/settings/font.css +2 -0
- package/dist/settings/max-width.css +2 -0
- package/dist/settings/space.css +2 -0
- package/dist/tools/README.css +1 -0
- package/dist/tools/media-queries.css +1 -0
- package/dist/tools/x-article-link.css +2 -0
- package/dist/tools/x-center.css +2 -0
- package/dist/tools/x-fake-border.css +2 -0
- package/dist/tools/x-grid.css +1 -0
- package/dist/tools/x-layout.css +2 -0
- package/dist/tools/x-overlay.css +1 -0
- package/dist/tools/x-truncate.css +2 -0
- package/dist/trumps/README.css +1 -0
- package/dist/trumps/icon.css +2 -0
- package/dist/trumps/icon.fonts.css +2 -0
- package/dist/trumps/s-article-list.css +2 -0
- package/dist/trumps/s-article-preview.css +2 -0
- package/dist/trumps/s-blockquote.css +2 -0
- package/dist/trumps/s-breadcrumbs.css +2 -0
- package/dist/trumps/s-cms-nav.css +1 -0
- package/dist/trumps/s-document.css +2 -0
- package/dist/trumps/s-footer.css +2 -0
- package/dist/trumps/s-guide-doc.css +2 -0
- package/dist/trumps/s-header.css +2 -0
- package/dist/trumps/s-inline-dl.css +2 -0
- package/dist/trumps/s-portal-nav.css +2 -0
- package/dist/trumps/s-style-guide.css +2 -0
- package/dist/trumps/s-system-specs.css +2 -0
- package/dist/trumps/tacc-search-bar.css +2 -0
- package/dist/trumps/u-empty.css +1 -0
- package/dist/trumps/u-hide.css +2 -0
- package/dist/trumps/u-nested-text-content.css +2 -0
- package/index.js +45 -0
- package/package.json +49 -0
- package/source/README.md +8 -0
- package/source/_imports/README.md +47 -0
- package/source/_imports/branding_logos.css +73 -0
- package/source/_imports/components/README.css +26 -0
- package/source/_imports/components/bootstrap.container.css +23 -0
- package/source/_imports/components/bootstrap.figure.css +17 -0
- package/source/_imports/components/bootstrap.pagination.css +29 -0
- package/source/_imports/components/c-button.css +210 -0
- package/source/_imports/components/c-button.html +31 -0
- package/source/_imports/components/c-callout.css +183 -0
- package/source/_imports/components/c-callout.html +52 -0
- package/source/_imports/components/c-card.css +57 -0
- package/source/_imports/components/c-card.html +32 -0
- package/source/_imports/components/c-data-list.css +222 -0
- package/source/_imports/components/c-data-list.html +145 -0
- package/source/_imports/components/c-footer.css +67 -0
- package/source/_imports/components/c-footer.html +3 -0
- package/source/_imports/components/c-image-map.css +26 -0
- package/source/_imports/components/c-image-map.html +4 -0
- package/source/_imports/components/c-image-map.skin.css +1 -0
- package/source/_imports/components/c-image-map.structure.css +285 -0
- package/source/_imports/components/c-nav.css +164 -0
- package/source/_imports/components/c-nav.html +45 -0
- package/source/_imports/components/c-page.css +95 -0
- package/source/_imports/components/c-page.html +192 -0
- package/source/_imports/components/c-recognition.css +102 -0
- package/source/_imports/components/c-see-all-link.css +52 -0
- package/source/_imports/components/c-show-more.css +50 -0
- package/source/_imports/elements/README.css +47 -0
- package/source/_imports/elements/figure.css +23 -0
- package/source/_imports/elements/html-elements.css +386 -0
- package/source/_imports/elements/tacc-search-bar.css +19 -0
- package/source/_imports/elements/tacc-search-bar.md +20 -0
- package/source/_imports/generics/README.css +24 -0
- package/source/_imports/generics/README.md +9 -0
- package/source/_imports/objects/README.css +22 -0
- package/source/_imports/objects/o-flex-item-table-wrap.css +50 -0
- package/source/_imports/objects/o-grid.css +131 -0
- package/source/_imports/objects/o-grid.html +64 -0
- package/source/_imports/objects/o-offset-content.css +51 -0
- package/source/_imports/objects/o-section.css +270 -0
- package/source/_imports/objects/o-section.html +73 -0
- package/source/_imports/objects/o-site.css +26 -0
- package/source/_imports/objects/o-site.html +11 -0
- package/source/_imports/settings/README.css +65 -0
- package/source/_imports/settings/border.css +15 -0
- package/source/_imports/settings/color.css +30 -0
- package/source/_imports/settings/font.css +49 -0
- package/source/_imports/settings/max-width.css +31 -0
- package/source/_imports/settings/space.css +36 -0
- package/source/_imports/tools/README.css +17 -0
- package/source/_imports/tools/media-queries.css +48 -0
- package/source/_imports/tools/x-article-link.css +62 -0
- package/source/_imports/tools/x-center.css +60 -0
- package/source/_imports/tools/x-fake-border.css +72 -0
- package/source/_imports/tools/x-grid.css +116 -0
- package/source/_imports/tools/x-layout.css +86 -0
- package/source/_imports/tools/x-overlay.css +28 -0
- package/source/_imports/tools/x-truncate.css +47 -0
- package/source/_imports/trumps/README.css +79 -0
- package/source/_imports/trumps/icon.css +31 -0
- package/source/_imports/trumps/icon.fonts.css +316 -0
- package/source/_imports/trumps/s-article-list.css +240 -0
- package/source/_imports/trumps/s-article-list.html +20 -0
- package/source/_imports/trumps/s-article-preview.css +253 -0
- package/source/_imports/trumps/s-article-preview.html +30 -0
- package/source/_imports/trumps/s-blockquote.css +45 -0
- package/source/_imports/trumps/s-breadcrumbs.css +69 -0
- package/source/_imports/trumps/s-cms-nav.css +11 -0
- package/source/_imports/trumps/s-cms-nav.html +41 -0
- package/source/_imports/trumps/s-document.css +142 -0
- package/source/_imports/trumps/s-footer.css +16 -0
- package/source/_imports/trumps/s-footer.html +3 -0
- package/source/_imports/trumps/s-guide-doc.css +77 -0
- package/source/_imports/trumps/s-header.css +181 -0
- package/source/_imports/trumps/s-header.html +46 -0
- package/source/_imports/trumps/s-inline-dl.css +35 -0
- package/source/_imports/trumps/s-portal-nav.css +20 -0
- package/source/_imports/trumps/s-portal-nav.html +37 -0
- package/source/_imports/trumps/s-style-guide.css +52 -0
- package/source/_imports/trumps/s-system-specs.css +123 -0
- package/source/_imports/trumps/tacc-search-bar.css +108 -0
- package/source/_imports/trumps/tacc-search-bar.html +11 -0
- package/source/_imports/trumps/u-empty.css +18 -0
- package/source/_imports/trumps/u-hide.css +27 -0
- package/source/_imports/trumps/u-nested-text-content.css +14 -0
- package/source/_tests/README.md +33 -0
- package/source/_tests/postcss-extend.css +80 -0
- package/source/_tests/postcss-preset-env.css +75 -0
- package/source/_tests.css +12 -0
- package/source/_themes/README.md +5 -0
- package/source/_themes/TODO.md +4 -0
- package/source/_themes/default.json +21 -0
- package/source/_themes/has-dark-logo.json +21 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Max. Widths (Bootstrap)
|
|
3
|
+
|
|
4
|
+
Define maximum widths for Bootstrap 5.0 containers and wider.
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
```
|
|
8
|
+
@media (--x-wide-and-above) {
|
|
9
|
+
.container { max-width: var(--global-max-width--x-wide); }
|
|
10
|
+
}
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Reference:
|
|
14
|
+
- https://getbootstrap.com/docs/4.0/layout/grid/#grid-options
|
|
15
|
+
- https://getbootstrap.com/docs/5.0/layout/grid/#grid-options
|
|
16
|
+
|
|
17
|
+
Styleguide Settings.CustomProperties.MaxWidth
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/* Usage: `var(--global-breakpoint--x-narrow)` */
|
|
21
|
+
/* SEE: https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties */
|
|
22
|
+
|
|
23
|
+
:root {
|
|
24
|
+
--global-max-width--x-narrow: 540px;
|
|
25
|
+
--global-max-width--narrow: 720px;
|
|
26
|
+
--global-max-width--medium: 960px;
|
|
27
|
+
--global-max-width--wide: 1140px;
|
|
28
|
+
--global-max-width--x-wide: 1320px;
|
|
29
|
+
--global-max-width--xx-wide: 1580px;
|
|
30
|
+
--global-max-width--xxx-wide: 1800px;
|
|
31
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* DO NOT ADD STYLES HERE; ADD CUSTOM PROPERTIES TO USE IN OTHER STYLESHEETS */
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Spacing
|
|
5
|
+
|
|
6
|
+
These are global spacing values for a website.
|
|
7
|
+
|
|
8
|
+
_Notice_: We will use Bootstrap values until Design defines values.
|
|
9
|
+
|
|
10
|
+
Usage: `var(--global-space--normal)`
|
|
11
|
+
|
|
12
|
+
Reference:
|
|
13
|
+
- https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties
|
|
14
|
+
- https://getbootstrap.com/docs/4.0/utilities/spacing/
|
|
15
|
+
- https://getbootstrap.com/docs/4.0/getting-started/theming/#sass-options
|
|
16
|
+
|
|
17
|
+
Styleguide Settings.CustomProperties.Space
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/* Modifers
|
|
21
|
+
--normal: standard value
|
|
22
|
+
--(…)small: smaller value
|
|
23
|
+
--(…)large: larger value
|
|
24
|
+
*/
|
|
25
|
+
:root {
|
|
26
|
+
--global-space--xx-small: 0.125rem; /* 2px (if base is 16px) */
|
|
27
|
+
--global-space--x-small: 0.25rem; /* 4px (if base is 16px) */
|
|
28
|
+
--global-space--small: 0.5rem; /* 8px (if base is 16px) */
|
|
29
|
+
--global-space--normal: 1.0rem; /* 16px (if base is 16px) */
|
|
30
|
+
--global-space--large: 1.5rem; /* 25px (if base is 16px) */
|
|
31
|
+
--global-space--x-large: 3.0rem; /* 48px (if base is 16px) */
|
|
32
|
+
|
|
33
|
+
--global-space--list-indent: 40px; /* browser default (Firefox, Edge) */
|
|
34
|
+
--global-space--section-gap: 45px; /* recurring design doc spacing */
|
|
35
|
+
--global-space--grid-gap: 15px; /* Bootstrap `.container` & `.row` */
|
|
36
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* DO NOT ADD STYLES HERE; ADD GLOBAL TOOLS INSIDE STYLESHEETS IN THIS DIRECTORY */
|
|
2
|
+
|
|
3
|
+
/* FAQ: To use global tools, import them into any one global stylesheet */
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Tools
|
|
7
|
+
|
|
8
|
+
Tools are global sets of properties e.g. mixins / `@extend`s / functional selectors, functions / `@plugin`s. They are not defined as Settings, because one may require one of the global Settings as a default parameter.
|
|
9
|
+
|
|
10
|
+
Reference:
|
|
11
|
+
|
|
12
|
+
- [Creative Bloq: Manage Large CSS Projects With ITCSS](https://www.creativebloq.com/web-design/manage-large-css-projects-itcss-101517528) (find "Tools")
|
|
13
|
+
|
|
14
|
+
Weight: 2
|
|
15
|
+
|
|
16
|
+
Styleguide Tools
|
|
17
|
+
*/
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* DO NOT ADD STYLES HERE; ADD CUSTOM MEDIA QUERIES TO USE IN OTHER STYLESHEETS */
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Breakpoints
|
|
5
|
+
|
|
6
|
+
These are global breakpoints values for a website.
|
|
7
|
+
|
|
8
|
+
Usage: `@media (--narrow-and above) { … }`
|
|
9
|
+
|
|
10
|
+
Notice: These must be Tools (imported as needed) until native browser support, at which time they can become Settings (imported globally).
|
|
11
|
+
|
|
12
|
+
Reference:
|
|
13
|
+
- https://drafts.csswg.org/mediaqueries-5/#at-ruledef-custom-media
|
|
14
|
+
- https://confluence.tacc.utexas.edu/x/b4AZCg
|
|
15
|
+
|
|
16
|
+
Styleguide Tools.CustomMediaQueries.Breakpoints
|
|
17
|
+
*/
|
|
18
|
+
@custom-media --x-narrow-and-below (width < 576px);
|
|
19
|
+
@custom-media --x-narrow-and-above (width >= 576px);
|
|
20
|
+
@custom-media --x-narrow-to-narrow (576px <= width < 768px);
|
|
21
|
+
|
|
22
|
+
@custom-media --narrow-and-below (width < 768px);
|
|
23
|
+
@custom-media --narrow-and-above (width >= 768px);
|
|
24
|
+
@custom-media --narrow-to-medium (768px <= width < 992px);
|
|
25
|
+
|
|
26
|
+
@custom-media --medium-and-below (width < 992px);
|
|
27
|
+
@custom-media --medium-and-above (width >= 992px);
|
|
28
|
+
@custom-media --medium-to-wide (992px <= width < 1200px);
|
|
29
|
+
|
|
30
|
+
@custom-media --wide-and-below (width < 1200px);
|
|
31
|
+
@custom-media --wide-and-above (width >= 1200px);
|
|
32
|
+
@custom-media --wide-to-x-wide (1200px <= width < 1400px);
|
|
33
|
+
|
|
34
|
+
@custom-media --x-wide-and-below (width < 1400px);
|
|
35
|
+
@custom-media --x-wide-and-above (width >= 1400px);
|
|
36
|
+
@custom-media --x-wide-to-xx-wide (1400px <= width < 1680px);
|
|
37
|
+
|
|
38
|
+
@custom-media --xx-wide-and-below (width < 1680px);
|
|
39
|
+
@custom-media --xx-wide-and-above (width >= 1680px);
|
|
40
|
+
@custom-media --xx-wide-to-xxx-wide (1680px <= width < 1920px);
|
|
41
|
+
|
|
42
|
+
@custom-media --xxx-wide-and-below (width < 1920px);
|
|
43
|
+
@custom-media --xxx-wide-and-above (width >= 1920px);
|
|
44
|
+
@custom-media --xxx-wide-to-max-wide (1920px <= width < 2400px);
|
|
45
|
+
|
|
46
|
+
@custom-media --max-wide-and-below (width < 2400px);
|
|
47
|
+
@custom-media --max-wide-and-above (width >= 2400px);
|
|
48
|
+
/* @custom-media --max-wide-to-god-wide (... <= width < ...); */
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Article Link
|
|
3
|
+
|
|
4
|
+
Styles that allow visible link hover for article lists.
|
|
5
|
+
|
|
6
|
+
> __⚠️ Warning__: A link ancestor must have its `position` set (not to `static`)
|
|
7
|
+
|
|
8
|
+
%x-article-link-stretch - Stretch link to cover container
|
|
9
|
+
%x-article-link-stretch--gapless - Make link box fix gapless layout
|
|
10
|
+
%x-article-link-hover - Give link a hover state
|
|
11
|
+
%x-article-link-hover--gapless - Make link hover state fix gapless layout
|
|
12
|
+
%x-article-link-active - Give link an active (click, enter) state
|
|
13
|
+
%x-article-link-text - Hide link text
|
|
14
|
+
|
|
15
|
+
Styleguide Tools.ExtendsAndMixins.ArticleLink
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/* To expand link to cover container */
|
|
19
|
+
.x-article-link-stretch,
|
|
20
|
+
%x-article-link-stretch {
|
|
21
|
+
position: absolute;
|
|
22
|
+
height: 100%;
|
|
23
|
+
width: 100%;
|
|
24
|
+
/* To prevent container padding from offsetting an `outline` */
|
|
25
|
+
top: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
|
|
28
|
+
/* To prevent `outline` from being inexplicably offset in Firefox */
|
|
29
|
+
/* SEE: http://johndoesdesign.com/blog/2012/css/firefox-and-its-css-focus-outline-bug/ */
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
}
|
|
32
|
+
.x-article-link-stretch--gapless,
|
|
33
|
+
%x-article-link-stretch--gapless {
|
|
34
|
+
width: calc(100% + 30px); /* GH-99: Use standard spacing value */
|
|
35
|
+
left: -15px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* To give link state (pseudo-class) feedback */
|
|
39
|
+
.x-article-link-hover,
|
|
40
|
+
%x-article-link-hover {
|
|
41
|
+
--outline-offset: 1em;
|
|
42
|
+
|
|
43
|
+
outline: 1px solid var(--global-color-accent--normal);
|
|
44
|
+
|
|
45
|
+
outline-offset: var(--outline-offset);
|
|
46
|
+
}
|
|
47
|
+
.x-article-link-hover--gapless,
|
|
48
|
+
%x-article-link-hover--gapless {
|
|
49
|
+
--outline-offset: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* To give link active state feedback */
|
|
53
|
+
%x-article-link-active {
|
|
54
|
+
outline: 1px dotted var(--global-color-accent--normal);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* To hide link text but retain link element */
|
|
58
|
+
%x-article-link-text {
|
|
59
|
+
line-height: 0;
|
|
60
|
+
font-size: 0;
|
|
61
|
+
color: transparent;
|
|
62
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Center
|
|
3
|
+
|
|
4
|
+
Styles that allow centering for specific contexts.
|
|
5
|
+
|
|
6
|
+
Caveat: Only generic solutions with limited side effects are supported. See "Reference" section for more solutions.
|
|
7
|
+
|
|
8
|
+
Reference:
|
|
9
|
+
- [Centering in CSS: A Complete Guide](https://css-tricks.com/centering-css-complete-guide/)
|
|
10
|
+
|
|
11
|
+
.x-center--horz-inline - Horz. align any num of inline el's
|
|
12
|
+
.x-center--horz-block - Horz. align any num of block el's
|
|
13
|
+
.x-center--horz-block-multiple-children - Horz. align multiple block el's
|
|
14
|
+
.x-center--vert-inline-multiline--flex - Vert. align multiple inline el's: Flex Method
|
|
15
|
+
.x-center--both--flex - Vert. & Horz. align any el's
|
|
16
|
+
|
|
17
|
+
Styleguide Tools.ExtendsAndMixins.Center
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/* Horizontal */
|
|
21
|
+
|
|
22
|
+
/* Horizontal: Inline */
|
|
23
|
+
.x-center--horz-inline, /* DEPRECATED */
|
|
24
|
+
%x-center--horz-inline {
|
|
25
|
+
text-align: center;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Horizontal: Block */
|
|
29
|
+
.x-center--horz-block, /* DEPRECATED */
|
|
30
|
+
%x-center--horz-block {
|
|
31
|
+
margin: 0 auto;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Horizontal: Block: Multiple Children */
|
|
35
|
+
.x-center--horz-block-multiple-children, /* DEPRECATED */
|
|
36
|
+
%x-center--horz-block-multiple-children {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: row;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Vertical */
|
|
43
|
+
|
|
44
|
+
/* Vertical: Inline: Multiple Lines - via Flexbox */
|
|
45
|
+
.x-center--vert-inline-multiline--flex, /* DEPRECATED */
|
|
46
|
+
%x-center--vert-inline-multiline--flex {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Both */
|
|
53
|
+
|
|
54
|
+
/* Both: Any - via Flexbox */
|
|
55
|
+
.x-center--both--flex, /* DEPRECATED */
|
|
56
|
+
%x-center--both--flex {
|
|
57
|
+
display: flex;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
align-items: center;
|
|
60
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Fake Border
|
|
3
|
+
|
|
4
|
+
Fake borders that have features unavailable to regular borders
|
|
5
|
+
|
|
6
|
+
(custom property a.k.a. variable prefix `fb` stands for __f__ake __b__order)
|
|
7
|
+
|
|
8
|
+
%x-fake-border--inset-horz-top - A top border that is not full width
|
|
9
|
+
%x-fake-border--inset-horz-both - Borders top & bottom that are not full width
|
|
10
|
+
%x-fake-border--inset-horz-bottom - A bottom border that is not full width
|
|
11
|
+
|
|
12
|
+
Styleguide Tools.ExtendsAndMixins.Overlay
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
Inset Border
|
|
17
|
+
|
|
18
|
+
To create the border, three lines are drawn via these private variables:
|
|
19
|
+
- `--fb--line` (the fake border on one side of element box)
|
|
20
|
+
- `--fb--start` (a perpindicular strip to shorten the start of the line)
|
|
21
|
+
- `--fb--end` (a perpindicular strip to shorten the end of the line)
|
|
22
|
+
|
|
23
|
+
To customize the lines, there are some public variables:
|
|
24
|
+
- `--fb--line-width` (default: 0px) (add unit so `calc()` will not fail)
|
|
25
|
+
- `--fb--line-color` (default: transparent)
|
|
26
|
+
- `--fb--inset-width` (default: 0px) (add unit so `calc()` will not fail)
|
|
27
|
+
- `--fb--inset-color` (default: transparent)
|
|
28
|
+
- `--fb--shadow-above` (default: 0 0 transparent)
|
|
29
|
+
- `--fb--shadow-below` (default: 0 0 transparent)
|
|
30
|
+
|
|
31
|
+
To avoid overwriting an existing `box-shadow`, use the public shadow variables:
|
|
32
|
+
- `--fb--shadow-above: var(--YOUR-existing-shadow-ABOVE-fake-border)`
|
|
33
|
+
- `--fb--shadow-below: var(--YOUR-existing-shadow-BELOW-fake-border)`
|
|
34
|
+
*/
|
|
35
|
+
%x-fake-border--inset-horz {
|
|
36
|
+
--fb--line-width: 0px; /* CAVEAT: add unit so `calc()` will not fail */
|
|
37
|
+
--fb--line-color: transparent;
|
|
38
|
+
|
|
39
|
+
--fb--inset-width: 0px; /* CAVEAT: add unit so `calc()` will not fail */
|
|
40
|
+
--fb--inset-color: transparent;
|
|
41
|
+
|
|
42
|
+
/* --fb--line: */
|
|
43
|
+
--fb--start: inset calc( 1 * var(--fb--inset-width)) 0 var(--fb--inset-color);
|
|
44
|
+
--fb--end: inset calc(-1 * var(--fb--inset-width)) 0 var(--fb--inset-color);
|
|
45
|
+
|
|
46
|
+
--fb:
|
|
47
|
+
var(--fb--start), /* cover the start of the line */
|
|
48
|
+
var(--fb--end), /* cover the end of the line */
|
|
49
|
+
var(--fb--line); /* draw the line underneath */
|
|
50
|
+
|
|
51
|
+
box-shadow:
|
|
52
|
+
var(--fb--shadow-above, 0 0 transparent),
|
|
53
|
+
var(--fb),
|
|
54
|
+
var(--fb--shadow-below, 0 0 transparent)
|
|
55
|
+
}
|
|
56
|
+
%x-fake-border--inset-horz-top {
|
|
57
|
+
@extend %x-fake-border--inset-horz;
|
|
58
|
+
|
|
59
|
+
--fb--line: inset 0 calc( 1 * var(--fb--line-width)) var(--fb--line-color);
|
|
60
|
+
}
|
|
61
|
+
%x-fake-border--inset-horz-both {
|
|
62
|
+
@extend %x-fake-border--inset-horz;
|
|
63
|
+
|
|
64
|
+
--fb--line: inset 0 calc( 1 * var(--fb--line-width)) var(--fb--line-color),
|
|
65
|
+
inset 0 calc(-1 * var(--fb--line-width)) var(--fb--line-color);
|
|
66
|
+
}
|
|
67
|
+
%x-fake-border--inset-horz-bottom {
|
|
68
|
+
@extend %x-fake-border--inset-horz;
|
|
69
|
+
|
|
70
|
+
--fb--line: inset 0 calc(-1 * var(--fb--line-width)) var(--fb--line-color);
|
|
71
|
+
}
|
|
72
|
+
/* TODO: As needed, create `--inset-vert-left`, `--inset-vert-right` */
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Grid
|
|
3
|
+
|
|
4
|
+
Snippets i.e. atomic abstractions of useful grid functionality.
|
|
5
|
+
|
|
6
|
+
Caveats:
|
|
7
|
+
- Do not combine two `x-grid--layout-rows-…` nor two `x-grid--layout-cols-…`.
|
|
8
|
+
|
|
9
|
+
Reference:
|
|
10
|
+
- [A Complete Guide to Grid](https://css-tricks.com/snippets/css/complete-guide-grid/)
|
|
11
|
+
|
|
12
|
+
%x-grid--layout-rows-equal-max-height - Same height rows, match tallest content
|
|
13
|
+
%x-grid--layout-rows-equal-set-height - Same height rows, default var. height (custom properties: `--height`)
|
|
14
|
+
%x-grid--layout-cols-equal-set-count - Same width columns, auto. column count (custom properties: `--count`)
|
|
15
|
+
%x-grid--layout-cols-equal-min-width - Same width columns, default min. width (custom properties: `--width`)
|
|
16
|
+
%x-grid--content-align-center - Align content vert.ly and horz.ly center
|
|
17
|
+
|
|
18
|
+
Styleguide Tools.ExtendsAndMixins.Grid
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/* Layout */
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
/* Layout: Columns */
|
|
30
|
+
|
|
31
|
+
/* Layout: Columns: Same Width, Preset Col. Count */
|
|
32
|
+
|
|
33
|
+
%x-grid--layout-cols-equal-set-count {
|
|
34
|
+
/* --count */
|
|
35
|
+
|
|
36
|
+
grid-template-columns: repeat(var(--count), auto);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Layout: Columns: Same Width, Preset Min. Width */
|
|
40
|
+
|
|
41
|
+
%x-grid--layout-cols-equal-min-width {
|
|
42
|
+
/* --width */
|
|
43
|
+
|
|
44
|
+
grid-template-columns: repeat(auto-fit, minmax(var(--width), 1fr));
|
|
45
|
+
}
|
|
46
|
+
/* Suggestion for User: Prevent content overflow */
|
|
47
|
+
/*
|
|
48
|
+
.x-grid--layout-cols-equal-min-width > * {
|
|
49
|
+
max-width: 100%; \/* used if cell width is smaller than content *\/
|
|
50
|
+
max-height: 100%; \/* used if cell height is smaller than content *\/
|
|
51
|
+
}
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
/* Layout: Rows */
|
|
57
|
+
|
|
58
|
+
/* Layout: Rows: Same Height (equal to height of tallest content in grid) */
|
|
59
|
+
|
|
60
|
+
%x-grid--layout-rows-equal-max-height {
|
|
61
|
+
grid-auto-rows: 1fr;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Layout: Rows: Same Height (equal to default, variable value) */
|
|
65
|
+
|
|
66
|
+
%x-grid--layout-rows-equal-set-height {
|
|
67
|
+
/* --height */
|
|
68
|
+
|
|
69
|
+
grid-auto-rows: var(--height);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
/* Content */
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
/* Content: Align Vert/Horz Center */
|
|
81
|
+
|
|
82
|
+
%x-grid--content-align-center {
|
|
83
|
+
justify-items: center;
|
|
84
|
+
align-items: center;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
/* Suggestions for User */
|
|
92
|
+
|
|
93
|
+
/*
|
|
94
|
+
.user-block {
|
|
95
|
+
--gap: ...;
|
|
96
|
+
|
|
97
|
+
display: grid;
|
|
98
|
+
gap: var(--gap);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.user-block--modifier {
|
|
102
|
+
@extend %x-grid--...;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
\/* Hide content that does exceed cell size *\/
|
|
106
|
+
.user-block > * {
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
\/* Avoid leting image size exceed cell size *\/
|
|
111
|
+
\/* FAQ: An intentionally loose limitation (so user can choose to ignore it) *\/
|
|
112
|
+
.user-block img {
|
|
113
|
+
max-height: 100%;
|
|
114
|
+
max-width: 100%;
|
|
115
|
+
}
|
|
116
|
+
*/
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Layout
|
|
3
|
+
|
|
4
|
+
Styles that allow re-usable layouts.
|
|
5
|
+
|
|
6
|
+
%x-layout--a - Widest: two even columns
|
|
7
|
+
%x-layout--b - Widest: one wide column & one narrow column
|
|
8
|
+
%x-layout--c - Widest: one narrow column & one wide column
|
|
9
|
+
%x-layout--d - Widest: three even columns
|
|
10
|
+
%x-layout--e - (deprecated) Always: multiple even rows
|
|
11
|
+
|
|
12
|
+
Styleguide Tools.ExtendsAndMixins.Layout
|
|
13
|
+
*/
|
|
14
|
+
@import url("_imports/tools/media-queries.css");
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/* Column-Based */
|
|
19
|
+
|
|
20
|
+
.x-layout--a, /* DEPRECATED */
|
|
21
|
+
.x-layout--b, /* DEPRECATED */
|
|
22
|
+
.x-layout--c, /* DEPRECATED */
|
|
23
|
+
.x-layout--d, /* DEPRECATED */
|
|
24
|
+
%x-layout--a,
|
|
25
|
+
%x-layout--b,
|
|
26
|
+
%x-layout--c,
|
|
27
|
+
%x-layout--d {
|
|
28
|
+
display: grid;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* A (two even columns) */
|
|
32
|
+
|
|
33
|
+
@media (--medium-and-below) {
|
|
34
|
+
.x-layout--a, /* DEPRECATED */
|
|
35
|
+
%x-layout--a { grid-template-columns: repeat(1, minmax(0, 1fr)); }
|
|
36
|
+
}
|
|
37
|
+
@media (--medium-and-above) {
|
|
38
|
+
.x-layout--a, /* DEPRECATED */
|
|
39
|
+
%x-layout--a { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* B (one wide column & one narrow column) */
|
|
43
|
+
|
|
44
|
+
@media (--medium-and-below) {
|
|
45
|
+
.x-layout--b, /* DEPRECATED */
|
|
46
|
+
%x-layout--b { grid-template-columns: minmax(0,1fr); }
|
|
47
|
+
}
|
|
48
|
+
@media (--medium-and-above) {
|
|
49
|
+
.x-layout--b, /* DEPRECATED */
|
|
50
|
+
%x-layout--b { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* C (one narrow column & one wide column) */
|
|
54
|
+
|
|
55
|
+
@media (--medium-and-below) {
|
|
56
|
+
.x-layout--c, /* DEPRECATED */
|
|
57
|
+
%x-layout--c { grid-template-columns: minmax(0,1fr); }
|
|
58
|
+
}
|
|
59
|
+
@media (--medium-and-above) {
|
|
60
|
+
.x-layout--c, /* DEPRECATED */
|
|
61
|
+
%x-layout--c { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* D (three equal columns) */
|
|
65
|
+
|
|
66
|
+
@media (--x-narrow-and-below) {
|
|
67
|
+
.x-layout--d, /* DEPRECATED */
|
|
68
|
+
%x-layout--d { grid-template-columns: repeat(1, minmax(0, 1fr)); }
|
|
69
|
+
}
|
|
70
|
+
@media (--narrow-to-medium), (--x-narrow-to-narrow) {
|
|
71
|
+
.x-layout--d, /* DEPRECATED */
|
|
72
|
+
%x-layout--d { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
73
|
+
}
|
|
74
|
+
@media (--medium-and-above) {
|
|
75
|
+
.x-layout--d, /* DEPRECATED */
|
|
76
|
+
%x-layout--d { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
/* Row-Based */
|
|
81
|
+
|
|
82
|
+
.x-layout--e, /* DEPRECATED */
|
|
83
|
+
%x-layout--e {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Overlay
|
|
3
|
+
|
|
4
|
+
Colored boxes that appear atop a large image (like a banner).
|
|
5
|
+
|
|
6
|
+
%x-overlay--curtain - A full size transluscent curtain over the background
|
|
7
|
+
%x-overlay--callout - A transluscent box surrounding the content
|
|
8
|
+
|
|
9
|
+
Styleguide Tools.ExtendsAndMixins.Overlay
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
%x-overlay--curtain {
|
|
13
|
+
--color-text: inherit;
|
|
14
|
+
--color-bkgd-rgb: var(--global-color-primary--normal);
|
|
15
|
+
|
|
16
|
+
color: var(--color-text);
|
|
17
|
+
background-color: rgba(var(--color-bkgd-rgb), 0.65);
|
|
18
|
+
backdrop-filter: blur(6px);
|
|
19
|
+
-webkit-backdrop-filter: blur(6px);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
%x-overlay--callout {
|
|
23
|
+
--color-text: inherit;
|
|
24
|
+
--color-bkgd-rgb: var(--global-color-primary--normal);
|
|
25
|
+
|
|
26
|
+
color: var(--color-text);
|
|
27
|
+
background-color: rgba(var(--color-bkgd-rgb), 0.90);
|
|
28
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Truncate
|
|
3
|
+
|
|
4
|
+
Styles that allow truncating text.
|
|
5
|
+
|
|
6
|
+
%x-truncate--one-line - Truncated text may only be one line tall.
|
|
7
|
+
%x-untruncate--one-line - Remove one-line truncation after it's added.
|
|
8
|
+
%x-truncate--many-lines - Truncated text may be many lines tall.
|
|
9
|
+
%x-untruncate--many-lines - Remove many-lines truncation after it's added.
|
|
10
|
+
|
|
11
|
+
Styleguide Tools.ExtendsAndMixins.Truncate
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/* Many Lines */
|
|
15
|
+
/* WARNING: Relies on proprietary and undocumented rules (that work well) */
|
|
16
|
+
|
|
17
|
+
.x-truncate--many-lines, /* DEPRECATED */
|
|
18
|
+
%x-truncate--many-lines {
|
|
19
|
+
--lines: 2;
|
|
20
|
+
|
|
21
|
+
display: -webkit-box;
|
|
22
|
+
-webkit-box-orient: vertical;
|
|
23
|
+
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
-webkit-line-clamp: var(--lines);
|
|
26
|
+
}
|
|
27
|
+
.x-untruncate--many-lines, /* DEPRECATED */
|
|
28
|
+
%x-untruncate--many-lines {
|
|
29
|
+
overflow: visible;
|
|
30
|
+
-webkit-line-clamp: inherit;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* One Line */
|
|
34
|
+
|
|
35
|
+
.x-truncate--one-line, /* DEPRECATED */
|
|
36
|
+
%x-truncate--one-line {
|
|
37
|
+
text-overflow: var(--text-overflow, ellipsis);
|
|
38
|
+
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
}
|
|
42
|
+
.x-untruncate--one-line, /* DEPRECATED */
|
|
43
|
+
%x-untruncate--one-line {
|
|
44
|
+
overflow: visible;
|
|
45
|
+
white-space: normal;
|
|
46
|
+
}
|
|
47
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* DO NOT ADD STYLES HERE; ADD THEM INSIDE STYLESHEETS IN THIS DIRECTORY */
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Trumps
|
|
5
|
+
|
|
6
|
+
Trump styles exist to overwrite other styles. They are added as necessary. Examples use cases are third-party styles, styles used only by JavaScript, modules that are not meant to be extended.
|
|
7
|
+
|
|
8
|
+
Reference:
|
|
9
|
+
|
|
10
|
+
- [Creative Bloq: Manage Large CSS Projects With ITCSS](https://www.creativebloq.com/web-design/manage-large-css-projects-itcss-101517528) (find "Trumps")
|
|
11
|
+
|
|
12
|
+
Rules:
|
|
13
|
+
|
|
14
|
+
- Classes and IDs must not be styled.
|
|
15
|
+
- Opinionated high-level styles may be here.
|
|
16
|
+
- Element tags may be styled.
|
|
17
|
+
- Pseudo classes may be styled.
|
|
18
|
+
- Pseudo elements may be styled.
|
|
19
|
+
|
|
20
|
+
Weight: 7
|
|
21
|
+
|
|
22
|
+
Styleguide Trumps
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
Scopes
|
|
27
|
+
|
|
28
|
+
Scope styles are overrides and styles that are scoped to a specific area. These are meant to be used sparingly. Examples of scopes are styles for:
|
|
29
|
+
- third-party markup, e.g.:
|
|
30
|
+
- social media widget
|
|
31
|
+
- external authentication form
|
|
32
|
+
- internal Bootstrap-dependent markup
|
|
33
|
+
- enforcing internal markup (e.g. breadcrumbs, form elements, document pages)
|
|
34
|
+
- WYSIWIG editor tags (e.g. CMS WYSIWIG content entry)
|
|
35
|
+
- coupled components (i.e. components interwoven in unique situations), e.g.:
|
|
36
|
+
- Frontera homepage before all styling used plugins
|
|
37
|
+
- article previews within an article list
|
|
38
|
+
|
|
39
|
+
Reference:
|
|
40
|
+
|
|
41
|
+
- [BEM with Namespaces: Scope Namespaces](https://csswizardry.com/2015/03/more-transparent-ui-code-with-namespaces/#scope-namespaces-s-)
|
|
42
|
+
|
|
43
|
+
Guidelines:
|
|
44
|
+
|
|
45
|
+
- Scopes should be rare; evaluate before creating.
|
|
46
|
+
- A consistent way to author these in nested inside `.s-* {}`.
|
|
47
|
+
|
|
48
|
+
Rules:
|
|
49
|
+
|
|
50
|
+
- The `!important` may be used.
|
|
51
|
+
- All overrides **must** have a comment.
|
|
52
|
+
- Scope styles should have a comment.
|
|
53
|
+
|
|
54
|
+
Styleguide Trumps.Scopes
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/*
|
|
58
|
+
Utility
|
|
59
|
+
|
|
60
|
+
Utility styles exist to overwrite other styles. They are seldom modified. Example use case is one-time use on modules that are not meant to be extended to have the desired behavior.
|
|
61
|
+
|
|
62
|
+
Reference:
|
|
63
|
+
|
|
64
|
+
- [BEM with Namespaces: Utility Namespaces](https://csswizardry.com/2015/03/more-transparent-ui-code-with-namespaces/#utility-namespaces-u-)
|
|
65
|
+
|
|
66
|
+
Guidelines:
|
|
67
|
+
|
|
68
|
+
- Utilities are style heavyweights.
|
|
69
|
+
- Alert people as to their existence.
|
|
70
|
+
- Never reassign to anything that carries a leading u-.
|
|
71
|
+
|
|
72
|
+
Rules:
|
|
73
|
+
|
|
74
|
+
- All other existing styles must be considered first.
|
|
75
|
+
- All other existing stylesheets must be considered first.
|
|
76
|
+
- Prefer this to inline styles.
|
|
77
|
+
|
|
78
|
+
Styleguide Trumps.Utilities
|
|
79
|
+
*/
|