Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-08-25 09:57:50

fabio sirna
Archived Plugin Author
From: Torino, IT
Registered: 2005-11-14
Posts: 47
Website

[request] CSS Compressor

Does any one know how add this feature on TXP?

http://www.ibloomstudios.com/articles/php_css_compressor/

Offline

#2 2006-08-25 11:19:51

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: [request] CSS Compressor

That looks pretty cool.

Thankfully, I’ve modified my coding style to almost make this unnecessary.

When I first started out, I would split up my CSS like so many tutorials instructed me to.

bc..

#thing { color:#444; border: solid 1px #000; margin: 0;
}

The only problem is that once you get into a complex site, you end up with way too many lines to scroll through, which defeats the purpose of making it an easy read. Nowadays I much prefer to break it down like so:

bc..

#thing {color:#444; border: solid 1px #000; margin: 0;}

This works well for me, especially since I use TextMate and colored syntax. Condensing 4 lines into one reduces scrolling by 75%.. instead of 1,000+ lines I get under 300… both my server and scrolling finger are much happier!

Offline

#3 2006-08-25 12:32:16

TNT
Member
From: Rotterdam, Netherlands
Registered: 2006-01-06
Posts: 256
Website

Re: [request] CSS Compressor

Fabio,

I haven’t tried, but can’t you just include the provided script inside your CSS? I can’t see why this shouldn’t work.


Prrrrrrrr

Offline

#4 2006-08-25 14:49:01

akokskis
Plugin Author
From: Baltimore-ish, USofA
Registered: 2004-11-28
Posts: 230
Website

Re: [request] CSS Compressor

I could put together a plugin like this within the next few days or so.


My Photoblog, and my personal site. Got nav? ako_nav.
Thanks for taking the time to look…

— vc3 —

Offline

#5 2006-08-25 19:03:45

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

Re: [request] CSS Compressor

Unless you have one huge stylesheet the loss of clarity isn’t worth the minimal bandwidth savings. Especially since css is generally only downloaded one and then cached by the browser.


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

#6 2006-08-26 00:49:42

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [request] CSS Compressor

I agree with NyteOwl. I’ve yet to see any example only seen rare instances of where obfuscating code for the sake of bandwidth savings was advisable.

Last edited by Mary (2006-08-26 00:50:13)

Offline

#7 2006-08-26 10:27:15

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [request] CSS Compressor

And those spaces, tabs and newlines will probably compress very well anyway, so the gain is likely to be much less then you’d expect.

Offline

#8 2006-08-27 12:42:24

akokskis
Plugin Author
From: Baltimore-ish, USofA
Registered: 2004-11-28
Posts: 230
Website

Re: [request] CSS Compressor

Well, in light of these comments, it seems kind of silly to be making a plugin. However fabio sirna, if you would wish me to still develop this, I’d be more than happy to do so. Just let me know one way or the other.


My Photoblog, and my personal site. Got nav? ako_nav.
Thanks for taking the time to look…

— vc3 —

Offline

#9 2006-08-28 16:25:50

fabio sirna
Archived Plugin Author
From: Torino, IT
Registered: 2005-11-14
Posts: 47
Website

Re: [request] CSS Compressor

thans to all for the quick answer. I think much in this period, an I try other CSS compress (e.g. web service) but a common problem is that sometimes the CSS fails the design of the page. So I think is not a real problem have a non compressed CSS. I do some try and a small CSS is better, the page load quickly but is not important time (e.g. 01.sec and so on) :)
Thanks for your gentility, and sorry for my bad bad english :)

Offline

#10 2006-08-28 19:10:08

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

Re: [request] CSS Compressor

Don’t worry about your English, it’s better than my Italian :)


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

#11 2006-08-28 19:24:12

fabio sirna
Archived Plugin Author
From: Torino, IT
Registered: 2005-11-14
Posts: 47
Website

Re: [request] CSS Compressor

NyteOwl wrote:

Don’t worry about your English, it’s better than my Italian :)

LOL :D

Offline

Board footer

Powered by FluxBB