[prev in list] [next in list] [prev in thread] [next in thread] 

List:       twig-devel
Subject:    [twig-devel] CSS (was RE: [twig-devel] Interest in design-related patches?)
From:       Jaime Kikpole <jkikpole () cairodurham ! org>
Date:       2000-11-28 17:04:35
[Download RAW message or body]

On Mon, 27 Nov 2000, Greg Ross wrote:
> 	I have never claimed to be an expert of CCS or for that matter HTML, but it
> seems to me that the biggest advantage to CCS is the ability to define font
> face/size settings once and have have them applied to all your text.
> 
> 	TWIG accomplishes through it's config file and creating a second way that works
> with fewer systems seems redundant if you have to maintain the first.

	First thing is first...  Its CSS, not CCS.  :)

	CSS would allow you to state once, at the beginning of your
document, that all tags "FOO" would automatically have attributes BAR and
XYZZY.  For example, you can state that all FONT tags would imply font
families, sizes, etc.  Then you can specify the size in those cases where
you needed it to be different.

	CSS also allows you to essentially invent new tags.  You could
define tags called FS1 ("Font Size 1"), FS2, FS3, and FS4 which are all
the same font family but different sizes and in the case of FS4 a bold tag
(i.e. "<B>") would be implied.  This could lead to significant reductions
in the size of the HTML output.

	There is, of course, a down side.  Not all browsers support CSS to
the same degree, in the same way, and/or at all.  So its not really within
the TWIG philosophy.

	If TWIG was "themed" or "skinned" so that appearance related code
and function related code (basically, HTML and PHP respectively) were
separated from each other, it would be a trivial matter to implement CSS
in those cases where it was desirable and let the user switch back to
basic HTML in those cases where it was not.  This would require
considerable re-writing of the code, though.  I think that this is why
Eric was trying to teach us about it back in spring of 1999.

	In the last two or three months, I've learned how to do this
through a method that I made myself.  I've also seen two PHP libraries
that would do it for you.  If anyone is curious, I'd be happy to try to
teach them how to use PHP's built-in functions to do this.  It might even
be a nice idea for a TWIG 3.x series.  I'm not going to hold my breath
with anticipation, of course.  :)  Programmers generally don't like
re-writes, after all.

						Jaime

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic