CSS Questions [message #898605] |
Thu, 26 July 2012 16:55  |
Eclipse User |
|
|
|
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 10:21   |
Eclipse User |
|
|
|
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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03950 seconds