javascript - Using @import in content script's associated CSS -


i'm building chrome extension includes content script linked css file. that's manifest file:

{   "manifest_version": 2,   "name": "cool name",   "version": "1.0",   "permissions": [     "http://*/*",     "https://*/*",   ],   "content_scripts": [     {       "matches": [         "http://*/*",         "https://*/*"       ],       "js": [         "jquery.js",         "contentscript.js"       ],       "css": [         "styles.css"       ]     }   ],   "web_accessible_resources": [     "styles.css"   ] } 

these contents of styles.css:

@import url(http://fonts.googleapis.com/css?family=pacifico);  .testclass {   font-family: pacifico; } 

as can see, i'm trying import google font css file. however, font doesn't seem loaded, because when try use font, applying testclass text element using content script, nothing changes (if use other standard web font works).

may chrome won't let @import execute in extension context?

i tried add following line manifest file:

"content_security_policy": "script-src 'self' http://fonts.googleapis.com; object-src 'self'" 

but didn't help.

what doing wrong?

thanks.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -