Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy computed css value in chrome devtools

In the example below I would like to copy the value of 'box-shadow'. But in Chrome Devtools I can't select the value and there is no copy option. Is there a better way to do this?

I can copy the value in the 'styles' tab, but that contains a bunch of css variables.

enter image description here

Update: a extra nice option would be 'Copy computed styles' here: enter image description here

like image 877
roeland Avatar asked Jun 27 '26 09:06

roeland


2 Answers

Right-click the element on the web page and select Inspect, then type in the developer tools console getComputedStyle($0).

Chrome Developer Tools Screenshot

like image 135
gknicker Avatar answered Jun 29 '26 22:06

gknicker


This can be done by hovering over a word in the RHS of some value, where the I beam cross-section shape pointer shows up. Double click to get it to select the word. Then hit Ctrl + A, Ctrl + C. See screenshot.

Screenshot

like image 37
Chris Chiasson Avatar answered Jun 29 '26 22:06

Chris Chiasson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!