loading...
Cover image for How to  extract all the styles from an element

How to extract all the styles from an element

perlatsp profile image Perlat Kociaj ・1 min read

TIL

Today I learned something really cool. You can easily copy the CSS of an element from dev tools.
Ever browsed a website and found a nice UI element and wanted to see/copy the CSS of it? Normally you would open dev tools and inspect that element to see the CSS and try to get all the style set some of them are set by class, some are inherited from the parent, you might have also inline styles.

Example

Let's say for example on a blog page I want to see all the styles of the read more link on my blog page.

blog page

To get all the CSS for that link you can right-click to inspect it and then on the elements tab right-click on it again and click Copy->Copy styles

css

Did you know this small trick?

Discussion

pic
Editor guide