user1114
user1114

Reputation: 1169

Safari Web Inpector how to know from where a style is overridden

Safari web inspector crosses out style rules when they are overridden by other rules (i.e. an external style sheet rule is overridden by an inline css rule). Is there a way to know what is overriding a specific rule?

Upvotes: 2

Views: 754

Answers (1)

cheersjosh
cheersjosh

Reputation: 1209

There is no easy method of doing this but when you are in web inspector you can deselect checkboxes next to styles to remove them. Upon doing this the overridden rules will not have a strikethrough anymore. You will notice that next to the style that you disable it displays the location of where that style is declared. If you click on it, the web inspector will take you to that location in the relevant file. The format for this location is file:line-number.

Upvotes: 1

Related Questions