2014-12-05, 05:25:11
(2014-12-04, 08:09:36)tuxy Wrote: Hello,
I try to understand how to implement this.
I make a custom.scss and a custom.css
I put the two files in my_theme/css/
Then put this line in the header:
<link rel="stylesheet" type="text/css" href="<?php get_scss_css('/css/custom.scss'); ?>" />
<link rel="stylesheet" type="text/css" href="<?php return_scss_css('/css/custom.css'); ?>" />
Why would you need both a scss and a css?
get_scss_css will create a custom.css by compiling the custom.scss, if the custom scss is newer than the custom.css and return the css filename. Thus it will either overwrite your custom.css or do nothing - both undesirable.
If you really need a scss and a css, you must name both differently. The code would be like this:
Code:
<link rel="stylesheet" type="text/css" href="<?php get_scss_css('/css/custom.scss'); ?>" />
<link rel="stylesheet" type="text/css" href="/css/my-static-custom.css" />