Although it’s not a core task of my role as Chrome DevRel, I took the time to build something that I needed into DevTools: debugging support for CSS `@starting-style` rules.
The feature is ready for testing in Chrome Canary.
Although it’s not a core task of my role as Chrome DevRel, I took the time to build something that I needed into DevTools: debugging support for CSS `@starting-style` rules.
The feature is ready for testing in Chrome Canary.
The design I went for is detailed in https://goo.gle/devtools-starting-style-debugging-design and differs a bit from how other browsers approach this problem.
(See next messages)
@starting-style debugging Attention: Externally visible, non-confidentialAuthor: Status: Short Link: go/chrome-devtools:starting-style-debugging-design or https://bit.ly/devtools-starting-style-debugging-designCreated: / Last Updated: One-page overview Summary Give authors control o...
1. I expect **correctness** from DevTools, and have it show only what you are actively seeing on the screen.
When inspecting a square in https://codepen.io/bramus/pen/MWPLgjy , we don’t show the `@starting-style { background-color: yellow }` rule by default because that doesn't match the state on the page.
2. To easily **discover** elements that are affected by a `@starting-style` rule, a new pill is shown next in the elements tree.
We chose using this adorner over tucking it away in the `:hov` panel, because that one is collapsed by default.
3. To allow you to **inspect and edit** these `@starting-style`s, you can click the pill to force the element into its `@starting-style`-state.
The element will be painted with its `@starting-style` rules applied, and DevTools will therefore also shows those style rules.
UPDATE: I flipped the flag on this one today and it’s now enabled by default. Expect it in tomorrow’s Chrome Canary build.
(If you can’t wait to try it out, you can manually flip the flag in today’s Canary/Beta/Dev builds. Go to chrome://flags and look for starting-style)