Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#157 2012-04-07 17:08:13
Re: rvm_css (v1.2)
I suspect you’ve made a typo. I’ve released version 0.9 which should fix the “less” import issues on Windows hosting. (and you’re right. I only use Windows at work. Linux at home).
Offline
#158 2012-04-07 17:23:54
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: rvm_css (v1.2)
ruud wrote:
I suspect you’ve made a typo. I’ve released version 0.9 which should fix the “less” import issues on Windows hosting.
Hi Ruud,
I hope someone else who is testing the plugin in a windows+xampp local install could tell if the plugin works for them. I’m sorry but I continue to have the same output shown before
@import url("C:\xampplite\htdocs\txp3\css$1");
Anyway the error message is gone.
Thank you again for the help.
Last edited by redbot (2012-04-07 17:24:28)
Offline
#159 2012-04-08 13:36:12
Re: rvm_css (v1.2)
Okay, I’ve been able to reproduce the issue and this time I think I’ve fixed it. I mean it. Really!
New version available for download (0.9.1)
Offline
#160 2012-04-22 16:31:47
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: rvm_css (v1.2)
Hi again Ruud,
first of all excuse me for responding so late, I’ve been away from home for the last two weeks.
I have tested the updated plugin and I have a good and a bad news.
The good news is now the plugin outputs the correct path. The bad one (I know, you are gonna hate me now) is that there are still issues.
An example will hopefully clarify what I mean:
Suppose you have created two styles in the ‘style’ tab: default.less and colors.less
‘colors’ file contains this code:
@color: #00ff00;
and the ‘default’ file contains these rules:
@import "colors.less";
#some_id {color: @color;}
Now if you look at the parsed default.css file you see exactly this:
@import url("C:\xampp\htdocs\txp3\css\colors.less");
#some_id { color:; }
But – even if the path is now correct – this isn’t what i shoud see, right? I would expect this:
#some_id { color:#00ff00; }
In other words the @import part shouldn’t be there at all and furthermore the imported styles are not parsed.
I can confirm this only happens in my local xampp intallation, everything works ok in a remote server.
Offline
#161 2012-04-22 17:04:21
Re: rvm_css (v1.2)
Hmm… that’s not cause by the plugin, I think, but by the lessphp parser. Are you using the most recent version. I see a lot of new versions appearing here lately and version 0.3.2 has some windows fixes.
Offline
#162 2012-04-23 10:24:49
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: rvm_css (v1.2)
ruud wrote:
…Are you using the most recent version. I see a lot of new versions appearing here lately and version 0.3.2 has some windows fixes.
Hi Ruud,
yes I’m using the latest version 0.3.4-2.
I’ll try to investigate further h (with my very limited programming skills).
BTW can someone else reproduce this issue?
P.S.
Thanks for all the support.
Offline
#163 2012-04-23 13:00:29
Re: rvm_css (v1.2)
What happens if you put this in your CSS (first create colors1.less … colors10.less in your css dir):
@import 'C:\xampp\htdocs\txp3\css\colors1.less'
@import "C:\xampp\htdocs\txp3\css\colors2.less"
@import url('C:\xampp\htdocs\txp3\css\colors3.less');
@import url("C:\xampp\htdocs\txp3\css\colors4.less");
@import 'C:/xampp/htdocs/txp3/css/colors5.less'
@import "C:/xampp/htdocs/txp3/css/colors6.less"
@import url('C:/xampp/htdocs/txp3/css/colors7.less');
@import url("C:/xampp/htdocs/txp3/css/colors8.less");
@import "C:\xampp\htdocs\txp3/css/colors9.less");
@import "C:\xampp\htdocs\txp3\css\/colors10.less");
I can’t test it myself because don’t have access to a Windows computer with PHP installed.
Offline
#164 2012-04-27 16:17:41
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: rvm_css (v1.2)
ruud wrote:
What happens if you put this in your CSS…
Hi Ruud,
if I just copy/paste your code I got:
@import url("C:\xampp\htdocs\txp3\css\colors1.less") @import "C:\xampp\htdocs\txp3\css\colors2.less"
@import url('C:\xampp\htdocs\txp3\css\colors3.less');
@import url("C:\xampp\htdocs\txp3\css\colors4.less");
@import url("C:/xampp/htdocs/txp3/css/colors5.less") @import "C:/xampp/htdocs/txp3/css/colors6.less"
@import url('C:/xampp/htdocs/txp3/css/colors7.less');
@import url("C:/xampp/htdocs/txp3/css/colors8.less");
@import url("C:\xampp\htdocs\txp3/css/colors9.less") );
@import url("C:\xampp\htdocs\txp3\css\/colors10.less") );
#some_id { color:; }
I don’t know if you omitted by purpose the ending semicolon in some lines. Anyway here is what I got if I add them:
@import url("C:\xampp\htdocs\txp3\css\colors1.less");
@import url("C:\xampp\htdocs\txp3\css\colors2.less");
@import url("C:\xampp\htdocs\txp3\css\colors3.less");
@import url("C:\xampp\htdocs\txp3\css\colors4.less");
@import url("C:/xampp/htdocs/txp3/css/colors5.less");
@import url("C:/xampp/htdocs/txp3/css/colors6.less");
@import url("C:/xampp/htdocs/txp3/css/colors7.less");
@import url("C:/xampp/htdocs/txp3/css/colors8.less");
@import url("C:\xampp\htdocs\txp3/css/colors9.less") );
@import url("C:\xampp\htdocs\txp3\css\/colors10.less") );
#some_id { color:; }
Offline
#165 2013-02-27 16:54:22
Re: rvm_css (v1.2)
ruud wrote:
I think the benefits of minifying don’t outweigh the added code complexity (especially if you’re already compressing CSS using deflate/gzip). It reduces bandwidth usage, but I suspect that on most websites the bandwidth used by serving CSS files is only a few percent of total bandwidth used.
Ruud,
You can add a single line of code to your plugin to add minification to the CSS output… I’ve been using it without flaw for a long time now. Here’s the example documentation from LessPHP: http://leafo.net/lessphp/docs/#output_formatting
Here’s how I modified the plugin to output minified CSS:
Replace this line:
$less = new lessc();
With this:
$less = new lessc();
$less->setFormatter("compressed");
Works like a charm.
Again, thanks for an amazing plugin!
Last edited by qrayg (2013-02-27 17:04:46)
Offline
#166 2013-02-27 17:55:47
Re: rvm_css (v1.2)
You can add a single line of code to your plugin to add minification to the CSS output
Good news!
For me, it still lacks the concatenation of css files. And it is a ideal plugin
However, in plugin help, it is noted:
The <txp:rvm_css /> tag supplied by this plugin has the exact same attributes as the built-in <txp:css /> tag and can be used as a drop-in replacement.
But this is no longer true.
Since txp 4.5, txp:css
accept multiple values for name
attribute.
OFF : Wiki need a update to add this feature
Unfortunately rvm_css not support multiple values for the attribute name.
@ Ruud, it would be difficult to add this feature to your plugin ?
Offline
#167 2013-02-28 00:39:33
Re: rvm_css (v1.2)
qrayg, added in version 1.0
sacripant, added in version 1.0. Note that this is just to keep it working as a drop in replacement. It doesn’t concatenate the CSS files, because that’s impossible due to the way this plugin works. It simply spits out code for loading multiple css files.
Offline
#168 2013-09-19 00:42:52
Re: rvm_css (v1.2)
Having fun with less finally.
I like to preserve comments, and not compress output. So I replaced this line.
$less->setFormatter("compressed");
with this line
$less->setPreserveComments(true);
works like a charm.
-Dale
Offline