Commit Graph
16 Commits
Author SHA1 Message Date
Jack Franklin 8064d3ba7a Lint against non-theme-color variables
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>
2021-02-03 11:02:09 +00:00
Jack Franklin 0d88cbb6fd Ban named-colors in our CSS
Used
https://css-tricks.com/snippets/css/named-colors-and-hex-equivalents/ as
the reference and did a bunch of find and replaces. Should be no visible
changes; have checked by running DevTools locally and looking for
anything that looks off.

Note that system colors (e.g. HighlightText) are still permitted.

Fixed: chromium:1171775
Bug: chromium:1104187
Change-Id: I99c281886822deb5a5292ac8691a4f2f9e026428
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2656243
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2021-02-01 09:33:45 +00:00
Sigurd Schneider 2e018a8f25 Mutually link requests with their prefetch requests
Bug: chromium:1141824
Change-Id: Ic5dbb76e014d3dcb3d69e5e00de654e7dc53ec2a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2563618
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-12-08 10:48:52 +00:00
Wolfgang Beyer a4cb2885ad [DarkMode] Use color-link for links
Replace the legacy `link-color` with the new `color-link` for the color
of links. In dark mode links will now be blue instead of grey.

This change only affects links which were using `link-color` to set
their color. This includes the widely used XLink element. Notable
exceptions where the link color is not being changed are the Elements
Panel and the Console.

Bug: 1152736

Change-Id: If938f4acd59133327d5711877b17b79b2df93bd2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566803
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2020-12-02 15:57:32 +00:00
Peter Müller eb8e1e991b Increase contrast of pseudo-element syntax color
Increases color contrast of pseudo element syntax color to better spot pseudo elements in between regular DOM nodes.

Screenshot dark theme: https://i.imgur.com/qdNyejZ.png
Screenshot light theme: https://i.imgur.com/OS6lKHX.png

Fixed: chromium:1143833
Change-Id: I7ee60f3bd3df6326b681dd8c5b3eef6143cfa20e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2519705
Commit-Queue: Peter Müller <petermueller@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Adam Argyle <argyle@chromium.org>
2020-11-06 09:17:22 +00:00
Wolfgang Beyer ab366d8f97 Add css variable for link-color
This CL adds a variable for the link color in both light and dark mode.
This is in preparation for fixing the color of icons which are links in
the issues tab. But by removing the the yellowish devtools-link color
in the dark theme it already removes some inconsistencies.

before: https://i.imgur.com/ZcGhG9C.png
after: https://i.imgur.com/WxWpjYS.png

Bug: chromium:1122511

Change-Id: I17703643d8d0180f28761a6adf56f2b92ee1e4aa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2391225
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-09-22 11:29:45 +00:00
Wolfgang Beyer 101b41c4cb Turn link icon into mask
This allows changing the icon's color (for dark theme...). The icon is
currently only being used in 2 places, both have been adapted to handle
the icon as a mask.

Screenshots:
light theme: https://i.imgur.com/NSsfOL4.png
dark theme: https://i.imgur.com/qG0KxBN.png

Bug: chromium:1072335, chromium:1122511
Change-Id: I76d16b94722205e87549fa01e58a3f92a8388ff5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2391253
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Kateryna Prokopenko <kprokopenko@google.com>
2020-09-21 08:41:30 +00:00
Patrick Brosset 319303ff59 Fix unreachable nodes in Elements pane when scrolled horizontally
In this recent CL: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2366972/
I made a change so that the Elements pane would scroll horizontally when
it became too narrow to accomodate the displayed nodes (instead of
forcing them to wrap as veyr narrow columns of characters).

This is a follow-up fix to this change.
I realized that when the pane was scrolled to the right, then hovering
over nodes would not display the usual hovered background color or
highlight the corresponding node in the page.

The first part of the fix was to make sure long attributes could break
anywhere they needed. This is useful since a lot of pages have <a>
or <script> nodes that have very long url attributes.

The second part was making the nodes inline-block display so they could
naturally expand the whole width of the scrollable container instead of
being constrained to 100% (which does not covers the overflow area).

Before: https://imgur.com/O6ya2Td.gif
After: https://imgur.com/U4sWMhj.gif

Bug: 880265
Change-Id: I4a4900052e25839f015e4fee3d20be500d8a0de4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2393465
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
2020-09-14 10:19:07 +00:00
Peter Marshall 9a3d85fa0b css: Use :focus-visible instead of our custom data-keyboard-focus
https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible

:focus-visible is basically the exact same functionality as the custom
data-keyboard-focus attribute that devtools maintains. This CL converts
all of our uses of data-keyboard-focus in CSS to use :focus-visible.

This has no intended behaviour change although it's possible there are
small differences in our implementation vs. the web platform one, so
this might cause some regression with focus styles for keyboard
interaction.

I tested a few of these manually to verify they still do the same thing.

The CSS linter was unhappy about the ordering of some rules due to
specificity-ordering checks, so there is some re-ordering too.

A follow-up CL will remove our implementation of data-keyboard-focus.

Change-Id: Ifc273f7d82e16ea07e24ed2d1faa6f794a12501d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2352236
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
2020-08-24 07:58:42 +00:00
Jecelyn Yeen b3a67b5c75 Fix stylelint-config-standard issues in ui/inspectorSyntaxHighlight.css
Bug: 1083142

Change-Id: Iee4de35178e4f78cd15adaa64bc6cf6a42ee9337
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2279519
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Jecelyn Yeen‎ <jec@chromium.org>
2020-07-03 05:34:05 +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 a0f0b26dc5 High contrast fix on Console view pane
The foreground color will change to HighlightText when focused and
selected. The anchors are also visible and will change when focused.

Before: https://imgur.com/a/j8KJ5jK
After: https://imgur.com/a/6J4fplz

Bug: 1048378
Change-Id: Iebdb29d917fde274ea0876327a55815eba6ac022
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2068904
Commit-Queue: Kham Udom <khamu@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-02-25 01:16:23 +00:00
Kalon Hinds 9790091ab7 High contrast support for Application panel
This patch adds high contrast support to the application panel by
attributing the correct link text color for clickable devtool links as
well as fixing tree-outline icon behavior on hover and selection.

Before: https://i.imgur.com/2Nr9RUs.gif
After: https://i.imgur.com/o6DKpC1.gif

Bug: 1048378
Change-Id: I2f7e27134af0d6d88308722946a7aa5a3b55a676
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2044000
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Kalon Hinds <kahinds@microsoft.com>
2020-02-10 18:17:20 +00:00
Joel Einbinder e1c93d9cb6 DevTools: Remove 20kb of unused CSS
These css rules used classes that don't exist anywhere in the
javascript. A script was written to find them, but manually checking
is still needed because some scripts generate class names by
string concatenation like 'icon-' + iconType

Change-Id: I15c4f26451b9fa371b366a8977021e2af7eca449
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1618043
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#661630}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e6f259d6e2834c9b0e2cbb0fdd7c9703e1fc6968
2019-05-21 06:16:13 +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