Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a summary of your CSS changes in Chrome dev tools?

Is there a way to get a list of the custom CSS changes you applied within the Chrome dev tools?

When you're playing with CSS in the Chrome dev tools to get your web page look right, it would come in handy to easily track the changes you made.

I know about workspaces, but the use case is an Angular 5 app where your CSS is bundled and possibly minified.

To clarify:

  • I have a page that is looking pretty far from what it should look like
  • I do 20 CSS fixes in dev tools until it looks good
  • now I want to get a (CSS) delta from the original page so I have a list of changes I should now implement in the real CSS styles.
like image 603
S. Robijns Avatar asked Jun 01 '18 11:06

S. Robijns


People also ask

How do I view CSS in dev tools?

Click on the three vertical dots located on the top-right of Chrome dev tools. Select "More Tools" from the drop-down menu. You'll discover a variety of options when you click "More Tools." From the various options, select the CSS overview feature.

How do I save custom CSS changes in Chrome?

To make things simpler, Chrome only shows you the local resources (so you don't get confused on as to whether you are editing the local or the network resource). To save your changes, press CTRL + S when editing the file.

How do I save CSS edits?

Now, every time you edit the source code you can click “Command + S” and save your code changes. Also, if you edit your CSS in your regular editor and you save the file, the changes will update in your Chrome without refreshing the page.


2 Answers

You can see all changes via the Changes Drawer

Changes Drawer

In Dev Tools, you can locate the Changes Drawer via either:

  • A) Open Command Palette (Ctrl + Shift + P) and type "changes"

    Command Palette > Changes

  • B) Open Drawer (Esc), click on the more options menu (triple dot), and select Changes

    Drawer Menu > Changes

Further Reading

  • How to get a summary of your CSS changes in Chrome dev tools?
  • Export CSS changes from inspector (webkit, firebug, etc)

Updates

  • Dev Tools 98 added More precise changes to automatically pretty prints changes
  • Issue #1296143 opened User-Select: none in Changes drawer makes it very hard to utilize
like image 91
KyleMit Avatar answered Sep 23 '22 01:09

KyleMit


Actually you could do exactly what you want:

Go to Sources > > Local Modifications

Going to the Sources tab, choosing your desired CSS file, and then right click and choose Local modifications will give you a diff style summary of your local changes.

Local CSS modifications in Chrome dev tools

Or - you could just save the changes directly to a local CSS file by mapping that local file so that chrome dev tools will automatically save any change that you made to this CSS file.

like image 43
Obmerk Kronen Avatar answered Sep 27 '22 01:09

Obmerk Kronen