Adjust custom CSS behaviour or at least add ability to add head code

Avatar

By Lirodon 20 May 2016 15:34

Member · 25 comments

I noticed the new Custom CSS thing, so of course the first thing I tried to do with it was add the web fonts I use on the main portion of my site using CSS imports.

However, that doesn't work; imports have to be the first lines in a CSS block (contradicted by having the Emoji render size come up first), and the custom CSS function loads it into the header via <style> tags, which in my opinion is a messy practice.

<style>
	.emoji {
		font-size: 16px;
	}
        @import url("http://example.com/fonts/font1/stylesheet.css")
        @import url("http://example.com/fonts/font2/stylesheet.css")

[...]
</style>

Something should be done to address this. We should be able to add custom code to the header too for loading custom scripts and stylesheets to make it easier to do embed things like this (I can forsee other uses too), and the custom CSS should be loaded using a standard <link rel="stylesheet" type="text/css" href="/include/customcss.php" /> or something to that effect.

Last edited by Lirodon (20 May 2016 15:35)

Avatar

By bem 20 May 2016 16:13

Member · 118 comments

I'd have thought that that if you were going to add custom stylesheets, whole ones, that you'd just edit the header file. Or create a child theme that just addresses this.

Avatar

By Yannick 20 May 2016 19:04

Administrator · 1,390 comments

Well, Custom CSS was never ment for major changes to styles. That feature was added for minor manipulation of themes.


You can do anything

Avatar

By Lirodon 21 May 2016 02:39

Member · 25 comments

I ended up doing that instead, as I had done before (though I still used custom CSS to work around my host's aggressive CSS caching). Montserrat actually looks good on Fifteen.

Avatar

By Yannick 21 May 2016 09:45

Administrator · 1,390 comments

I would like to point out that Luna 2.0.2 will put Custom CSS before the emoji setting.


You can do anything

Avatar

By Vadim 21 May 2016 16:40

Member · 224 comments
Lirodon wrote

I noticed the new Custom CSS thing, so of course the first thing I tried to do with it was add the web fonts I use on the main portion of my site using CSS imports.

It is better to use a child theme.

- snip -

Admin note

Stay on topic. This is not the place to request approval for pull requests.

Last edited by Vadim (21 May 2016 16:45)


I do not understand the code. I am learning English.