chrome-devtools-frontend 1.0.1625079 → 1.0.1626437
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/front_end/core/common/VersionController.ts +9 -7
- package/front_end/core/common/common.ts +0 -4
- package/front_end/core/host/AidaClient.ts +1 -1
- package/front_end/core/host/AidaClientTypes.ts +2 -0
- package/front_end/core/host/AidaGcaTranslation.ts +2 -2
- package/front_end/core/host/Platform.ts +0 -9
- package/front_end/core/host/UserMetrics.ts +0 -55
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/sdk/CPUThrottlingManager.ts +1 -1
- package/front_end/core/sdk/CSSMetadata.ts +60 -63
- package/front_end/core/sdk/CSSProperty.ts +1 -5
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +11 -32
- package/front_end/{panels/application → core/sdk}/DOMStorageModel.ts +12 -10
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/main/MainImpl.ts +12 -8
- package/front_end/entrypoints/main/SimpleApp.ts +3 -4
- package/front_end/entrypoints/main/main-meta.ts +1 -1
- package/front_end/generated/InspectorBackendCommands.ts +3 -3
- package/front_end/generated/SupportedCSSProperties.js +21 -21
- package/front_end/generated/protocol.ts +4 -1
- package/front_end/models/ai_assistance/StorageItem.ts +16 -0
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +82 -0
- package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +9 -37
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +26 -3
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +10 -2
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +5 -1
- package/front_end/models/issues_manager/CookieIssue.ts +0 -4
- package/front_end/models/issues_manager/RelatedIssue.ts +0 -14
- package/front_end/models/javascript_metadata/NativeFunctions.js +0 -4
- package/front_end/models/web_mcp/WebMCPModel.ts +11 -2
- package/front_end/models/workspace/IgnoreListManager.ts +1 -1
- package/front_end/models/workspace/UISourceCode.ts +10 -5
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +6 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +26 -9
- package/front_end/panels/application/ApplicationPanelSidebar.ts +32 -42
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -2
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +2 -2
- package/front_end/panels/application/DOMStorageItemsView.ts +18 -13
- package/front_end/panels/application/InterestGroupTreeElement.ts +2 -2
- package/front_end/panels/application/ReportingApiTreeElement.ts +3 -3
- package/front_end/panels/application/ResourcesPanel.ts +1 -2
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +1 -2
- package/front_end/panels/application/StorageView.ts +1 -2
- package/front_end/panels/application/TrustTokensTreeElement.ts +2 -2
- package/front_end/panels/application/WebMCPTreeElement.ts +2 -2
- package/front_end/panels/application/WebMCPView.ts +74 -16
- package/front_end/panels/application/application.ts +0 -2
- package/front_end/panels/application/webMCPView.css +13 -2
- package/front_end/panels/console/ConsolePrompt.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +3 -4
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +0 -152
- package/front_end/panels/elements/ElementsTreeElement.ts +4 -9
- package/front_end/panels/elements/StandaloneStylesContainer.ts +3 -0
- package/front_end/panels/elements/StylePropertiesSection.ts +0 -61
- package/front_end/panels/elements/StylePropertyTreeElement.ts +36 -23
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +6 -4
- package/front_end/panels/elements/StylesContainer.ts +1 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -7
- package/front_end/panels/elements/stylesSidebarPane.css +0 -8
- package/front_end/panels/emulation/AdvancedApp.ts +3 -3
- package/front_end/panels/emulation/DeviceModeToolbar.ts +207 -377
- package/front_end/panels/emulation/emulation-meta.ts +1 -1
- package/front_end/panels/network/NetworkPanel.ts +1 -1
- package/front_end/panels/profiler/HeapProfilerPanel.ts +1 -2
- package/front_end/panels/screencast/ScreencastApp.ts +3 -3
- package/front_end/panels/screencast/screencast-meta.ts +1 -2
- package/front_end/panels/settings/SettingsScreen.ts +2 -2
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -4
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +5 -1
- package/front_end/panels/sources/SourcesNavigator.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -3
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +179 -145
- package/front_end/panels/timeline/TimelinePanel.ts +2 -2
- package/front_end/panels/timeline/timelineTreeView.css +2 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js +53 -23
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +18 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +54 -19
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js +2 -9
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +37 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +47 -65
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +143 -55
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js +53 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +18 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +54 -19
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js +2 -9
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +37 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +47 -65
- package/front_end/third_party/puppeteer/package/package.json +6 -6
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +69 -27
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +27 -8
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +4 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +60 -18
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +7 -9
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +3 -0
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +37 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +19 -14
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +8 -7
- package/front_end/ui/components/tooltips/Tooltip.ts +3 -3
- package/front_end/{core/common → ui/legacy}/AppProvider.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +4 -3
- package/front_end/ui/legacy/TabbedPane.ts +1 -1
- package/front_end/ui/legacy/UIUserMetrics.ts +70 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -8
- package/front_end/ui/legacy/components/inline_editor/inline_editor.ts +0 -6
- package/front_end/ui/legacy/legacy.ts +6 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/package.json +1 -1
- package/front_end/Images/src/custom-typography.svg +0 -3
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +0 -798
- package/front_end/ui/legacy/components/inline_editor/FontEditorUnitConverter.ts +0 -250
- package/front_end/ui/legacy/components/inline_editor/FontEditorUtils.ts +0 -204
- package/front_end/ui/legacy/components/inline_editor/fontEditor.css +0 -185
- /package/front_end/{core/common → ui/legacy}/App.ts +0 -0
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
// Copyright 2020 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
import * as SDK from '../../../../core/sdk/sdk.js';
|
|
6
|
-
import * as CssOverviewModule from '../../../../panels/css_overview/css_overview.js';
|
|
7
|
-
import * as UI from '../../legacy.js';
|
|
8
|
-
|
|
9
|
-
const computedArrayFontSizeIndex = 6;
|
|
10
|
-
|
|
11
|
-
function getPxMultiplier(): number {
|
|
12
|
-
return 1;
|
|
13
|
-
}
|
|
14
|
-
async function getEmMultiplier(isFontSizeProperty?: boolean): Promise<number> {
|
|
15
|
-
const selectedNode = UI.Context.Context.instance().flavor(SDK.DOMModel.DOMNode);
|
|
16
|
-
let currentFontSize;
|
|
17
|
-
if (selectedNode?.parentNode && selectedNode.nodeName() !== 'HTML') {
|
|
18
|
-
const [model] =
|
|
19
|
-
SDK.TargetManager.TargetManager.instance().models(CssOverviewModule.CSSOverviewModel.CSSOverviewModel);
|
|
20
|
-
const fontSizeNodeId = isFontSizeProperty ? selectedNode.parentNode.id : selectedNode.id;
|
|
21
|
-
const computedFontSize = await model.getComputedStyleForNode(fontSizeNodeId).then(findFontSizeValue);
|
|
22
|
-
const computedFontSizeValue = computedFontSize.replace(/[a-z]/g, '');
|
|
23
|
-
currentFontSize = parseFloat(computedFontSizeValue);
|
|
24
|
-
} else {
|
|
25
|
-
currentFontSize = 16;
|
|
26
|
-
}
|
|
27
|
-
return currentFontSize;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
async function getRemMultiplier(): Promise<number> {
|
|
31
|
-
const selectedNode = UI.Context.Context.instance().flavor(SDK.DOMModel.DOMNode);
|
|
32
|
-
const htmlNode = findHtmlNode(selectedNode);
|
|
33
|
-
if (!htmlNode?.id) {
|
|
34
|
-
return 16;
|
|
35
|
-
}
|
|
36
|
-
const [model] =
|
|
37
|
-
SDK.TargetManager.TargetManager.instance().models(CssOverviewModule.CSSOverviewModel.CSSOverviewModel);
|
|
38
|
-
const computedRootFontSize = await model.getComputedStyleForNode(htmlNode.id).then(findFontSizeValue);
|
|
39
|
-
const rootFontSizeValue = computedRootFontSize.replace(/[a-z]/g, '');
|
|
40
|
-
const rootFontSize = parseFloat(rootFontSizeValue);
|
|
41
|
-
return rootFontSize;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
async function getPercentMultiplier(isFontSizeProperty?: boolean): Promise<number> {
|
|
45
|
-
const emMultiplier = await getEmMultiplier(isFontSizeProperty);
|
|
46
|
-
const percMultiplier = emMultiplier / 100;
|
|
47
|
-
return percMultiplier;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async function getVhMultiplier(): Promise<number> {
|
|
51
|
-
const viewportObject = await getViewportObject();
|
|
52
|
-
if (!viewportObject) {
|
|
53
|
-
return 1;
|
|
54
|
-
}
|
|
55
|
-
const viewportHeight = viewportObject.height;
|
|
56
|
-
const vhMultiplier = viewportHeight / 100;
|
|
57
|
-
return vhMultiplier;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
async function getVwMultiplier(): Promise<number> {
|
|
61
|
-
const viewportObject = await getViewportObject();
|
|
62
|
-
if (!viewportObject) {
|
|
63
|
-
return 1;
|
|
64
|
-
}
|
|
65
|
-
const viewportWidth = viewportObject.width;
|
|
66
|
-
const vwMultiplier = viewportWidth / 100;
|
|
67
|
-
return vwMultiplier;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
async function getVminMultiplier(): Promise<number> {
|
|
71
|
-
const viewportObject = await getViewportObject();
|
|
72
|
-
if (!viewportObject) {
|
|
73
|
-
return 1;
|
|
74
|
-
}
|
|
75
|
-
const viewportWidth = viewportObject.width;
|
|
76
|
-
const viewportHeight = viewportObject.height;
|
|
77
|
-
const minViewportSize = Math.min(viewportWidth, viewportHeight);
|
|
78
|
-
const vminMultiplier = minViewportSize / 100;
|
|
79
|
-
return vminMultiplier;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
async function getVmaxMultiplier(): Promise<number> {
|
|
83
|
-
const viewportObject = await getViewportObject();
|
|
84
|
-
if (!viewportObject) {
|
|
85
|
-
return 1;
|
|
86
|
-
}
|
|
87
|
-
const viewportWidth = viewportObject.width;
|
|
88
|
-
const viewportHeight = viewportObject.height;
|
|
89
|
-
const maxViewportSize = Math.max(viewportWidth, viewportHeight);
|
|
90
|
-
const vmaxMultiplier = maxViewportSize / 100;
|
|
91
|
-
return vmaxMultiplier;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function getCmMultiplier(): number {
|
|
95
|
-
return 37.795;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function getMmMultiplier(): number {
|
|
99
|
-
return 3.7795;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function getInMultiplier(): number {
|
|
103
|
-
return 96;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function getPtMultiplier(): number {
|
|
107
|
-
return 4 / 3;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function getPcMultiplier(): number {
|
|
111
|
-
return 16;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function findFontSizeValue(computedObject: {
|
|
115
|
-
computedStyle: Array<{
|
|
116
|
-
name: string,
|
|
117
|
-
value: string,
|
|
118
|
-
}>,
|
|
119
|
-
getError: () => void,
|
|
120
|
-
}): string {
|
|
121
|
-
const computedArray: Array<{
|
|
122
|
-
name: string,
|
|
123
|
-
value: string,
|
|
124
|
-
}> = computedObject.computedStyle;
|
|
125
|
-
let index = computedArrayFontSizeIndex;
|
|
126
|
-
if (computedArray[index].name && computedArray[index].name !== 'font-size') {
|
|
127
|
-
for (let i = 0; i < computedArray.length; i++) {
|
|
128
|
-
if (computedArray[i].name === 'font-size') {
|
|
129
|
-
index = i;
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return computedArray[index].value;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function findHtmlNode(selectedNode: SDK.DOMModel.DOMNode|null): SDK.DOMModel.DOMNode|null {
|
|
138
|
-
let node: SDK.DOMModel.DOMNode|(SDK.DOMModel.DOMNode | null) = selectedNode;
|
|
139
|
-
while (node && node.nodeName() !== 'HTML') {
|
|
140
|
-
if (node.parentNode) {
|
|
141
|
-
node = node.parentNode;
|
|
142
|
-
} else {
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
return node;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
const widthEvaluateParams = {
|
|
150
|
-
expression: 'window.innerWidth',
|
|
151
|
-
includeCommandLineAPI: false,
|
|
152
|
-
silent: true,
|
|
153
|
-
returnByValue: false,
|
|
154
|
-
generatePreview: false,
|
|
155
|
-
userGesture: false,
|
|
156
|
-
awaitPromise: true,
|
|
157
|
-
throwOnSideEffect: false,
|
|
158
|
-
disableBreaks: true,
|
|
159
|
-
replMode: false,
|
|
160
|
-
allowUnsafeEvalBlockedByCSP: false,
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
const heightEvaluateParams = {
|
|
164
|
-
expression: 'window.innerHeight',
|
|
165
|
-
includeCommandLineAPI: false,
|
|
166
|
-
silent: true,
|
|
167
|
-
returnByValue: false,
|
|
168
|
-
generatePreview: false,
|
|
169
|
-
userGesture: false,
|
|
170
|
-
awaitPromise: true,
|
|
171
|
-
throwOnSideEffect: false,
|
|
172
|
-
disableBreaks: true,
|
|
173
|
-
replMode: false,
|
|
174
|
-
allowUnsafeEvalBlockedByCSP: false,
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
async function getViewportObject(): Promise<{
|
|
178
|
-
width: number,
|
|
179
|
-
height: number,
|
|
180
|
-
}|null> {
|
|
181
|
-
const currentExecutionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);
|
|
182
|
-
let width, height;
|
|
183
|
-
if (currentExecutionContext) {
|
|
184
|
-
const widthObject = await currentExecutionContext.evaluate(widthEvaluateParams, false, false);
|
|
185
|
-
const heightObject = await currentExecutionContext.evaluate(heightEvaluateParams, false, false);
|
|
186
|
-
if ('error' in widthObject || 'error' in heightObject) {
|
|
187
|
-
return null;
|
|
188
|
-
}
|
|
189
|
-
if (widthObject.object) {
|
|
190
|
-
width = widthObject.object.value;
|
|
191
|
-
}
|
|
192
|
-
if (heightObject.object) {
|
|
193
|
-
height = heightObject.object.value;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
if (width === undefined || height === undefined) {
|
|
197
|
-
const selectedNode = UI.Context.Context.instance().flavor(SDK.DOMModel.DOMNode);
|
|
198
|
-
if (!selectedNode) {
|
|
199
|
-
return null;
|
|
200
|
-
}
|
|
201
|
-
const pageLayout = await selectedNode.domModel().target().pageAgent().invoke_getLayoutMetrics();
|
|
202
|
-
const zoom = pageLayout.visualViewport.zoom ? pageLayout.visualViewport.zoom : 1;
|
|
203
|
-
height = pageLayout.visualViewport.clientHeight / zoom;
|
|
204
|
-
width = pageLayout.visualViewport.clientWidth / zoom;
|
|
205
|
-
}
|
|
206
|
-
return {width, height};
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
const unitConversionMap = new Map<string, (isFontSize?: boolean) => number | Promise<number>>();
|
|
210
|
-
unitConversionMap.set('px', getPxMultiplier);
|
|
211
|
-
unitConversionMap.set('em', getEmMultiplier);
|
|
212
|
-
unitConversionMap.set('rem', getRemMultiplier);
|
|
213
|
-
unitConversionMap.set('%', getPercentMultiplier);
|
|
214
|
-
unitConversionMap.set('vh', getVhMultiplier);
|
|
215
|
-
unitConversionMap.set('vw', getVwMultiplier);
|
|
216
|
-
unitConversionMap.set('vmin', getVminMultiplier);
|
|
217
|
-
unitConversionMap.set('vmax', getVmaxMultiplier);
|
|
218
|
-
unitConversionMap.set('cm', getCmMultiplier);
|
|
219
|
-
unitConversionMap.set('mm', getMmMultiplier);
|
|
220
|
-
unitConversionMap.set('in', getInMultiplier);
|
|
221
|
-
unitConversionMap.set('pt', getPtMultiplier);
|
|
222
|
-
unitConversionMap.set('pc', getPcMultiplier);
|
|
223
|
-
|
|
224
|
-
export async function getUnitConversionMultiplier(
|
|
225
|
-
prevUnit: string, newUnit: string, isFontSize?: boolean): Promise<number> {
|
|
226
|
-
if (prevUnit === '') {
|
|
227
|
-
prevUnit = 'em';
|
|
228
|
-
}
|
|
229
|
-
if (newUnit === '') {
|
|
230
|
-
newUnit = 'em';
|
|
231
|
-
}
|
|
232
|
-
let prevUnitMultiplier, newUnitMultiplier;
|
|
233
|
-
const prevUnitFunction = unitConversionMap.get(prevUnit);
|
|
234
|
-
const newUnitFunction = unitConversionMap.get(newUnit);
|
|
235
|
-
if (prevUnitFunction && newUnitFunction) {
|
|
236
|
-
if (prevUnit === 'em' || prevUnit === '%') {
|
|
237
|
-
prevUnitMultiplier = await prevUnitFunction(isFontSize);
|
|
238
|
-
} else {
|
|
239
|
-
prevUnitMultiplier = await prevUnitFunction();
|
|
240
|
-
}
|
|
241
|
-
if (newUnit === 'em' || newUnit === '%') {
|
|
242
|
-
newUnitMultiplier = await newUnitFunction(isFontSize);
|
|
243
|
-
} else {
|
|
244
|
-
newUnitMultiplier = await newUnitFunction();
|
|
245
|
-
}
|
|
246
|
-
} else {
|
|
247
|
-
return 1;
|
|
248
|
-
}
|
|
249
|
-
return prevUnitMultiplier / newUnitMultiplier;
|
|
250
|
-
}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
// Copyright 2020 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
import * as SDK from '../../../../core/sdk/sdk.js';
|
|
6
|
-
import * as CssOverviewModule from '../../../../panels/css_overview/css_overview.js';
|
|
7
|
-
|
|
8
|
-
// The following regexes are used within the Font Editor and will only parse valid property values.
|
|
9
|
-
// Example Input/Outputs:
|
|
10
|
-
// font-size: "20px" -> (20)(px)
|
|
11
|
-
// line-height: "0.5em" -> (0.5)(em)
|
|
12
|
-
// font-weight: "300" -> (300);
|
|
13
|
-
// letter-spacing: -.625rem -> (-.625)(rem)
|
|
14
|
-
const fontSizeRegex = /(^[\+\d\.]+)([a-zA-Z%]+)/;
|
|
15
|
-
const lineHeightRegex = /(^[\+\d\.]+)([a-zA-Z%]*)/;
|
|
16
|
-
const fontWeightRegex = /(^[\+\d\.]+)/;
|
|
17
|
-
const letterSpacingRegex = /([\+-0-9\.]+)([a-zA-Z%]+)/;
|
|
18
|
-
|
|
19
|
-
const fontSizeUnits = new Set(['px', 'em', 'rem', '%', 'vh', 'vw']);
|
|
20
|
-
const lineHeightUnits = new Set(['', 'px', 'em', '%']);
|
|
21
|
-
const letterSpacingUnits = new Set(['em', 'rem', 'px']);
|
|
22
|
-
|
|
23
|
-
const fontSizeKeyValuesArray = [
|
|
24
|
-
'',
|
|
25
|
-
'xx-small',
|
|
26
|
-
'x-small',
|
|
27
|
-
'smaller',
|
|
28
|
-
'small',
|
|
29
|
-
'medium',
|
|
30
|
-
'large',
|
|
31
|
-
'larger',
|
|
32
|
-
'x-large',
|
|
33
|
-
'xx-large',
|
|
34
|
-
];
|
|
35
|
-
const lineHeightKeyValuesArray = ['', 'normal'];
|
|
36
|
-
const fontWeightKeyValuesArray = ['', 'lighter', 'normal', 'bold', 'bolder'];
|
|
37
|
-
const letterSpacingKeyValuesArray = ['', 'normal'];
|
|
38
|
-
|
|
39
|
-
export const GlobalValues = ['inherit', 'initial', 'unset'];
|
|
40
|
-
|
|
41
|
-
fontSizeKeyValuesArray.push(...GlobalValues);
|
|
42
|
-
lineHeightKeyValuesArray.push(...GlobalValues);
|
|
43
|
-
fontWeightKeyValuesArray.push(...GlobalValues);
|
|
44
|
-
letterSpacingKeyValuesArray.push(...GlobalValues);
|
|
45
|
-
|
|
46
|
-
const fontSizeKeyValues = new Set(fontSizeKeyValuesArray);
|
|
47
|
-
const lineHeightKeyValues = new Set(lineHeightKeyValuesArray);
|
|
48
|
-
const fontWeightKeyValues = new Set(fontWeightKeyValuesArray);
|
|
49
|
-
const letterSpacingKeyValues = new Set(letterSpacingKeyValuesArray);
|
|
50
|
-
|
|
51
|
-
const fontSizeRangeMap = new Map([
|
|
52
|
-
// Common Units
|
|
53
|
-
['px', {min: 0, max: 72, step: 1}],
|
|
54
|
-
['em', {min: 0, max: 4.5, step: .1}],
|
|
55
|
-
['rem', {min: 0, max: 4.5, step: .1}],
|
|
56
|
-
['%', {min: 0, max: 450, step: 1}],
|
|
57
|
-
['vh', {min: 0, max: 10, step: .1}],
|
|
58
|
-
['vw', {min: 0, max: 10, step: .1}],
|
|
59
|
-
|
|
60
|
-
// Extra Units
|
|
61
|
-
['vmin', {min: 0, max: 10, step: .1}],
|
|
62
|
-
['vmax', {min: 0, max: 10, step: .1}],
|
|
63
|
-
['cm', {min: 0, max: 2, step: .1}],
|
|
64
|
-
['mm', {min: 0, max: 20, step: .1}],
|
|
65
|
-
['in', {min: 0, max: 1, step: .01}],
|
|
66
|
-
['pt', {min: 0, max: 54, step: 1}],
|
|
67
|
-
['pc', {min: 0, max: 4.5, step: .1}],
|
|
68
|
-
]);
|
|
69
|
-
|
|
70
|
-
const lineHeightRangeMap = new Map([
|
|
71
|
-
// Common Units
|
|
72
|
-
['', {min: 0, max: 2, step: .1}],
|
|
73
|
-
['em', {min: 0, max: 2, step: .1}],
|
|
74
|
-
['%', {min: 0, max: 200, step: 1}],
|
|
75
|
-
['px', {min: 0, max: 32, step: 1}],
|
|
76
|
-
|
|
77
|
-
// Extra Units
|
|
78
|
-
['rem', {min: 0, max: 2, step: .1}],
|
|
79
|
-
['vh', {min: 0, max: 4.5, step: .1}],
|
|
80
|
-
['vw', {min: 0, max: 4.5, step: .1}],
|
|
81
|
-
['vmin', {min: 0, max: 4.5, step: .1}],
|
|
82
|
-
['vmax', {min: 0, max: 4.5, step: .1}],
|
|
83
|
-
['cm', {min: 0, max: 1, step: .1}],
|
|
84
|
-
['mm', {min: 0, max: 8.5, step: .1}],
|
|
85
|
-
['in', {min: 0, max: .5, step: .1}],
|
|
86
|
-
['pt', {min: 0, max: 24, step: 1}],
|
|
87
|
-
['pc', {min: 0, max: 2, step: .1}],
|
|
88
|
-
]);
|
|
89
|
-
|
|
90
|
-
const fontWeightRangeMap = new Map([
|
|
91
|
-
['', {min: 100, max: 700, step: 100}],
|
|
92
|
-
]);
|
|
93
|
-
|
|
94
|
-
const letterSpacingRangeMap = new Map([
|
|
95
|
-
// Common Units
|
|
96
|
-
['px', {min: -10, max: 10, step: .01}],
|
|
97
|
-
['em', {min: -0.625, max: 0.625, step: .001}],
|
|
98
|
-
['rem', {min: -0.625, max: 0.625, step: .001}],
|
|
99
|
-
|
|
100
|
-
// Extra Units
|
|
101
|
-
['%', {min: -62.5, max: 62.5, step: .1}],
|
|
102
|
-
['vh', {min: -1.5, max: 1.5, step: .01}],
|
|
103
|
-
['vw', {min: -1.5, max: 1.5, step: .01}],
|
|
104
|
-
['vmin', {min: -1.5, max: 1.5, step: .01}],
|
|
105
|
-
['vmax', {min: -1.5, max: 1.5, step: .01}],
|
|
106
|
-
['cm', {min: -0.25, max: .025, step: .001}],
|
|
107
|
-
['mm', {min: -2.5, max: 2.5, step: .01}],
|
|
108
|
-
['in', {min: -0.1, max: 0.1, step: .001}],
|
|
109
|
-
['pt', {min: -7.5, max: 7.5, step: .01}],
|
|
110
|
-
['pc', {min: -0.625, max: 0.625, step: .001}],
|
|
111
|
-
]);
|
|
112
|
-
|
|
113
|
-
export const FontSizeStaticParams = {
|
|
114
|
-
regex: fontSizeRegex,
|
|
115
|
-
units: fontSizeUnits,
|
|
116
|
-
keyValues: fontSizeKeyValues,
|
|
117
|
-
rangeMap: fontSizeRangeMap,
|
|
118
|
-
defaultUnit: 'px',
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export const LineHeightStaticParams = {
|
|
122
|
-
regex: lineHeightRegex,
|
|
123
|
-
units: lineHeightUnits,
|
|
124
|
-
keyValues: lineHeightKeyValues,
|
|
125
|
-
rangeMap: lineHeightRangeMap,
|
|
126
|
-
defaultUnit: '',
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
export const FontWeightStaticParams = {
|
|
130
|
-
regex: fontWeightRegex,
|
|
131
|
-
units: null,
|
|
132
|
-
keyValues: fontWeightKeyValues,
|
|
133
|
-
rangeMap: fontWeightRangeMap,
|
|
134
|
-
defaultUnit: null,
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
export const LetterSpacingStaticParams = {
|
|
138
|
-
regex: letterSpacingRegex,
|
|
139
|
-
units: letterSpacingUnits,
|
|
140
|
-
keyValues: letterSpacingKeyValues,
|
|
141
|
-
rangeMap: letterSpacingRangeMap,
|
|
142
|
-
defaultUnit: 'em',
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export const SystemFonts = [
|
|
146
|
-
'Arial',
|
|
147
|
-
'Bookman',
|
|
148
|
-
'Candara',
|
|
149
|
-
'Comic Sans MS',
|
|
150
|
-
'Courier New',
|
|
151
|
-
'Garamond',
|
|
152
|
-
'Georgia',
|
|
153
|
-
'Helvetica',
|
|
154
|
-
'Impact',
|
|
155
|
-
'Palatino',
|
|
156
|
-
'Roboto',
|
|
157
|
-
'Times New Roman',
|
|
158
|
-
'Verdana',
|
|
159
|
-
];
|
|
160
|
-
|
|
161
|
-
export const GenericFonts = [
|
|
162
|
-
'serif',
|
|
163
|
-
'sans-serif',
|
|
164
|
-
'monspace',
|
|
165
|
-
'cursive',
|
|
166
|
-
'fantasy',
|
|
167
|
-
'system-ui',
|
|
168
|
-
'ui-serif',
|
|
169
|
-
'ui-sans-serif',
|
|
170
|
-
'ui-monospace',
|
|
171
|
-
'ui-rounded',
|
|
172
|
-
'emoji',
|
|
173
|
-
'math',
|
|
174
|
-
'fangsong',
|
|
175
|
-
];
|
|
176
|
-
|
|
177
|
-
export async function generateComputedFontArray(): Promise<string[]> {
|
|
178
|
-
const modelArray =
|
|
179
|
-
SDK.TargetManager.TargetManager.instance().models(CssOverviewModule.CSSOverviewModel.CSSOverviewModel);
|
|
180
|
-
if (modelArray) {
|
|
181
|
-
const cssOverviewModel = modelArray[0];
|
|
182
|
-
if (cssOverviewModel) {
|
|
183
|
-
const {fontInfo} = await cssOverviewModel.getNodeStyleStats();
|
|
184
|
-
const computedFontArray = Array.from(fontInfo.keys());
|
|
185
|
-
return computedFontArray;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
return [];
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export function getRoundingPrecision(step: number): 0|1|2|3 {
|
|
192
|
-
switch (step) {
|
|
193
|
-
case 1:
|
|
194
|
-
return 0;
|
|
195
|
-
case .1:
|
|
196
|
-
return 1;
|
|
197
|
-
case .01:
|
|
198
|
-
return 2;
|
|
199
|
-
case .001:
|
|
200
|
-
return 3;
|
|
201
|
-
default:
|
|
202
|
-
return 0;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2020 The Chromium Authors
|
|
3
|
-
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
:host {
|
|
8
|
-
user-select: none;
|
|
9
|
-
padding: 4px 12px 12px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.error-input {
|
|
13
|
-
box-shadow: 0 0 0 1px var(--sys-color-error);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.error-text {
|
|
17
|
-
color: var(--sys-color-error);
|
|
18
|
-
padding: 6px 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.warning-input {
|
|
22
|
-
--override-warning-input-color: #ffdd9e;
|
|
23
|
-
|
|
24
|
-
box-shadow: 0 0 0 1px var(--override-warning-input-color);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.theme-with-dark-background .warning-input,
|
|
28
|
-
:host-context(.theme-with-dark-background) .warning-input {
|
|
29
|
-
--override-warning-input-color: rgb(97 63 0);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.hide-warning {
|
|
33
|
-
display: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.font-section-header {
|
|
37
|
-
font-weight: normal;
|
|
38
|
-
font-size: 17px;
|
|
39
|
-
text-align: left;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.font-section-subheader {
|
|
43
|
-
font-size: 12px;
|
|
44
|
-
text-align: left;
|
|
45
|
-
font-weight: bold;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.font-selector-section {
|
|
49
|
-
overflow-y: auto;
|
|
50
|
-
padding-bottom: 10px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.font-selector-input {
|
|
54
|
-
width: 204px;
|
|
55
|
-
text-align-last: center;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.font-reset-button {
|
|
59
|
-
width: 100%;
|
|
60
|
-
margin-top: 10px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.font-section {
|
|
64
|
-
border-top: 1px solid var(--sys-color-divider);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
select.font-editor-select {
|
|
68
|
-
min-width: 50px;
|
|
69
|
-
min-height: 27px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
input::-webkit-outer-spin-button,
|
|
73
|
-
input::-webkit-inner-spin-button {
|
|
74
|
-
display: none;
|
|
75
|
-
margin: 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.preview-text {
|
|
79
|
-
max-width: 300px;
|
|
80
|
-
word-break: normal;
|
|
81
|
-
overflow-wrap: anywhere;
|
|
82
|
-
display: block;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.rendered-font-list-label {
|
|
86
|
-
font-weight: bold;
|
|
87
|
-
font-size: 12px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.rendered-font-list {
|
|
91
|
-
padding: 5px 0;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.shadow-editor-field {
|
|
95
|
-
height: 24px;
|
|
96
|
-
margin-top: 8px;
|
|
97
|
-
font-size: 12px;
|
|
98
|
-
flex-shrink: 0;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.shadow-editor-field:last-of-type {
|
|
102
|
-
margin-bottom: 8px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.shadow-editor-flex-field {
|
|
106
|
-
display: flex;
|
|
107
|
-
align-items: center;
|
|
108
|
-
flex-direction: row;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.shadow-editor-field.shadow-editor-blur-field {
|
|
112
|
-
margin-top: 40px;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.shadow-editor-2D-slider {
|
|
116
|
-
position: absolute;
|
|
117
|
-
height: 88px;
|
|
118
|
-
width: 88px;
|
|
119
|
-
border: 1px solid var(--divider-line);
|
|
120
|
-
border-radius: 2px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.shadow-editor-label {
|
|
124
|
-
display: inline-block;
|
|
125
|
-
width: 70px;
|
|
126
|
-
height: 24px;
|
|
127
|
-
line-height: 24px;
|
|
128
|
-
margin-right: 8px;
|
|
129
|
-
text-align: left;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.shadow-editor-button-left,
|
|
133
|
-
.shadow-editor-button-right {
|
|
134
|
-
width: 74px;
|
|
135
|
-
height: 24px;
|
|
136
|
-
padding: 3px 7px;
|
|
137
|
-
line-height: 16px;
|
|
138
|
-
border: 1px solid var(--divider-line);
|
|
139
|
-
color: var(--sys-color-on-surface);
|
|
140
|
-
background-color: var(--sys-color-cdt-base-container);
|
|
141
|
-
text-align: center;
|
|
142
|
-
font-weight: 500;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.shadow-editor-button-left {
|
|
146
|
-
border-radius: 2px 0 0 2px;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.shadow-editor-button-right {
|
|
150
|
-
border-radius: 0 2px 2px 0;
|
|
151
|
-
border-left-width: 0;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.shadow-editor-button-left:hover,
|
|
155
|
-
.shadow-editor-button-right:hover {
|
|
156
|
-
box-shadow: 0 1px 1px var(--divider-line);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.shadow-editor-button-left:focus,
|
|
160
|
-
.shadow-editor-button-right:focus {
|
|
161
|
-
background-color: var(--sys-color-state-focus-highlight);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.shadow-editor-text-input {
|
|
165
|
-
width: 50px;
|
|
166
|
-
margin: 8px;
|
|
167
|
-
text-align: center;
|
|
168
|
-
box-shadow: var(--legacy-focus-ring-inactive-shadow);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.spectrum-switcher {
|
|
172
|
-
border-radius: 2px;
|
|
173
|
-
height: 20px;
|
|
174
|
-
width: 20px;
|
|
175
|
-
padding: 2px;
|
|
176
|
-
margin-left: 5px;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.spectrum-switcher:hover {
|
|
180
|
-
background-color: var(--sys-color-state-hover-on-subtle);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.spectrum-switcher:focus-visible {
|
|
184
|
-
background-color: var(--sys-color-state-focus-highlight);
|
|
185
|
-
}
|
|
File without changes
|