Skip to content

Commit 91816c4

Browse files
ktranDevtools-frontend LUCI CQ
authored andcommitted
[cleanup] Rename theme_colors.css and application_color_tokens.css
This renames these two files to better reflect the current content: theme_colors -> design_system_tokens application_color_tokens -> application_tokens Bug: 390330089 Change-Id: Iceac9fc91fb774912236715643f831caad035ed2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6205768 Reviewed-by: Benedikt Meurer <[email protected]> Commit-Queue: Kim-Anh Tran <[email protected]>
1 parent 5f4796e commit 91816c4

File tree

9 files changed

+24
-24
lines changed

9 files changed

+24
-24
lines changed

config/gni/devtools_grd_files.gni

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ grd_files_release_sources = [
291291
"front_end/Images/width.svg",
292292
"front_end/Images/zoom-in.svg",
293293
"front_end/Tests.js",
294-
"front_end/application_color_tokens.css",
294+
"front_end/application_tokens.css",
295295
"front_end/core/common/common.js",
296296
"front_end/core/dom_extension/dom_extension.js",
297297
"front_end/core/host/host.js",
@@ -303,6 +303,7 @@ grd_files_release_sources = [
303303
"front_end/core/root/root.js",
304304
"front_end/core/sdk/sdk-meta.js",
305305
"front_end/core/sdk/sdk.js",
306+
"front_end/design_system_tokens.css",
306307
"front_end/device_mode_emulation_frame.html",
307308
"front_end/devtools_app.html",
308309
"front_end/devtools_compatibility.js",
@@ -674,7 +675,6 @@ grd_files_release_sources = [
674675
"front_end/services/trace_bounds/trace_bounds.js",
675676
"front_end/services/tracing/tracing.js",
676677
"front_end/services/window_bounds/window_bounds.js",
677-
"front_end/theme_colors.css",
678678
"front_end/third_party/acorn/acorn.js",
679679
"front_end/third_party/chromium/client-variations/client-variations.js",
680680
"front_end/third_party/codemirror.next/chunk/angular.js",

docs/styleguide/ux/styles.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ We define three sets of color token types, **reference/palette tokens**,
88
**system tokens**, and **application tokens**.
99

1010
[**Reference or palette
11-
tokens**](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/theme_colors.css)
11+
tokens**](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/design_system_tokens.css)
1212
(e.g. `--ref-palette-X`) are a set of base colors that get updated on [Chrome
1313
color theme change](###) and should not be directly used.
1414

1515
[**System
16-
tokens**](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/theme_colors.css)
16+
tokens**](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/design_system_tokens.css)
1717
(e.g. `--sys-color-X`) are a set of semantic tokens (use is often clear from
1818
name e.g. `--sys-color-error-container`). They reference palette tokens and
1919
incorporate light / dark mode switches and should be used in the code directly.
2020
You can view all system tokens in their light and dark variant when running the
2121
component server with `npm run components-server` under *Theme Colors*.
2222

2323
[**Application
24-
tokens**](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/application_color_tokens.css)
24+
tokens**](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/application_tokens.css)
2525
(e.g. `--app-color-X`) reference palette tokens, and add more semantic meaning
2626
and handle exception cases, where system tokens are not enough. Should be
2727
defined for both light and dark modes. An example CL that adds application
@@ -51,7 +51,7 @@ Chrome's theming differentiates between two *default* color schemes (a blue
5151
**default** and a **grey default**), and a number of **accent** color schemes
5252
(blue, purple, yellow, and so on). In DevTools, the default schemes are defined
5353
as `baseline-grayscale` and `baseline-default` css classes in
54-
[themeColors.css](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/theme_colors.css).
54+
[themeColors.css](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/design_system_tokens.css).
5555
The accent color schemes don't require extra color definitions and will adapt
5656
with the reference colors.
5757

@@ -317,18 +317,18 @@ example CL that adds application tokens can be found
317317
### Resources
318318

319319
* [Reference color
320-
tokens](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/theme_colors.css)
320+
tokens](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/design_system_tokens.css)
321321
* [System color
322-
tokens](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/theme_colors.css)
322+
tokens](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/design_system_tokens.css)
323323
* [Application color
324-
tokens](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/application_color_tokens_.css)
324+
tokens](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/application_tokens_.css)
325325
* [Color definitions in the CDT
326326
Figma](https://www.figma.com/design/A5iQBBNAe5zPFpJvUzUgW8/CDT-design-kit?node-id=337-5217&m=dev)
327327

328328
## Sizes
329329

330330
[**System
331-
tokens**](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/theme_colors.css)
331+
tokens**](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/design_system_tokens.css)
332332
include a set of tokens to be used for sizes, ranging from `--sys-size-1` (which
333333
corresponds to a single pixel) to `--sys-size-41` (which corresponds to the HD
334334
resolution width).

front_end/BUILD.gn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ group("front_end") {
3535

3636
copy_to_gen("integration_test_runner-gen") {
3737
sources = [
38-
"application_color_tokens.css",
38+
"application_tokens.css",
39+
"design_system_tokens.css",
3940
"integration_test_runner.html",
40-
"theme_colors.css",
4141
]
4242
}
4343

front_end/entrypoint_template.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
<meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' https://chrome-devtools-frontend.appspot.com">
1818
<meta name="referrer" content="no-referrer">
1919
<script type="module" src="./entrypoints/%ENTRYPOINT_NAME%/%ENTRYPOINT_NAME%.js"></script>
20-
<link href="./application_color_tokens.css" rel="stylesheet">
21-
<link href="./theme_colors.css" rel="stylesheet">
20+
<link href="./application_tokens.css" rel="stylesheet">
21+
<link href="./design_system_tokens.css" rel="stylesheet">
2222
<body class="undocked" id="-blink-dev-tools">

scripts/component_server/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ server.once('error', error => {
143143
// All paths that are injected globally into real DevTools, so we do the same
144144
// to avoid styles being broken in the component server.
145145
const styleSheetPaths = [
146-
'front_end/theme_colors.css',
147-
'front_end/application_color_tokens.css',
146+
'front_end/design_system_tokens.css',
147+
'front_end/application_tokens.css',
148148
'front_end/ui/components/buttons/textButton.css',
149149
'front_end/ui/legacy/inspectorCommon.css',
150150
'front_end/ui/components/docs/component_docs_styles.css',

scripts/stylelint_rules/lib/use_theme_colors.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,21 @@ const COLOR_INDICATOR_REGEXES = new Set([
5555

5656
const CUSTOM_VARIABLE_OVERRIDE_PREFIX = '--override-';
5757

58-
const applicationColorsPath = join(
58+
const applicationTokensPath = join(
5959
import.meta.dirname,
6060
'..',
6161
'..',
6262
'..',
6363
'front_end',
64-
'application_color_tokens.css',
64+
'application_tokens.css',
6565
);
66-
const themeColorsPath = join(
66+
const designSystemTokensPath = join(
6767
import.meta.dirname,
6868
'..',
6969
'..',
7070
'..',
7171
'front_end',
72-
'theme_colors.css',
72+
'design_system_tokens.css',
7373
);
7474
const inspectorCommonPath = join(
7575
import.meta.dirname,
@@ -98,9 +98,9 @@ function getRootVariableDeclarationsFromCSSFile(filePath) {
9898
}
9999

100100
const DEFINED_APPLICATION_COLOR_VARIABLES =
101-
getRootVariableDeclarationsFromCSSFile(applicationColorsPath);
101+
getRootVariableDeclarationsFromCSSFile(applicationTokensPath);
102102
const DEFINED_THEME_COLOR_VARIABLES =
103-
getRootVariableDeclarationsFromCSSFile(themeColorsPath);
103+
getRootVariableDeclarationsFromCSSFile(designSystemTokensPath);
104104
const DEFINED_INSPECTOR_STYLE_VARIABLES =
105105
getRootVariableDeclarationsFromCSSFile(inspectorCommonPath);
106106
const ALL_DEFINED_VARIABLES = new Set([

test/unit/karma.conf.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ module.exports = function(config: any) {
8484
...tests.map(pattern => ({pattern: `${pattern}.map`, served: true, included: false, watched: true})),
8585
{pattern: path.join(GEN_DIR, 'front_end/Images/*.{svg,png}'), served: true, included: false},
8686
{pattern: path.join(GEN_DIR, 'front_end/core/i18n/locales/*.json'), served: true, included: false},
87-
{pattern: path.join(GEN_DIR, 'front_end/theme_colors.css'), served: true, included: true},
88-
{pattern: path.join(GEN_DIR, 'front_end/application_color_tokens.css'), served: true, included: true},
87+
{pattern: path.join(GEN_DIR, 'front_end/design_system_tokens.css'), served: true, included: true},
88+
{pattern: path.join(GEN_DIR, 'front_end/application_tokens.css'), served: true, included: true},
8989
{pattern: path.join(GEN_DIR, 'front_end/**/*.css'), served: true, included: false},
9090
{pattern: path.join(GEN_DIR, 'front_end/**/*.js'), served: true, included: false},
9191
{pattern: path.join(GEN_DIR, 'front_end/**/*.js.map'), served: true, included: false, watched: true},

0 commit comments

Comments
 (0)