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

angularjs - Redirect to a new template in angular js -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

Desktop Launcher for Python Script Starts Program in Wrong Path (Linux) -