Commit Graph
10 Commits
Author SHA1 Message Date
Tim van der Lippe 5f88457735 Fix stylelint reports in inline_editor/cssShadowEditor.css
R=mathias@chromium.org

Bug: chromium:1083142
Change-Id: Ib159d195afe88f8c61d2da20e26a12e56cefeb22
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2282819
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-07-07 12:15:42 +00:00
Mathias Bynens 42f585a5ad Fix -theme-preserve styles
Previously, many CSS rules were written as:

    -theme-preserve {
      foo: bar;
    }

Note that the selector is `-theme-preserve`, which in theory matches
any <-theme-preserve> elements — but we don’t use any such elements,
and it’s an invalid custom element name [1] anyway.

The only reason these selectors are used is to mark a CSS rule as
unaffected by DevTools theming; `_patchProperty` in `UIUtils.js` checks
if the selector contains `'-theme-'`.

stylelint-config-standard complains about this selector for good
reason, so we should use something else. A simple fix is to use a class
selector instead:

    .-theme-preserve {
      foo: bar;
    }

There is one gotcha: `-theme-preserve` gets applied as an actual class
name to some <input> elements in the memory timeline under the
Performance panel. To prevent those elements from getting all the
`-theme-preserve` styles, this patch changes the class name for that
specific case to `-theme-preserve-input`.

This works great: stylelint is now happy, and `_patchProperty` in
`UIUtils.js` still works correctly, since it only checks if the
selector contains `-theme-` anywhere.

[1]: https://mothereff.in/custom-element-name#-theme-preserve

Bug: chromium:1083142
Change-Id: I923f12de6d581e9fef71a9a58bda184e40dee796
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2252017
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-06-19 13:07:31 +00:00
Mathias Bynens ca9fa2d73f Consistently format CSS color and opacity values
- Prefer the modern comma-free CSS color function syntax over the
  legacy syntax. [1]
- Explicitly use the `deg` suffix for angle values in colors, to
  clarify the range.
- Explicitly use the `%` suffix for percentages instead of formatting
  the value as a number, again to clarify the range.

[1]: https://twitter.com/mathias/status/1253242715304857601
[2]: https://goo.gle/devtools-css-color

Bug: chromium:1083142
Fixed: chromium:1073885
Change-Id: I8e1582a2dee3553a61df88564051ea84c2011d76
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2209091
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
2020-05-19 16:50:26 +00:00
Mathias Bynens b0c1f4bce2 Fix stylelint-config-standard violations
Bug: chromium:1083142
Change-Id: I5ea4cc5d0f83e52856383ba37a47472e33eb19a2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2204113
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2020-05-15 17:05:27 +00:00
Kham Udom 82fae3cc60 High contrast color fixed to toggle buttons, inputs and opacity
The patch fixes the toggle buttons for animation speed and the box
shadow type, inside the shadow editor.
Set opacity on disabled color. They are dimmed in places like the
text prompt in the Coverage panel and inputs and button in the
Sensors panel.
Fixed the hover state in the Request blocking panel. Where the
hover gradient is removed and background is set to Highlight.

Before: https://imgur.com/a/JHAzhS5
After: https://imgur.com/a/RTbiYad

Bug: 1048378
Change-Id: I5996548ee43dd8e866e466860dcf601d232f9e5c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2070664
Commit-Queue: Kham Udom <khamu@microsoft.com>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
2020-02-25 20:17:19 +00:00
Kham Udom 047cb6914a Fixed high contrast in Elements panels.
Update the DOM tree panel by fixing missing expanded glyph, removed the
borders, set by the system. The borders should only be visible,
when elements are hovered or selected.

Made sure all the panels, Style, Computed, Event Listeners,
DOM Breakpoints, Properties, and Accessibility, have a hover state,
if there is one, in Default mode. Otherwise, all panels
should be navigable, with keyboard.

Before: https://imgur.com/a/XaXWvFW
After: https://imgur.com/a/1lBV1Br

Update:1
Addressed comments to move styles to a central location,
removed unnecessary use of forced-colors and !important
and unused rule sets.

Update:2
Address change to use border color, more refactoring work
to remove unnecessary !important, more work on centralizing
styles

Bug: 1048378

Change-Id: I6942eb46d6c741fdea3f062ac61ead7c6e9d1bbc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2007930
Commit-Queue: Kham Udom <khamu@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-02-04 18:57:20 +00:00
Brian Cui 0c787d3ac9 Fix dark theme box-shadow tooltip button text contrast
This tiny PR fixes an issue with the box-shadow tooltip on the dark
theme where the unselected button has dark text against a dark
background. The light theme does not have this issue.

The change is pure CSS and targets the dark theme text color only.

Before: https://i.imgur.com/d5lNLH4.png

After: https://i.imgur.com/rxTVddG.png

Bug: 1019456
Change-Id: Iba82b6cf31b7b2e38cb7b6a67ff62a985e0526e2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1891007
Commit-Queue: Brian Cui <brcui@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
2019-12-12 22:04:46 +00:00
Mathias Bynens 9680e2e8b0 Drop -webkit-user-select in favor of user-select
Bug: chromium:1031475
Change-Id: Ibbf222135c97e79ae3be816216fec9675d643952
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1953613
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2019-12-06 10:31:53 +00:00
Pavel Feldman b5faf24bfd DevTools: Text-boxes border are not seen properly on ‘Add box-shadow' dialog.
Bug: 831087
Change-Id: Ife9e0fde092818be3c08c4e7fde2cd55bcfd4cef
TBR: dgozman
Reviewed-on: https://chromium-review.googlesource.com/1005360
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#550322}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 571d8ab23a5edd3a1e833b0f057c3e65e524e6b6
2018-04-12 19:56:36 +00:00
Blink Reformat 4c46d0969f The Great Blink mv for source files, part 2.
Move and rename files.

NOAUTOREVERT=true
NOPRESUBMIT=true
NOTREECHECKS=true
Bug: 768828
TBR=darin@chromium.org
NOTRY=true

Change-Id: I66d3b155808bc5bdbf237b80208e1e552bcf7f28
Reviewed-on: https://chromium-review.googlesource.com/1001153
Reviewed-by: Blink Reformat <blink-reformat@chromium.org>
Commit-Queue: Blink Reformat <blink-reformat@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#549061}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0aee4434a4dba42a42abaea9bfbc0cd196a63bc1
2018-04-07 15:32:37 +00:00