Where is the css file located?

135 views
Skip to first unread message

FRANK G

unread,
Feb 14, 2023, 12:02:11 AM2/14/23
to Chromium Extensions
I injected css file in the page via content script and the css style is applied, but I was wondering where is the actual css file located? How can access the injected css file using dev tool?

Manifest.json

"content_scripts": [
{
"js": ["content-script.js"],
"css": ["content-script.css"],
}

Thanks.

Stefan Van Damme

unread,
Feb 14, 2023, 8:20:57 AM2/14/23
to Chromium Extensions, FRANK G
Hi there,

The CSS file stays inside your Chrome extension. And with the Chrome inspector, you can see if the CSS override, that with the label "injected stylesheet".

For example, this is the accessible link in the Chrome web browser (for my Turn Off the Lights Chrome extension):
chrome-extension://bfbmjmiodbnnpllbbbfblcplfjjepjdn/css/light.css

For you can be at this location:
chrome-extension://YourID/content-script.css

For more information about debugging see this documentation:

Thanks,
Reply all
Reply to author
Forward
0 new messages