@tacc/core-styles 0.6.0-alpha → 0.6.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -52
- package/dist/branding_logos.css +1 -1
- package/dist/components/README.css +1 -1
- package/dist/components/bootstrap.container.css +1 -1
- package/dist/components/bootstrap.figure.css +1 -1
- package/dist/components/bootstrap.form.css +2 -0
- package/dist/components/bootstrap.modal.css +2 -0
- package/dist/components/bootstrap.pagination.css +1 -1
- package/dist/components/c-button.css +2 -2
- package/dist/components/c-callout.css +1 -1
- package/dist/components/c-card.css +1 -1
- package/dist/components/c-data-list.css +1 -1
- package/dist/components/c-footer.css +1 -1
- package/dist/components/c-image-map.css +1 -1
- package/dist/components/c-image-map.skin.css +1 -1
- package/dist/components/c-image-map.structure.css +1 -1
- package/dist/components/c-nav.css +1 -1
- package/dist/components/c-page.css +1 -1
- package/dist/components/c-recognition.css +1 -1
- package/dist/components/c-see-all-link.css +1 -1
- package/dist/components/c-show-more.css +1 -1
- package/dist/components/cortal.icon.css +2 -0
- package/dist/components/cortal.icon.font.css +2 -0
- package/dist/elements/README.css +1 -1
- package/dist/elements/figure.css +1 -1
- package/dist/elements/html-elements.css +1 -1
- package/dist/elements/tacc-search-bar.css +1 -1
- package/dist/generics/README.css +1 -1
- package/dist/objects/README.css +1 -1
- package/dist/objects/o-fixed-header-table.css +2 -0
- package/dist/objects/o-flex-item-table-wrap.css +1 -1
- package/dist/objects/o-grid.css +1 -1
- package/dist/objects/o-offset-content.css +1 -1
- package/dist/objects/o-section.css +1 -1
- package/dist/objects/o-site.css +1 -1
- package/dist/settings/README.css +1 -1
- package/dist/settings/border.css +1 -1
- package/dist/settings/color.css +1 -1
- package/dist/settings/font.css +1 -1
- package/dist/settings/max-width.css +1 -1
- package/dist/settings/space.css +1 -1
- package/dist/tools/README.css +1 -1
- package/dist/tools/media-queries.css +1 -1
- package/dist/tools/x-article-link.css +1 -1
- package/dist/tools/x-center.css +1 -1
- package/dist/tools/x-fake-border.css +1 -1
- package/dist/tools/x-grid.css +1 -1
- package/dist/tools/x-layout.css +1 -1
- package/dist/tools/x-overlay.css +1 -1
- package/dist/tools/x-truncate.css +1 -1
- package/dist/trumps/README.css +1 -1
- package/dist/trumps/icon.css +1 -1
- package/dist/trumps/icon.fonts.css +1 -1
- package/dist/trumps/s-article-list.css +1 -1
- package/dist/trumps/s-article-preview.css +1 -1
- package/dist/trumps/s-blockquote.css +1 -1
- package/dist/trumps/s-breadcrumbs.css +1 -1
- package/dist/trumps/s-cms-nav.css +1 -1
- package/dist/trumps/s-document.css +1 -1
- package/dist/trumps/s-footer.css +1 -1
- package/dist/trumps/s-guide-doc.css +1 -1
- package/dist/trumps/s-header.css +1 -1
- package/dist/trumps/s-inline-dl.css +1 -1
- package/dist/trumps/s-portal-nav.css +1 -1
- package/dist/trumps/s-style-guide.css +1 -1
- package/dist/trumps/s-system-specs.css +1 -1
- package/dist/trumps/tacc-search-bar.css +1 -1
- package/dist/trumps/u-empty.css +1 -1
- package/dist/trumps/u-hide.css +1 -1
- package/dist/trumps/u-nested-text-content.css +1 -1
- package/package.json +10 -8
- package/src/.postcssrc.base.yml +38 -0
- package/src/bin/build.js +6 -8
- package/src/bin/config.js +34 -42
- package/src/bin/version.js +8 -9
- package/src/cli.js +41 -32
- package/src/lib/_imports/README.md +7 -7
- package/src/lib/_imports/components/c-button.css +81 -14
- package/src/lib/_imports/components/c-button.html +8 -4
- package/src/lib/_imports/components/c-callout.html +70 -16
- package/src/lib/_imports/components/c-card.html +31 -16
- package/src/lib/_imports/components/c-data-list.html +16 -30
- package/src/lib/_imports/components/c-image-map.html +12 -2
- package/src/lib/_imports/components/c-page.html +186 -175
- package/src/lib/_imports/elements/tacc-search-bar.md +10 -4
- package/src/lib/_imports/generics/README.md +1 -1
- package/src/lib/_imports/objects/o-grid.html +72 -22
- package/src/lib/_imports/objects/o-section.css +0 -1
- package/src/lib/_imports/objects/o-section.html +72 -11
- package/src/lib/_imports/objects/o-site.html +4 -10
- package/src/lib/_imports/trumps/s-article-list.html +2 -6
- package/src/lib/_imports/trumps/s-article-preview.html +3 -4
- package/src/lib/_imports/trumps/s-cms-nav.html +1 -1
- package/src/lib/_imports/trumps/s-footer.html +1 -3
- package/src/lib/_imports/trumps/s-header.html +2 -5
- package/src/lib/_imports/trumps/s-portal-nav.html +4 -3
- package/src/lib/_tests/README.md +8 -3
- package/src/main.js +18 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tacc/core-styles",
|
|
3
|
-
"version": "0.6.0-
|
|
3
|
+
"version": "0.6.0-beta",
|
|
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.",
|
|
@@ -8,13 +8,14 @@
|
|
|
8
8
|
"dist",
|
|
9
9
|
"src/bin",
|
|
10
10
|
"src/lib",
|
|
11
|
-
"
|
|
11
|
+
"src/.postcssrc.base.yml"
|
|
12
12
|
],
|
|
13
13
|
"main": "src/main.js",
|
|
14
14
|
"bin": "src/cli.js",
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "node src/cli.js build -i \"src/lib/_imports/**/*!(README).css\" -o \"./dist\" -m \"src/lib/_imports\"",
|
|
17
|
-
"test": "node src/cli.js build -i \"src/lib/_tests\" -o \"./dist\" -m \"src/lib\" && echo \"Test output at 'dist/_tests' (compare to test input)\""
|
|
17
|
+
"test": "node src/cli.js build -i \"src/lib/_tests\" -o \"./dist\" -m \"src/lib\" && echo \"Test output at 'dist/_tests' (compare to test input)\"",
|
|
18
|
+
"prepublishOnly": "npm run build # && npm test && npm run lint"
|
|
18
19
|
},
|
|
19
20
|
"engines": {
|
|
20
21
|
"node": ">=15.x",
|
|
@@ -37,12 +38,13 @@
|
|
|
37
38
|
"// dependencies": {
|
|
38
39
|
"commander": "To create CLI",
|
|
39
40
|
"cssnano": "To minify CSS",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"postcss-
|
|
41
|
+
"js-yaml": "To parse PostCSS configs",
|
|
42
|
+
"merge-lite": "To merge PostCSS configs",
|
|
43
|
+
"node-cmd": "To run PostCSS CLI from script",
|
|
44
|
+
"postcss-banner": "To prepend preserved comment to built stylesheets",
|
|
45
|
+
"postcss-cli": "To process CSS (the simplest and cheapest PostCSS runner)",
|
|
44
46
|
"postcss-import": "To import CSS files at build-time",
|
|
45
|
-
"postcss-extend": "To
|
|
47
|
+
"postcss-extend": "To extend CSS rule sets at build-time",
|
|
46
48
|
"postcss-preset-env": "To use future CSS features now"
|
|
47
49
|
}
|
|
48
50
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
plugins:
|
|
2
|
+
postcss-import:
|
|
3
|
+
path:
|
|
4
|
+
- 'src/lib'
|
|
5
|
+
|
|
6
|
+
postcss-extend: {}
|
|
7
|
+
|
|
8
|
+
# https://github.com/TACC/Core-CMS/blob/70a1ca3/conf/css/.postcssrc.yml#L6-L12
|
|
9
|
+
postcss-env-function:
|
|
10
|
+
importFrom:
|
|
11
|
+
- 'src/lib/_themes/default.json'
|
|
12
|
+
|
|
13
|
+
postcss-preset-env:
|
|
14
|
+
# https://github.com/csstools/postcss-preset-env#features
|
|
15
|
+
stage: false
|
|
16
|
+
|
|
17
|
+
# https://github.com/csstools/postcss-preset-env/blob/master/src/lib/plugins-by-id.js#L35
|
|
18
|
+
features:
|
|
19
|
+
custom-media-queries: true
|
|
20
|
+
media-query-ranges: true
|
|
21
|
+
# RFE: Fix bug on the Internet so we can use these reliably
|
|
22
|
+
# SEE: https://github.com/postcss/postcss-custom-selectors/issues/40
|
|
23
|
+
custom-selectors: true
|
|
24
|
+
|
|
25
|
+
cssnano:
|
|
26
|
+
preset:
|
|
27
|
+
- 'default'
|
|
28
|
+
- # Both of these are disabled to allow manual CSS build tests
|
|
29
|
+
# The `discardDuplicates` is disabled to prevent hiding duplicate CSS
|
|
30
|
+
discardDuplicates:
|
|
31
|
+
exclude: true
|
|
32
|
+
mergeRules:
|
|
33
|
+
exclude: true
|
|
34
|
+
|
|
35
|
+
postcss-banner:
|
|
36
|
+
banner: 'no build id'
|
|
37
|
+
inline: true
|
|
38
|
+
important: true
|
package/src/bin/build.js
CHANGED
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
const cmd = require('node-cmd');
|
|
6
6
|
|
|
7
7
|
// SEE: https://stackoverflow.com/a/63530170
|
|
8
|
-
process.env.FORCE_COLOR = true
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
process.env.FORCE_COLOR = true;
|
|
11
9
|
|
|
12
10
|
/**
|
|
13
11
|
* Build stylesheets from source CSS
|
|
@@ -22,8 +20,8 @@ process.env.FORCE_COLOR = true
|
|
|
22
20
|
function build(input, output, opts = {}) {
|
|
23
21
|
// Get data
|
|
24
22
|
const configDir = opts.configDir || `${__dirname}/../`;
|
|
25
|
-
const verbose =
|
|
26
|
-
const base =
|
|
23
|
+
const verbose = opts.verbose === true ? '--verbose' : '';
|
|
24
|
+
const base = opts.baseMirrorDir ? `--base "${opts.baseMirrorDir}"` : '';
|
|
27
25
|
|
|
28
26
|
// Build command
|
|
29
27
|
const command = `postcss "${input}" --dir "${output}" ${verbose} --config "${configDir}" ${base}`;
|
|
@@ -34,7 +32,7 @@ function build(input, output, opts = {}) {
|
|
|
34
32
|
cmd.runSync(command);
|
|
35
33
|
}
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
/*
|
|
36
|
+
Export
|
|
37
|
+
*/
|
|
40
38
|
module.exports = build;
|
package/src/bin/config.js
CHANGED
|
@@ -9,8 +9,6 @@ const yaml = require('js-yaml');
|
|
|
9
9
|
const BASE_CONFIG_FILE = `${__dirname}/../.postcssrc.base.yml`;
|
|
10
10
|
const NEW_CONFIG_FILE = `${__dirname}/../.postcssrc.yml`;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
12
|
/**
|
|
15
13
|
* Save base config as auto-loaded file (also can overwrite with custom values)
|
|
16
14
|
* @param {array.string} [customConfigFiles=[]] - List of YAML config file paths
|
|
@@ -20,71 +18,65 @@ const NEW_CONFIG_FILE = `${__dirname}/../.postcssrc.yml`;
|
|
|
20
18
|
* @see https://github.com/postcss/postcss-load-config#postcssrc
|
|
21
19
|
*/
|
|
22
20
|
function config(customConfigFiles = [], cssVersion) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
21
|
+
// Prepare data
|
|
22
|
+
const configFiles = [BASE_CONFIG_FILE, ...customConfigFiles];
|
|
23
|
+
const configObjects = [];
|
|
24
|
+
let newJson;
|
|
25
|
+
|
|
26
|
+
// Initialize final config file
|
|
27
|
+
emptyOrCreateFile(NEW_CONFIG_FILE);
|
|
28
|
+
|
|
29
|
+
// Merge configs in order
|
|
30
|
+
configFiles.forEach((nextFile) => {
|
|
31
|
+
newJson = getConfigObject(nextFile);
|
|
32
|
+
configObjects.push(newJson);
|
|
33
|
+
});
|
|
34
|
+
const mergedJson = merge(...configObjects);
|
|
35
|
+
|
|
36
|
+
// Update version property
|
|
37
|
+
const updatedJson = updateVersion(mergedJson, cssVersion);
|
|
38
|
+
const configYaml = yaml.dump(updatedJson);
|
|
39
|
+
|
|
40
|
+
// Write final config file
|
|
41
|
+
fs.writeFileSync(NEW_CONFIG_FILE, configYaml, 'utf8');
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
|
|
48
44
|
/**
|
|
49
45
|
* Update the value for the CSS version in given config data
|
|
50
46
|
* @param {object} config - The config data in which to update the version
|
|
51
47
|
* @param {string} version - The version identifier
|
|
52
48
|
* @return {object} - Updated config
|
|
53
49
|
*/
|
|
54
|
-
function updateVersion(
|
|
55
|
-
|
|
50
|
+
function updateVersion(config, version) {
|
|
51
|
+
console.log(`Tagging CSS version as ${version}`);
|
|
56
52
|
|
|
57
|
-
|
|
53
|
+
config['plugins']['postcss-banner']['banner'] = version;
|
|
58
54
|
|
|
59
|
-
|
|
55
|
+
return config;
|
|
60
56
|
}
|
|
61
57
|
|
|
62
|
-
|
|
63
|
-
|
|
64
58
|
/**
|
|
65
59
|
* Get JSON from YAML config file
|
|
66
60
|
* @param {string} filePath - YAML config file
|
|
67
61
|
* @return {object} - Config as JSON
|
|
68
62
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
function getConfigObject(filePath) {
|
|
64
|
+
const config = fs.readFileSync(filePath, 'utf8');
|
|
65
|
+
const json = yaml.load(config);
|
|
72
66
|
|
|
73
|
-
|
|
67
|
+
return json;
|
|
74
68
|
}
|
|
75
69
|
|
|
76
|
-
|
|
77
|
-
|
|
78
70
|
/**
|
|
79
71
|
* If file exists, empty it; otherwise, create it
|
|
80
72
|
* @param {string} [filePath] - The file to empty or create
|
|
81
73
|
* @see https://stackoverflow.com/a/29016268/11817077
|
|
82
74
|
*/
|
|
83
|
-
function emptyOrCreateFile(
|
|
84
|
-
|
|
75
|
+
function emptyOrCreateFile(filePath) {
|
|
76
|
+
fs.closeSync(fs.openSync(filePath, 'w'));
|
|
85
77
|
}
|
|
86
78
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
79
|
+
/*
|
|
80
|
+
Export
|
|
81
|
+
*/
|
|
90
82
|
module.exports = config;
|
package/src/bin/version.js
CHANGED
|
@@ -4,21 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
const package = require(process.env.npm_package_json || '../package.json');
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* Create version from app data and given data
|
|
10
9
|
* @param {string} [buildId] - Any value to identify the build
|
|
11
10
|
*/
|
|
12
11
|
function create(buildId) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const appName = package.name;
|
|
13
|
+
const appVersion = buildId || package.version + '+';
|
|
14
|
+
const appLicense = package.license;
|
|
15
|
+
const appWebsite = package.homepage.replace('https://', '');
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
return `${appName} ${appVersion} | ${appLicense} | ${appWebsite}`;
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
/*
|
|
21
|
+
Export
|
|
22
|
+
*/
|
|
24
23
|
module.exports = create;
|
package/src/cli.js
CHANGED
|
@@ -8,39 +8,46 @@ const package = require(process.env.npm_package_json || './package.json');
|
|
|
8
8
|
|
|
9
9
|
const { buildStylesheets } = require('./main.js');
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/*
|
|
12
|
+
Setup
|
|
13
|
+
*/
|
|
14
14
|
program
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
.name('core-styles')
|
|
16
|
+
.version(package.version)
|
|
17
|
+
.showHelpAfterError('(add --help for additional information)');
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
/*
|
|
20
|
+
Build Command
|
|
21
|
+
*/
|
|
22
22
|
program
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
.command('build')
|
|
24
|
+
.description(
|
|
25
|
+
`build stylesheets with TACC standard process:
|
|
25
26
|
- "post-css" plugins
|
|
26
27
|
- custom input path
|
|
27
28
|
- custom output path
|
|
28
29
|
- custom configs
|
|
29
30
|
- prepend build id
|
|
30
|
-
`
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
`
|
|
32
|
+
)
|
|
33
|
+
.requiredOption('-i, --input <path>', 'parse source at which path¹')
|
|
34
|
+
.requiredOption('-o, --output <path>', 'output CSS files to which path¹')
|
|
35
|
+
.option('-v, --verbose', 'print more info during build process')
|
|
36
|
+
.option(
|
|
37
|
+
'-c, --custom-configs <paths...>',
|
|
38
|
+
`extend base config with YAML files²³`
|
|
39
|
+
)
|
|
40
|
+
.option(
|
|
41
|
+
'-b, --build-id <identifier>',
|
|
42
|
+
'any value to identify the build (default: version of app)'
|
|
43
|
+
)
|
|
44
|
+
.option(
|
|
45
|
+
'-m, --base-mirror-dir <path>',
|
|
46
|
+
'if input folder structure is mirrored, this path is not⁴'
|
|
47
|
+
)
|
|
48
|
+
.addHelpText(
|
|
49
|
+
'after',
|
|
50
|
+
`
|
|
44
51
|
Notes:
|
|
45
52
|
¹ Folder structure of "--input-dir" mirrored in "--output-dir" i.e.
|
|
46
53
|
|
|
@@ -65,13 +72,15 @@ Notes:
|
|
|
65
72
|
⁴ Given '-i "a/b*" -o "x/" -m "a/"' output is "x/b/...".
|
|
66
73
|
Given '-i "a/b*" -o "x/" -m "a/b/"' output is "x/...".
|
|
67
74
|
Given '-i "a/b*" -o "x/" -m "not-a/"' output is "x/abs-path-to-input/...".
|
|
68
|
-
`
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
});
|
|
73
|
-
|
|
75
|
+
`
|
|
76
|
+
)
|
|
77
|
+
.action((programOpts) => {
|
|
78
|
+
const { input, output, ...opts } = programOpts;
|
|
74
79
|
|
|
80
|
+
buildStylesheets(input, output, opts);
|
|
81
|
+
});
|
|
75
82
|
|
|
76
|
-
|
|
83
|
+
/*
|
|
84
|
+
Parse
|
|
85
|
+
*/
|
|
77
86
|
program.parse(process.argv);
|
|
@@ -4,11 +4,11 @@ Styles here should be isolated UI patterns and be imported by other stylesheets.
|
|
|
4
4
|
|
|
5
5
|
## Rules
|
|
6
6
|
|
|
7
|
-
1. Files
|
|
8
|
-
1. Files
|
|
9
|
-
1. Files
|
|
7
|
+
1. Files **must** be [organized appropriately](#directory-organization).
|
|
8
|
+
1. Files **must** be [documented appropriately](#documentation-format).
|
|
9
|
+
1. Files **must** follow the [style guide][tacc-style-guide].
|
|
10
10
|
|
|
11
|
-
- Styles
|
|
11
|
+
- Styles **should** be for [structure](#structure-vs-skin) and **may** be for [skin](#structure-vs-skin).
|
|
12
12
|
|
|
13
13
|
## Directory Organization
|
|
14
14
|
|
|
@@ -40,8 +40,8 @@ See [TACC: CSS Style Guide][tacc-style-guide].
|
|
|
40
40
|
|
|
41
41
|
## Structure vs. Skin
|
|
42
42
|
|
|
43
|
-
- Most Core styles will be _only
|
|
43
|
+
- Most Core styles will be _only **or** mostly_ for [structure][tacc-oocss].
|
|
44
44
|
- Some core styles may be [skin][tacc-oocss].
|
|
45
45
|
|
|
46
|
-
[tacc-oocss]: https://confluence.tacc.utexas.edu/x/VwALBg
|
|
47
|
-
[tacc-style-guide]: https://confluence.tacc.utexas.edu/x/ZQALBg
|
|
46
|
+
[tacc-oocss]: https://confluence.tacc.utexas.edu/x/VwALBg 'TACC: Object-Oriented CSS'
|
|
47
|
+
[tacc-style-guide]: https://confluence.tacc.utexas.edu/x/ZQALBg 'TACC: CSS Style Guide'
|
|
@@ -5,7 +5,8 @@ A button that may have icon(s) before and/or after its text.
|
|
|
5
5
|
|
|
6
6
|
.c-button--primary - A primary (expected) user action
|
|
7
7
|
.c-button--secondary - For an optional user action
|
|
8
|
-
.c-button--
|
|
8
|
+
.c-button--tertiary - A button that represents inactive buttons among many
|
|
9
|
+
.c-button--is-active - A button that represents the one active button among many
|
|
9
10
|
.c-button--as-link - A button that visually resembles a link
|
|
10
11
|
.c-button--is-busy - A clicked button that started an incomplete process
|
|
11
12
|
|
|
@@ -43,14 +44,12 @@ Styleguide Components.Button
|
|
|
43
44
|
}
|
|
44
45
|
.c-button:disabled:not(.c-button--is-busy) {
|
|
45
46
|
color: var(--global-color-primary--dark);
|
|
46
|
-
background-color: var(--global-color-primary--xx-light);
|
|
47
47
|
border-color: var(--global-color-primary--dark);
|
|
48
48
|
|
|
49
49
|
pointer-events: none;
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
transform: translateY(1px);
|
|
51
|
+
.c-button:disabled:not(.c-button--is-busy, .c-button--as-link) {
|
|
52
|
+
background-color: var(--global-color-primary--xx-light);
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
|
|
@@ -59,11 +58,12 @@ Styleguide Components.Button
|
|
|
59
58
|
|
|
60
59
|
/* Modifiers */
|
|
61
60
|
|
|
62
|
-
|
|
63
61
|
/* Modifiers: Types */
|
|
64
62
|
|
|
65
63
|
.c-button--primary,
|
|
66
|
-
.c-button--secondary
|
|
64
|
+
.c-button--secondary,
|
|
65
|
+
.c-button--tertiary,
|
|
66
|
+
.c-button--is-active {
|
|
67
67
|
padding: 6px 18px;
|
|
68
68
|
min-width: var(--min-width);
|
|
69
69
|
max-width: var(--max-width);
|
|
@@ -77,7 +77,7 @@ Styleguide Components.Button
|
|
|
77
77
|
border-color: var(--global-color-accent--dark);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.c-button--primary:active {
|
|
80
|
+
.c-button--primary:active:not(.c-button--is-busy) {
|
|
81
81
|
color: var(--global-color-primary--xx-light);
|
|
82
82
|
background-color: var(--global-color-accent--x-dark);
|
|
83
83
|
border-color: var(--global-color-accent--dark);
|
|
@@ -111,12 +111,50 @@ Styleguide Components.Button
|
|
|
111
111
|
/* Modifiers: Types: Secondary */
|
|
112
112
|
|
|
113
113
|
.c-button--secondary:hover {
|
|
114
|
+
color: var(--global-color-primary--xx-dark);
|
|
115
|
+
background-color: var(--global-color-accent--weak);
|
|
116
|
+
border-color: var(--global-color-accent--normal);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.c-button--secondary:active:not(.c-button--is-busy) {
|
|
120
|
+
color: var(--global-color-primary--xx-dark);
|
|
121
|
+
background-color: var(--global-color-accent--x-light);
|
|
122
|
+
border-color: var(--global-color-accent--dark);
|
|
123
|
+
|
|
124
|
+
border-width: var(--global-border-width--normal);
|
|
125
|
+
outline: var(--global-border-width--normal) solid
|
|
126
|
+
var(--global-color-accent--dark);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.c-button--secondary:focus:not(:active) {
|
|
130
|
+
color: var(--global-color-primary--xx-dark);
|
|
131
|
+
background-color: var(--global-color-accent--weak);
|
|
132
|
+
border-color: var(--global-color-primary--xx-dark);
|
|
133
|
+
|
|
134
|
+
outline: var(--global-border-width--thick) solid
|
|
135
|
+
var(--global-color-accent--light);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.c-button--secondary.c-button--is-busy,
|
|
139
|
+
.c-button--secondary:not(.c-button:hover, .c-button:focus, .c-button:active, .c-button:disabled) {
|
|
140
|
+
color: var(--global-color-primary--xx-dark);
|
|
141
|
+
background-color: var(--global-color-primary--x-light);
|
|
142
|
+
border-color: var(--global-color-primary--xx-dark);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.c-button/* for specificity to override */.c-button--secondary:disabled {
|
|
146
|
+
background-color: var(--global-color-primary--x-light);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Modifiers: Types: Tertiary */
|
|
150
|
+
|
|
151
|
+
.c-button--tertiary:hover {
|
|
114
152
|
color: var(--global-color-primary--xx-dark);
|
|
115
153
|
background-color: var(--global-color-primary--light);
|
|
116
154
|
border-color: var(--global-color-accent--dark);
|
|
117
155
|
}
|
|
118
156
|
|
|
119
|
-
.c-button--
|
|
157
|
+
.c-button--tertiary:active:not(.c-button--is-busy) {
|
|
120
158
|
color: var(--global-color-primary--xx-dark);
|
|
121
159
|
background-color: var(--global-color-accent--x-light);
|
|
122
160
|
border-color: var(--global-color-accent--dark);
|
|
@@ -126,7 +164,7 @@ Styleguide Components.Button
|
|
|
126
164
|
var(--global-color-accent--dark);
|
|
127
165
|
}
|
|
128
166
|
|
|
129
|
-
.c-button--
|
|
167
|
+
.c-button--tertiary:focus:not(:active) {
|
|
130
168
|
color: var(--global-color-primary--xx-dark);
|
|
131
169
|
background-color: var(--global-color-primary--light);
|
|
132
170
|
border-color: var(--global-color-primary--xx-dark);
|
|
@@ -135,8 +173,8 @@ Styleguide Components.Button
|
|
|
135
173
|
var(--global-color-accent--light);
|
|
136
174
|
}
|
|
137
175
|
|
|
138
|
-
.c-button--
|
|
139
|
-
.c-button--
|
|
176
|
+
.c-button--tertiary.c-button--is-busy,
|
|
177
|
+
.c-button--tertiary:not(
|
|
140
178
|
.c-button:hover,
|
|
141
179
|
.c-button:focus,
|
|
142
180
|
.c-button:active,
|
|
@@ -149,12 +187,41 @@ Styleguide Components.Button
|
|
|
149
187
|
|
|
150
188
|
/* Modifiers: Types: Is Active */
|
|
151
189
|
|
|
190
|
+
.c-button--is-active:hover {
|
|
191
|
+
color: var(--global-color-primary--xx-dark);
|
|
192
|
+
background-color: var(--global-color-accent--alt);
|
|
193
|
+
border-color: var(--global-color-accent--dark);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.c-button--is-active:active {
|
|
197
|
+
color: var(--global-color-primary--xx-dark);
|
|
198
|
+
background-color: var(--global-color-accent--x-light);
|
|
199
|
+
border-color: var(--global-color-accent--dark);
|
|
200
|
+
|
|
201
|
+
border-width: var(--global-border-width--normal);
|
|
202
|
+
outline: var(--global-border-width--normal) solid
|
|
203
|
+
var(--global-color-accent--dark);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.c-button--is-active:focus:not(:active) {
|
|
207
|
+
color: var(--global-color-primary--xx-dark);
|
|
208
|
+
background-color: var(--global-color-accent--alt);
|
|
209
|
+
border-color: var(--global-color-primary--xx-dark);
|
|
210
|
+
|
|
211
|
+
outline: var(--global-border-width--thick) solid
|
|
212
|
+
var(--global-color-accent--light);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.c-button--is-active.c-button--is-busy,
|
|
152
216
|
.c-button--is-active:not(
|
|
153
217
|
.c-button:hover,
|
|
154
218
|
.c-button:focus,
|
|
155
|
-
.c-button:active
|
|
219
|
+
.c-button:active,
|
|
220
|
+
.c-button:disabled
|
|
156
221
|
) {
|
|
222
|
+
color: var(--global-color-primary--xx-dark);
|
|
157
223
|
background-color: var(--global-color-accent--x-light);
|
|
224
|
+
border-color: var(--global-color-primary--xx-dark);
|
|
158
225
|
}
|
|
159
226
|
|
|
160
227
|
/* Modifiers: Types: As Link */
|
|
@@ -192,7 +259,7 @@ Styleguide Components.Button
|
|
|
192
259
|
}
|
|
193
260
|
.c-button--size-small {
|
|
194
261
|
min-width: 0;
|
|
195
|
-
padding:
|
|
262
|
+
padding: 4px 9px;
|
|
196
263
|
line-height: 1;
|
|
197
264
|
}
|
|
198
265
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
</button>
|
|
5
5
|
|
|
6
6
|
<button class="c-button c-button--primary">
|
|
7
|
-
<i class="c-button__icon" data-icon="✓">(check input)</i>
|
|
7
|
+
<i class="c-button__icon--before" data-icon="✓">(check input)</i>
|
|
8
8
|
<span class="c-button__text">Confirm</span>
|
|
9
9
|
<i class="c-button__icon--after" data-icon="→">(and exit)</i>
|
|
10
10
|
</button>
|
|
@@ -14,13 +14,17 @@
|
|
|
14
14
|
<i class="c-button__icon--after" data-icon="→">(and move to next form)</i>
|
|
15
15
|
</button>
|
|
16
16
|
|
|
17
|
+
<div class="display: flex; gap: 5px">
|
|
18
|
+
<button class="c-button c-button--tertiary">1</button>
|
|
19
|
+
<button class="c-button c-button--tertiary">2</button>
|
|
20
|
+
<button class="c-button c-button--tertiary">3</button>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
17
23
|
<button class="c-button c-button--is-active">
|
|
18
24
|
<span class="c-button__text">Current Item</span>
|
|
19
25
|
</button>
|
|
20
26
|
|
|
21
|
-
<button class="c-button c-button--as-link">
|
|
22
|
-
Return to Previous Screen
|
|
23
|
-
</button>
|
|
27
|
+
<button class="c-button c-button--as-link">Return to Previous Screen</button>
|
|
24
28
|
|
|
25
29
|
<button class="c-button c-button--secondary c-button--is-busy">
|
|
26
30
|
<span class="c-button__text">Submit (Secondary)</span>
|