Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #4494

Re: Parsing .css files with php: Cons?

From "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid>
Newsgroups comp.lang.php
Subject Re: Parsing .css files with php: Cons?
Date 2012-01-17 13:31 +0100
Organization http://alvaro.es/
Message-ID <jf3plp$9da$1@dont-email.me> (permalink)
References <400f69e3-9555-4cc0-b529-6dbca54d9bfa@k3g2000pbn.googlegroups.com>

Show all headers | View raw


El 16/01/2012 22:36, J. Frank Parnell escribió/wrote:
> given: I know about @import and cascading styles, etc etc.
>
> Is is cool to parse .css files with php?  Like I may want to include()
> sections into an overall .css.  Or i may want to do like color:#<?php
> echo $thecolor; ?>.  That kind of stuff.
>
> I guess there might be a little more overhead, but what's a few .css
> files within a whole cms like wordpress?  I'm just looking for gotchas
> and unforseen problems.

You might be interested in one of the existing CSS preprocessors, such 
as SASS or LESS. It's basically the idea you are describing, except that:

- CSS is generated once (not for every request).
- The code is already written (and not necessarily in PHP).


-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Parsing .css files with php: Cons? "J. Frank Parnell" <juglesh@gmail.com> - 2012-01-16 13:36 -0800
  Re: Parsing .css files with php: Cons? Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-01-17 11:42 +0100
  Re: Parsing .css files with php: Cons? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-01-17 13:31 +0100
  Re: Parsing .css files with php: Cons? Captain Paralytic <paul_lautman@yahoo.com> - 2012-01-17 04:32 -0800
    Re: Parsing .css files with php: Cons? "J. Frank Parnell" <juglesh@gmail.com> - 2012-01-19 12:45 -0800
      Re: Parsing .css files with php: Cons? Captain Paralytic <paul_lautman@yahoo.com> - 2012-01-20 02:07 -0800
        Re: Parsing .css files with php: Cons? Michael Fesser <netizen@gmx.de> - 2012-01-20 11:25 +0100
          Re: Parsing .css files with php: Cons? Captain Paralytic <paul_lautman@yahoo.com> - 2012-01-20 05:33 -0800
            Re: Parsing .css files with php: Cons? Michael Fesser <netizen@gmx.de> - 2012-01-20 15:05 +0100
              Re: Parsing .css files with php: Cons? Chuck Anderson <cycletourist@invalid.invalid> - 2012-01-20 18:50 -0700
                Re: Parsing .css files with php: Cons? "J.O. Aho" <user@example.net> - 2012-01-21 08:10 +0100
                Re: Parsing .css files with php: Cons? Chuck Anderson <cycletourist@invalid.invalid> - 2012-01-21 12:31 -0700
                Re: Parsing .css files with php: Cons? Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-21 15:53 -0500
                Re: Parsing .css files with php: Cons? Michael Fesser <netizen@gmx.de> - 2012-01-21 22:22 +0100
                Re: Parsing .css files with php: Cons? "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2012-01-21 21:37 +0000
                Re: Parsing .css files with php: Cons? Michael Fesser <netizen@gmx.de> - 2012-01-22 22:35 +0100
                Re: Parsing .css files with php: Cons? Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-22 19:19 -0500
                Re: Parsing .css files with php: Cons? Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-21 17:08 -0500
                Re: Parsing .css files with php: Cons? Chuck Anderson <cycletourist@invalid.invalid> - 2012-01-21 18:17 -0700
                Re: Parsing .css files with php: Cons? Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-21 23:14 -0500
                Re: Parsing .css files with php: Cons? Michael Fesser <netizen@gmx.de> - 2012-01-22 22:35 +0100
                Re: Parsing .css files with php: Cons? "Peter H. Coffin" <hellsop@ninehells.com> - 2012-01-22 17:14 -0600
                Re: Parsing .css files with php: Cons? Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-22 19:21 -0500
                Re: Parsing .css files with php: Cons? Michael Fesser <netizen@gmx.de> - 2012-01-23 23:44 +0100

csiph-web