Hey guys, how exactly do I change fonts via CSS? I followerd these steps, but it doesn't seem to work (ignore the "" around the "@import url( GOOGLE_FONTS_URL );" part, wouldn't display properly without them here):
/* Font
* ----
* Change the theme font. Delete any lines that aren't going to be customized.
* Replace the following:
* - 'GOOGLE_FONTS_URL': The CSS URL that Google Fonts gives you.
* - 'FONT': The font name. Surround with quotation marks if the
* font has spaces.
*/
/* ! +++
"@import url( GOOGLE_FONTS_URL );"
body {
font-family: FONT,sans-serif;
}
+++ ! */
In my case, it looks like this (again, ignore the ""):
"@import url(http://fonts.googleapis.com/css?family=Oswald:400,300,700);"
body {
background-color : #EEEEEE;
color: #FF3300
font-family: 'Oswald',Arial,sans-serif;
}
Am I missing something? Any help would be much appreciated!
Sort: Top
[–] j_ 0 points 2 points 2 points (+2|-0) ago (edited ago)
Sorry, I have to first ask: for a sub that covers topics including privacy, are you sure you want to call Google servers on every page view?
Anyway, the problem is a “mixed content” error: the Voat page you are on uses the secure HTTPS protocol, but the URL you are trying to import is HTTP. Some/most browsers will block this for security reasons as you don’t want insecure content injected in the middle of a secure page.
The solution is to drop the protocol scheme entirely, like this:
(Wow, the @ sign is really fucky with the Markdown processor. You know what it’s supposed to look like.)
The
//is a relative path, meaning “use the same protocol as the origin”, so if you are on a https:// url, it will use https://, and if you are on a http:// page, it will use http://.[–] 742617000027 [S] 0 points 1 point 1 point (+1|-0) ago
Thanks for your answer! I honestly haven't even thought of the implications of that piece of CSS, and now that you mention it I gladly give up on the idea. Thanks for clarifying though!
[–] j_ ago
No problem, glad to help.