Hi,

>I am searching for a good way to style my components.
I have been too since the start of the Tapestry 5 project... my rule of thumb 
for components requiring CSS (the very simplified version) is to use a 
component specific style sheet, and not to include these CSS rules in the 
global style sheet. There are many benefits to this approach, though I realize 
a lot of people may disagree here, well each to his own, but I wanted limit 
what goes into my global styles as much as possible to carefully utilize CSS 
inheritance and make components reusable across projects. (I could explain this 
in more detail if you want, but for now I want to keep my post short).  This 
way components become even more modular, so a component can potentially 
include: (.java, .tml, .css, .properties). This 'decentralized' approach works 
well for me, but ultimately its a matter of personal style.

Kind regards,
Peter


----- Original Message -----
From: "Thiago H. de Paula Figueiredo" <thiag...@gmail.com>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Tuesday, 23 June, 2009 01:44:51 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Best practice for CSS styling components

Em Mon, 22 Jun 2009 19:22:35 -0300, Kai Weber <kai.we...@glorybox.de>  
escreveu:

> Hi,

Hi!

> I am searching for a good way to style my components. How would I do  
> that?
> I found that adding the CSS directly to the component class (with  
> @IncludeStylesheet) makes page specific changes to a component hard due  
> the loading order of the stylesheets (page's css comes before the  
> component's).

My experience says otherwise: all framework-loaded stylesheets are  
included before the ones linked in the page directly.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to