Skip to content

Commit b218462

Browse files
committed
[unified-css] Only generate "legacy CSS" files.
This is the first step in the CSS unification, which adjusts the build system to only spit out "legacy CSS" files, which we still turn into constructed style sheets in various places, and which will be migrated in a follow-up step. In a follow up step, the `.css.legacy.js` files will also be renamed to just `.css.js`, but for this change, it was easier to stick to this naming scheme. Bug: 391381439 Change-Id: I11e99c9dfcfd6adfca95242cbe152fed5ac3c107 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6219314 Reviewed-by: Alex Rudenko <[email protected]> Commit-Queue: Nikolay Vitkov <[email protected]> Auto-Submit: Benedikt Meurer <[email protected]> Commit-Queue: Benedikt Meurer <[email protected]>
1 parent 2bf7c69 commit b218462

File tree

310 files changed

+2081
-768
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+2081
-768
lines changed

config/gni/devtools_grd_files.gni

Lines changed: 310 additions & 312 deletions
Large diffs are not rendered by default.

front_end/entrypoints/inspector_main/InspectorMain.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ import * as MobileThrottling from '../../panels/mobile_throttling/mobile_throttl
1212
import * as Components from '../../ui/legacy/components/utils/utils.js';
1313
import * as UI from '../../ui/legacy/legacy.js';
1414

15-
import nodeIconStyles from './nodeIcon.css.js';
15+
import nodeIconStylesRaw from './nodeIcon.css.legacy.js';
16+
17+
// TODO(crbug.com/391381439): Fully migrate off of constructed style sheets.
18+
const nodeIconStyles = new CSSStyleSheet();
19+
nodeIconStyles.replaceSync(nodeIconStylesRaw.cssContent);
1620

1721
const UIStrings = {
1822
/**

front_end/entrypoints/inspector_main/OutermostTargetSelector.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ import type * as Protocol from '../../generated/protocol.js';
1010
import * as Bindings from '../../models/bindings/bindings.js';
1111
import * as UI from '../../ui/legacy/legacy.js';
1212

13-
import outermostTargetSelectorStyles from './outermostTargetSelector.css.js';
13+
import outermostTargetSelectorStylesRaw from './outermostTargetSelector.css.legacy.js';
14+
15+
// TODO(crbug.com/391381439): Fully migrate off of constructed style sheets.
16+
const outermostTargetSelectorStyles = new CSSStyleSheet();
17+
outermostTargetSelectorStyles.replaceSync(outermostTargetSelectorStylesRaw.cssContent);
1418

1519
const UIStrings = {
1620
/**

front_end/entrypoints/inspector_main/RenderingOptions.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ import * as i18n from '../../core/i18n/i18n.js';
3434
import * as UI from '../../ui/legacy/legacy.js';
3535
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
3636

37-
import renderingOptionsStyles from './renderingOptions.css.js';
37+
import renderingOptionsStylesRaw from './renderingOptions.css.legacy.js';
38+
39+
// TODO(crbug.com/391381439): Fully migrate off of constructed style sheets.
40+
const renderingOptionsStyles = new CSSStyleSheet();
41+
renderingOptionsStyles.replaceSync(renderingOptionsStylesRaw.cssContent);
3842

3943
const UIStrings = {
4044
/**

front_end/entrypoints/node_app/NodeConnectionsPanel.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ import * as i18n from '../../core/i18n/i18n.js';
88
import * as Buttons from '../../ui/components/buttons/buttons.js';
99
import * as UI from '../../ui/legacy/legacy.js';
1010

11-
import nodeConnectionsPanelStyles from './nodeConnectionsPanel.css.js';
11+
import nodeConnectionsPanelStylesRaw from './nodeConnectionsPanel.css.legacy.js';
12+
13+
// TODO(crbug.com/391381439): Fully migrate off of constructed style sheets.
14+
const nodeConnectionsPanelStyles = new CSSStyleSheet();
15+
nodeConnectionsPanelStyles.replaceSync(nodeConnectionsPanelStylesRaw.cssContent);
1216

1317
const UIStrings = {
1418
/**

front_end/global_typings/global_defs.d.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
declare module '*.css.js' {
6-
const styles: CSSStyleSheet;
7-
export default styles;
8-
}
9-
105
declare module '*.css.legacy.js' {
116
const styles: {cssContent: string};
127
export default styles;

front_end/models/persistence/EditFileSystemView.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@ import * as i18n from '../../core/i18n/i18n.js';
3333
import type * as Platform from '../../core/platform/platform.js';
3434
import * as UI from '../../ui/legacy/legacy.js';
3535

36-
import editFileSystemViewStyles from './editFileSystemView.css.js';
36+
import editFileSystemViewStylesRaw from './editFileSystemView.css.legacy.js';
3737
import {Events, IsolatedFileSystemManager} from './IsolatedFileSystemManager.js';
3838
import type {PlatformFileSystem} from './PlatformFileSystem.js';
3939

40+
// TODO(crbug.com/391381439): Fully migrate off of constructed style sheets.
41+
const editFileSystemViewStyles = new CSSStyleSheet();
42+
editFileSystemViewStyles.replaceSync(editFileSystemViewStylesRaw.cssContent);
43+
4044
const UIStrings = {
4145
/**
4246
*@description Text in Edit File System View of the Workspace settings in Settings to indicate that the following string is a folder URL

front_end/models/persistence/WorkspaceSettingsTab.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import {IsolatedFileSystem} from './IsolatedFileSystem.js';
1414
import {Events, IsolatedFileSystemManager} from './IsolatedFileSystemManager.js';
1515
import {NetworkPersistenceManager} from './NetworkPersistenceManager.js';
1616
import type {PlatformFileSystem} from './PlatformFileSystem.js';
17-
import workspaceSettingsTabStyles from './workspaceSettingsTab.css.js';
17+
import workspaceSettingsTabStylesRaw from './workspaceSettingsTab.css.legacy.js';
18+
19+
// TODO(crbug.com/391381439): Fully migrate off of constructed style sheets.
20+
const workspaceSettingsTabStyles = new CSSStyleSheet();
21+
workspaceSettingsTabStyles.replaceSync(workspaceSettingsTabStylesRaw.cssContent);
1822

1923
const UIStrings = {
2024
/**

front_end/panels/accessibility/AXBreadcrumbsPane.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
1414

1515
import type {AccessibilitySidebarView} from './AccessibilitySidebarView.js';
1616
import {AccessibilitySubPane} from './AccessibilitySubPane.js';
17-
import axBreadcrumbsStyles from './axBreadcrumbs.css.js';
17+
import axBreadcrumbsStylesRaw from './axBreadcrumbs.css.legacy.js';
18+
19+
// TODO(crbug.com/391381439): Fully migrate off of constructed style sheets.
20+
const axBreadcrumbsStyles = new CSSStyleSheet();
21+
axBreadcrumbsStyles.replaceSync(axBreadcrumbsStylesRaw.cssContent);
1822

1923
const UIStrings = {
2024
/**

front_end/panels/accessibility/AccessibilityNodeView.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ import * as Protocol from '../../generated/protocol.js';
99
import * as UI from '../../ui/legacy/legacy.js';
1010
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
1111

12-
import accessibilityNodeStyles from './accessibilityNode.css.js';
12+
import accessibilityNodeStylesRaw from './accessibilityNode.css.legacy.js';
1313
import {AXAttributes, AXNativeSourceTypes, AXSourceTypes} from './AccessibilityStrings.js';
1414
import {AccessibilitySubPane} from './AccessibilitySubPane.js';
1515

16+
// TODO(crbug.com/391381439): Fully migrate off of constructed style sheets.
17+
const accessibilityNodeStyles = new CSSStyleSheet();
18+
accessibilityNodeStyles.replaceSync(accessibilityNodeStylesRaw.cssContent);
19+
1620
const UIStrings = {
1721
/**
1822
*@description Text in Accessibility Node View of the Accessibility panel

0 commit comments

Comments
 (0)