mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-09 13:18:29 +08:00
This CL turns on the use_theme_colors stylelint rule which enforces that any colors use variables defined in our codebase. There are many, many violations, unsurprisingly (about 1500), so for now I have disabled every single violation. The goal of the dark mode migration will be in part to remove all violations of this rule. Additionally, new code going forwards should adhere to the rule and not add the comment to disable the warning. Bug: 1152736 Change-Id: I51372724ea51485daef3d4f75b7d3f60a7c8016f No-Presubmit: true Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2671323 Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
126 lines
3.9 KiB
CSS
126 lines
3.9 KiB
CSS
/* Copyright (c) 2015 The Chromium Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
.lock-icon,
|
|
.security-property {
|
|
height: 16px;
|
|
width: 16px;
|
|
-webkit-mask-image: url(Images/securityIcons.svg);
|
|
-webkit-mask-size: 80px 32px;
|
|
background-color: #888; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
.lock-icon-secure {
|
|
-webkit-mask-position: 0 0;
|
|
background-color: #0b8043; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
.lock-icon-unknown,
|
|
.lock-icon-neutral {
|
|
-webkit-mask-position: -16px 0;
|
|
background-color: #000; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */ /* Black for clarity on lower DPI screens */
|
|
}
|
|
|
|
@media (-webkit-min-device-pixel-ratio: 1.1) {
|
|
.lock-icon-unknown,
|
|
.lock-icon-neutral {
|
|
background-color: #5a5a5a; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */ /* Gray for hiDPI screens */
|
|
}
|
|
}
|
|
|
|
.lock-icon-insecure {
|
|
-webkit-mask-position: -32px 0;
|
|
background-color: #5a5a5a; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
.lock-icon-insecure-broken {
|
|
-webkit-mask-position: -32px 0;
|
|
background-color: #c63626; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
.security-property-secure {
|
|
-webkit-mask-position: 0 -16px;
|
|
background-color: #0b8043; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
.security-property-neutral {
|
|
-webkit-mask-position: -16px -16px;
|
|
background-color: #c63626; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
.security-property-insecure {
|
|
-webkit-mask-position: -32px -16px;
|
|
background-color: #c63626; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
.security-property-insecure-broken {
|
|
-webkit-mask-position: -32px -16px;
|
|
background-color: #c63626; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
.security-property-info {
|
|
-webkit-mask-position: -48px -16px;
|
|
background-color: rgb(0 0 0 / 50%); /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
.security-property-unknown {
|
|
-webkit-mask-position: -64px -16px;
|
|
background-color: rgb(0 0 0 / 50%); /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
.url-scheme-secure {
|
|
color: #0b8043; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
.url-scheme-neutral,
|
|
.url-scheme-insecure,
|
|
.url-scheme-insecure-broken {
|
|
color: #cb3626; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
.url-scheme-separator {
|
|
color: #8a8a8a; /* stylelint-disable-line plugin/use_theme_colors */
|
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
}
|
|
|
|
@media (forced-colors: active) {
|
|
.lock-icon,
|
|
.security-property,
|
|
.url-scheme-neutral,
|
|
.url-scheme-insecure,
|
|
.url-scheme-insecure-broken {
|
|
forced-color-adjust: none;
|
|
}
|
|
|
|
.lock-icon-unknown,
|
|
.lock-icon-neutral {
|
|
background-color: Highlight;
|
|
}
|
|
|
|
.security-property-info,
|
|
.security-property-unknown {
|
|
background-color: canvastext;
|
|
}
|
|
|
|
.tree-outline:not(.hide-selection-when-blurred) li.selected .security-property-info,
|
|
.tree-outline:not(.hide-selection-when-blurred) li.selected .security-property-unknown {
|
|
background-color: HighlightText;
|
|
}
|
|
}
|