What is “User stylesheet” in Google Chrome's developer tools?

孤者浪人 提交于 2019-12-10 13:29:10

问题


I know about user agent stylesheet but I am seeing user stylesheet only on some specific sites in the Styles section of the developer tools, even though there is no Custom.css in my User Stylesheets in my Chrome Profile.


回答1:


These "User stylesheet"s are added by Chrome extensions, either declared in a manifest file, or using chrome.tabs.insertCSS.

Styles on the web page always take precedence over the user stylesheet, unless the rule set in the (extension's) user stylesheet has a higher specifity.

If you want to know which extension is responsible for these stylesheets, just disable the extensions one by one until the stylesheet goes away. After disabling an extension, select a different element in the inspector, then select the original element to refresh the view, you don't have to reload the page.



来源:https://stackoverflow.com/questions/24465939/what-is-user-stylesheet-in-google-chromes-developer-tools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!