Textpattern Forum

You are not logged in. Register | Login | Help

#161 2012-04-22 17:04:21

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 4,480
Website

Re: rvm_css (v1.0)

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,396

Re: rvm_css (v1.0)

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

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 4,480
Website

Re: rvm_css (v1.0)

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,396

Re: rvm_css (v1.0)

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

qrayg
Member
From: USA
Registered: 2004-08-27
Posts: 67
Website

Re: rvm_css (v1.0)

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

sacripant
Member
From: Dakar – Sénégal – Africa
Registered: 2008-06-01
Posts: 343
Website

Re: rvm_css (v1.0)

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

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 4,480
Website

Re: rvm_css (v1.0)

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

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,041
Website

Re: rvm_css (v1.0)

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

#169 2014-01-21 18:40:56

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,041
Website

Re: rvm_css (v1.0)

OK, Finally getting into LESS in a LESS halfhearted way…

I don’t seem to be able to import a less file with mixins, etc. and use those within the master file.

EXAMPLE.
I have two less files “gradients.less” and “master.less”

gradients.less looks like.

.lesserific{
color:blue;
text-decoration:underline;
}

master.less looks like

@import "/css/gradients.less";

.lester{.lesserific}

I would expect *master.css” to include:

.lester{
color:blue;
text-decoration:underline;
} 

But for some reason .lester doesn’t turn up for the party in “master”

Any ideas fellers?

Offline

#170 2014-01-21 19:54:54

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 4,480
Website

Re: rvm_css (v1.0)

@mrdale, try:

@import "gradients.less";

Offline

Board footer

Powered by FluxBB