Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » CSS Questions(How to organize CSS classes in .css file?)
CSS Questions [message #898605] Thu, 26 July 2012 20:55 Go to next message
Ronald So is currently offline Ronald SoFriend
Messages: 198
Registered: April 2011
Senior Member
Hello,

Just a couple quick questions on CSS settings for RAP.

Label.labelError {
    font: normal normal 12px Trebucket, Arial, sans-serif;
    color: red;
}
Label.labelInfo {
    font: normal normal 12px Trebucket, Arial, sans-serif;
    color: blue;
}
Label.labelBold {
    font: normal bold 12px Trebucket, Arial, sans-serif;
}


I have the above in the CSS code that may not be ideal. I can use all three classes by
Label.setData(WidgetUtil.CUSTOM_VARIANT, "labelBold");


1. How can I change all Label to size 12px without defining it in every Label CSS style?
2. What is the recommended way to manage this CSS file? I can only imagine that this file will grow big with all these variances of styles. Is there a strategy that you can recommend to better manage these CSS settings?

Thanks so much for your help.

Ronald


Re: CSS Questions [message #898783 is a reply to message #898605] Fri, 27 July 2012 14:21 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Roland,
see my answers bellow

On 7/26/2012 11:55 PM, Ronald So wrote:
> Hello,
>
> Just a couple quick questions on CSS settings for RAP.
>
>
> Label.labelError {
> font: normal normal 12px Trebucket, Arial, sans-serif;
> color: red;
> }
> Label.labelInfo {
> font: normal normal 12px Trebucket, Arial, sans-serif;
> color: blue;
> }
> Label.labelBold {
> font: normal bold 12px Trebucket, Arial, sans-serif;
> }
>
>
> I have the above in the CSS code that may not be ideal. I can use all
> three classes by Label.setData(WidgetUtil.CUSTOM_VARIANT, "labelBold");
>
> 1. How can I change all Label to size 12px without defining it in
> every Label CSS style?
Just set it in the Label selector:
Label {
font: normal normal 12px Trebucket, Arial, sans-serif;
}
> 2. What is the recommended way to manage this CSS file? I can only
> imagine that this file will grow big with all these variances of
> styles. Is there a strategy that you can recommend to better manage
> these CSS settings?
Probably this is not a complete theme overwrite (complete theme) and you
only contribute some small changes/variants. Keep your changes in a
single CSS file and contribute them (themeContribution) to an existing
(default, business or fancy) theme.
>
> Thanks so much for your help.
>
> Ronald
>
>
>
Best,

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: CSS Questions [message #899453 is a reply to message #898783] Tue, 31 July 2012 21:52 Go to previous message
Ronald So is currently offline Ronald SoFriend
Messages: 198
Registered: April 2011
Senior Member
Thanks Ivan it works fine.

Ronald
Previous Topic:Language of session timeout message.
Next Topic:[ANN] RAP 2.0, API changes
Goto Forum:
  


Current Time: Fri Apr 26 22:17:12 GMT 2024

Powered by FUDForum. Page generated in 0.03715 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top