What is "User stylesheet" in Google Chrome's developer tools?
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.
eldos
Updated on June 04, 2022Comments
-
eldos almost 2 years
I know about
user agent stylesheet
but I am seeinguser stylesheet
only on some specific sites in the Styles section of the developer tools, even though there is noCustom.css
in myUser Stylesheets
in my Chrome Profile. -
eldos almost 10 yearsIs there any simpler method to identify the extension causing this?
-
Rob W almost 10 years@eldos Search in the Extensions directory of your user data directory for the offending extension. In most cases, the style sheet is declared in a file called
manifest.json
(e.g."content_scripts": [{ "css": ["style.css"], ...
).