Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Best practices for managing CSS with Textpattern
I’d like to hear some feedback on the best way to manage stylesheets on a Textpattern site. Right now I see two main options:
- Paste the stylesheets into TXP’s Presentation tab and serve them using
<txp:css />
. - Put them on the server as static files.
The first method can be supported by plugins such as rvm_css
and cnk_versioning
, but I’m not clear on the advantages of using Textpattern to manage CSS.
There is one benefit TXP might offer for stylesheets: the ability to parse Textpattern tags. This is very helpful when developing on a different server than the destination— I can put <txp:site_url />
to dynamically include the correct file paths for includes and images. But as far as I can tell, this only works for CSS declarations in the head
element, not for CSS managed in the presentation tab.
Is that correct? Does anyone use the Presentation tab to manage styles? If so, what benefits have you found in using this method?
Textmate, the TXP bundle, and cnk_versioning
have been a magnificent combo for managing TXP pages and forms. What is your experience and best practices dealing with CSS?
Thanks!
Offline
#2 2008-10-16 19:41:22
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Best practices for managing CSS with Textpattern
johnstephens wrote:
Does anyone use the Presentation tab to manage styles? If so, what benefits have you found in using this method?
I do, mainly because I’m lazy. I try to keep my css as simple as possible and managing it through the Textpattern backend allows me to quickly modify it without the need to fire up a separate css editor and ftping it. I’m planning to install ruud’s plugin on some sites when I get a chance.
Offline
Re: Best practices for managing CSS with Textpattern
I also use the Presentation tab to manage my CSS. I find it much simpler to modify and see immediate results without going all through the download/edit/upload routine and if you have separate CSS for IE6 and below, IE7 and above and maybe CSS for a gallery or other add-on the benefits are multiplied. I also use Ruud’s rvm_css plug-in so I get the speed of using a static CSS file(s). I don’t bother with versioning but don’t hold that against me. ;)
Something else that I use which you may be interested in is Mary’s upm_insert_tab plug-in which allows you to “tab” inside textareas so you can keep that “edited-in-my-favourite-code-editor” look.
Last edited by thebombsite (2008-10-16 20:41:44)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#4 2008-10-16 21:22:02
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Best practices for managing CSS with Textpattern
I use the presentation tab as well, for all the reasons Stuart pointed out, together with Firefox extension It’s All Text! So the editing can be done in my text editor – with all it’s advantages like search, replace and the like – and I still don’t have to ftp :)
Offline
Re: Best practices for managing CSS with Textpattern
johnstephens wrote:
There is one benefit TXP might offer for stylesheets: the ability to parse Textpattern tags. This is very helpful when developing on a different server than the destination— I can put
<txp:site_url />
to dynamically include the correct file paths for includes and images. But as far as I can tell, this only works for CSS declarations in thehead
element, not for CSS managed in the presentation tab.
ako_cssParse sorta allows for TXP tags in the Presentation>Style tab.
Personally, I just use static files and update with rsync if possible, but otherwise, plain FTP.
Offline
Re: Best practices for managing CSS with Textpattern
fwiw, I too use the built-in Presentation tab for managing stylesheets + rvm_css for delivering them zoooooooooooommmm stylie.
I’ve never tried TXP tags in stylesheets but believe it doesn’t work, as you state, unless in a page/form.
When editing CSS I tend to use the Firefox dev toolbar by Chris Pederick. Probably not as slick as TextMate but I can’t afford a Mac :-) Ctrl-Shift-E brings up the CSS panel, I can edit and see the changes in real-time on the page, when I’m happy with how it looks, I can copy the new sheet from the dev toolbar panel and paste it into the TXP Styles window. Save, refresh, done.
Then spend the next 3 days trying to make the page look right in IE :-(
Last edited by Bloke (2008-10-16 22:42:26)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Best practices for managing CSS with Textpattern
I just use the TXP styles tab for managing the CSS, its so much easier. Also rvm_css on some sites. Personally, I find CSSEdit the easiest way to edit my CSS. Edit, see the changes in the preview window, then copy and paste. Easy :-)
Offline
Re: Best practices for managing CSS with Textpattern
I have never liked having CSS within the txp interface. In the beginning I’d copy and paste, but it seemed more of a hassle than ftp-ing.
I usually have a static CSS file (that is usually done with the basic html layout before i even start with txp) ftp’d to the server, or edited/saved directly there with Stylizer which, i recommend very highly, asi it as a css-edit-like ability of letting you edit and see changes live in both ie and ffox
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
Re: Best practices for managing CSS with Textpattern
I try to get my CSS ready with the static HTML mockup and do later refinements employing the Firefox Webdesigner Toolbar/Firebug >> Paste to TXP method.
Offline
Re: Best practices for managing CSS with Textpattern
kemie wrote:
…Stylizer which, i recommend very highly
Hey thanks for the link, that looks very neat. If I ever find a decent freeware FTP tool that works the way I want to work (coreftp, filezilla, smartftp, ftp commander, ncftp, etc don’t deliver quite what I’m after and all suffer from minor annoyances that curb my enthusiasm) I might give it a go.
On a slightly OT but semi-related note, another firefox extension that I’ve heard good things about but never tried is Dustme selectors which will allegedly crawl a site/page for unused rules and allow you to clean up some of the inevitable 100 billion redundant CSS rules in a typical project. Yay!
Last edited by Bloke (2008-10-17 08:43:12)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Best practices for managing CSS with Textpattern
kemmie> mon mac version of stylyzer, poo!
bloker> Dustme is really useful, wish I didn’t have to crawl through and manually cleanup. I’m one lazy bugger.
Offline
Re: Best practices for managing CSS with Textpattern
Dustme is really useful, wish I didn’t have to crawl through and manually cleanup. I’m one lazy bugger.
You mean one lazy *de*-bugger.
Thanks for your feedback all!
Offline