Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
[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
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
Re: [request] CSS Compressor
I could put together a plugin like this within the next few days or so.
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
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
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.
Offline
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
Re: [request] CSS Compressor
NyteOwl wrote:
Don’t worry about your English, it’s better than my Italian :)
LOL :D
Offline
Pages: 1