10 Things you can do in Chrome Developer Tools
Tags: css, webdev, html, programming
Published: 2021-07-24 21:17:14


Here are 10 things you can do, if you want to edit CSS directly on the styles panel of the chrome dev tools while debugging.


### 1) Edit the Box Model directly
 When you inspect an element, if you look into the computed section of the styles tab you will see the box model representation of the element.
Did you know that you can edit the values in the box model directly?. 

![box-model.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yd1hwtrjvllupuntmt1y.gif)

### 2) Color Palette & Contrast Ratio 

When you see styles with color, you can click on the swatch which will open the color palette for you.  Open the contrast ratio , green ticks means the color is in the acceptable contrast ratio, red means it does not meet the standard. The colors within the curved white spectrum are the ones which have a better color contrast ratio, if you choose colors outside of it you will notice that the contrast ratio check mark turns to red. Try adjusting the colors accordingly using the color picker to see what works best. 
![color-contrast.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xj4809d8flx4xqwpe9l0.gif)

### 3) Changing color value syntax between hex, rgb and hsa
By default the color value seen in the styles tab is the one written in the css file, but this can be changed to show either hex or RGBA or HSA on the fly. This can be done by pressing Shift + clicking on the color value , it will change the values like seen in the below screen capture.
![toggle-color-value.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l5kev7l8ouuq76g30n31.gif)

### 4) CSS shadows 
Most times we use text shadows or box shadows during development. When in doubt or still trying to figure out the best values to use, you can use the developer tools to test out what works for you best.
![shadow-effect.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zlt8xb0k5w8qax4w9vw8.gif)

### 5) Angle Clock
You would have used transform : rotate degree in css, by clicking on the icon next to the degree you can rotate the degree and see what works best for you.
![rotate.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/js6n4ynxowx85h97cuos.gif)

### 6) Grid & Flex Layout 
 By clicking on the layout section, now you can find all the list of elements on the page which use display: flex or grid property. When you check the checkbox the element gets highlighted with dotted lines
![grid-flex-layout.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qd61cnq7x083j7kx6037.gif)

### 7) Flexbox debugging tool
Flexbox has variety of options, and if you would like to test them out , the new feature in dev tool has an icon next to the display:flex property using which you can try out all the options and see how the content/layout behaves.
![Flexbox debugging tool](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iayxs6xk63ql6ko94bko.png)

### 8) Badge settings 
In the elements tab you can see the list of elements which use flex, grid, scroll-snap or ads. Right click on the elements(eg: div, p , span etc) and select badge settings. You can choose the badges you think will be most required for your debugging.
In the below screenshot, you can see that the moment i check scroll-snap , the badges showed up next to the div which had scroll snap enabled.
![badge-settings.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cdae69dgd7j8jorfnzi4.gif)

### 9) Visualize CSS scroll snap
CSS scroll snap lets you set the scroll offset position of a scroll container to be at a preferred snap position once the scroll operation is finished. Visualizing this can be difficult, and using the developer tool, you can see how/where your scroll position ends.

In the elements tab, you will find the list of elements which currently use scroll-snap. Click on it, and it will highlight the element to show you its position.
![scroll-snap.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ltzv1st9t5mpb1hwej04.gif)

### 10) Grouping CSS properties in the Computed pane
On the computed section of the styles pane usually we see all the styles which are applied on a particular element. By clicking on group they are grouped together by category and you can focus just on the ones which are required for your debugging.

![grouping](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kni3r089vr24romw7eg7.png)

Let me know in the comments below your favorite among these and if there are others which you use. 

Lets connect on [Twitter](https://twitter.com/KritikaPattalam) | [LinkedIn](https://www.linkedin.com/in/kritika-p-296739155/) for more web development related tips.

Check out my other blog posts:
- [Create a GitHub Profile README.md with widgets](https://dev.to/kritikapattalam/create-a-github-profile-readme-md-with-widgets-47j7) 
- [Getting Started with JavaScript - Ultimate Free Resources](https://dev.to/kritikapattalam/getting-started-with-javascript-ultimate-free-resources-59p6)

- [2 Simple ways you can truncate text using CSS](https://dev.to/kritikapattalam/2-simple-ways-you-can-truncate-text-using-css-1n18)