[Cubicweb] Re: refactoring in style

Julien Jehannet julien.jehannet at logilab.fr
Tue Feb 16 12:03:23 CET 2010


> * Nicolas Chauvat <nicolas.chauvat at logilab.fr> [15-fév-2010 23:03]:
> 
> The goals
> ~~~~~~~~~~
> Over the weekend, I got started on refactoring style-related things in
> CW. I would like to replace what we currently have for css/styling with
> a machinery that will allow to skin the cw applications so that it
> becomes easy to change their appearance or apply a given style to an
> existing cube.
> 
> 1/ A first design goal would be being able to define a color scheme
>    and apply it within 5 mins
> 
> I suggest you read about colors at
> http://www.smashingmagazine.com/2010/01/28/color-theory-for-designers-part-1-the-meaning-of-color/
> this is a series of 3 articles. The last ones points to online tools
> that help to create color schemes. Another list of tools is available from
> http://vandelaydesign.com/blog/design/find-the-perfect-colors-for-your-website/

Interesting readings.

> 2/ A second design goal would be to shorten drastically CSS by
>    introducing variables to reduce their verbosity and repetitivity
> 
> Inspiration can be drawn from Sass, xCSS and CleverCSS:
> http://sass-lang.com/ http://xcss.antpaw.org/
> http://sandbox.pocoo.org/clevercss/

Sorry but I think that's an error to try to use another framework to
create content served normally as static pages.
We do need theme policy, not an exotic way to generate css on the fly.

Since we already encourage the use of jQuery for our javascript needs,
my proposition should be rather to look into a possible theme manager as:

http://jqueryui.com/themeroller/

> The work done
> ~~~~~~~~~~~~~~
> 
> Regarding 2/, I have something already, but would like to hear about
> your opinions about the preferred syntax. Would you rather use the
> syntax of Sass, the one of xCSS or the one of CleverCSS ?

None of them, just plain css text. I see too many possible pitfalls with
that (what about CSS3 ? or browser specific rules (that are sometimes
the only option to trick a design bug), new language to learn for
external web designers, ...)

> About 3/, I implemented a new cw.web.actions name GotRhythm that does
> what the typograph or hgtip.com do, which is use a js function to
> replace the background with an image that shows the tempo. I will
> commit that tomorrow after having it reviewed.

Clearly, I like the style of these websites but their content type seems
not be relevant to CubicWeb instance data (text versus tabular data).
But maybe your "GotRhythm ♫♪" add-on will convince me (its name sounds
already great! ;-)
-- 
Julien JEHANNET                                          LOGILAB, Paris (France)
http://www.cubicweb.org                 CubicWeb, le cadriciel du web sémantique
http://www.logilab.org             Dépôt des logiciels libres conçus par Logilab
http://www.logilab.fr       Informatique scientifique & Gestion de connaissances
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20100216/254ef9e7/attachment-0087.sig>


More information about the Cubicweb mailing list