Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you add new CSS properties in Chrome Inspector?

Is it possible to add new CSS properties in the Chrome inspector? It seems that you can only edit existing properties.

Also, once you edit the properties, is there a way to view the revised CSS as a whole?

like image 590
ina Avatar asked Jul 12 '11 08:07

ina


People also ask

How do I add custom CSS to Chrome?

Go to element panel ( Ctrl + Shift + p and type show element panel). Scroll to the head element right click on the element and choose Edit as HTML, go to the bottom of that element ( Ctrl + End ), add your <style></style> element there add your style in that element, and hit Ctrl + Enter .

How do I view CSS properties in Chrome?

Press Ctrl + Shift + i for Windows/Linux (or command + option + i for Mac). Right-click on an element on your website page and select Inspect. Now that you are familiar with accessing Google Chrome Developer Tools, you will be able to inspect CSS elements to modify them live.


1 Answers

Yes, it's possible to add new CSS properties in the Chrome inspector and review them in a few easy steps:

  1. Right click in the element you want to change and choose "Inspect element";
  2. Click the "New Style Rule" button (1 in the image below);
  3. Google Chrome will assign a CSS matching rule which you can rename (2 in the image below);
  4. Add your CSS rules (2 in the image below);
  5. When you're done just check the "Computed Style" pane (3 in the image below).

Add new CSS properties in the Chrome inspector

like image 130
Rolando Isidoro Avatar answered Oct 21 '22 12:10

Rolando Isidoro