Overview
-
What problem is DevTools solving?
- It's tedious to edit CSS, reload page, check the new CSS, re-edit, and so on
Prototyping basics
- Select element in DOM Tree
- Add declarations to element in Styles pane
Make Me Italic!
Autocomplete by value
- Typing
italic
autocompletes tofont-style: italic
- Typing
bold
autocompletes tofont-weight: bold
Can't remember a property name? Try typing the value. Introduced in May 2019 (Chrome 76).
Make Me Bold & Italic!
Highlight all elements
- Hover over a declaration to see other elements affected
Hovering over box model properties like margin
and padding
highlights all elements affected by the declaration. Introduced in March 2019 (Chrome 74).
P.S. Up to increment by 1, Shift+Up ... 10, Control+Up or Command+Up ... 100.
- Don't change my margin-left!
- Change my margin-left!
- Don't change my margin-left!
Pseudo-classes
- Go to Styles pane
- Click :hov button
Force a special state, like hover
, focus
, or visited
.
And inspect the CSS for those special states in the Styles pane.
Classes
- Go to Styles pane
- Click .cls button
Quickly add and remove classes.
Detour: Dark Theme
- Command Menu >
Switch To Dark Theme
- Automatic syncing with OS theme
Automatic syncing introduced in July 2019 (Chrome 77).
Contrast Ratio
-
Inspect an element
- Inspect Mode's Tooltip can also help
- Find the element's
color
declaration - Click the small box next to
color
value - Expand the Contrast Ratio section
Copy Element Styles
- Right-click > Copy > Copy Styles
Copy a DOM element's styles to your clipboard. Introduced in July 2019 (Chrome 77).
Screenshots
- Command Menu >
Capture Screenshot
- Command Menu >
Capture Full Size Screenshot
- Command Menu >
Capture Area Screenshot
- Command Menu >
Capture Node Screenshot