Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SCSS Plugin
#7
(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" />
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply


Messages In This Thread
SCSS Plugin - by mvlcek - 2014-04-05, 01:06:25
RE: SCSS Plugin - by Oleg06 - 2014-04-05, 05:10:49
RE: SCSS Plugin - by ryunp - 2014-07-18, 08:17:37
RE: SCSS Plugin - by pavel9 - 2014-11-03, 05:07:22
RE: SCSS Plugin - by tuxy - 2014-12-04, 08:09:36
RE: SCSS Plugin - by mvlcek - 2014-12-05, 05:25:11
RE: SCSS Plugin - by shawn_a - 2014-12-04, 08:23:33
RE: SCSS Plugin - by tuxy - 2014-12-05, 05:57:59
RE: SCSS Plugin - by cvrglj - 2015-07-12, 02:56:44
RE: SCSS Plugin - by Oleg06 - 2016-06-06, 00:36:22
RE: SCSS Plugin - by Knobbles - 2023-11-25, 22:14:41



Users browsing this thread: 1 Guest(s)