Why does standard.css override my own css file

561 views
Skip to first unread message

Jaap

unread,
Apr 13, 2009, 6:25:31 PM4/13/09
to Google Web Toolkit
Hi, if add a CSS body statement to the CSS file of my project I see
with Firebug that the browser actually does take the values from
standard.css and not from my CSS file.
Can I change this somehow? Is it intentional? Is this a bug?

Thanks

Jaap

Jaap

unread,
Apr 13, 2009, 6:31:39 PM4/13/09
to Google Web Toolkit
I just noticed this as well with setting the font size of buttons. If
you create a new GWT 1.6 project in eclipse and in the CSS file you
change the following

.sendButton {
display: block;
font-size: 16pt;
}

to

.sendButton {
display: block;
font-size: 24pt;
}

The font size does not change because .gwtButton in standard.css sets
the font-size.

Any help appreciated

Thanks

Jaap

Jeff Chimene

unread,
Apr 13, 2009, 6:45:59 PM4/13/09
to Google-We...@googlegroups.com

I usually solve this using !important rules
(http://www.w3.org/TR/CSS2/cascade.html#x11). There are other methods,
e.g. declaring your own classes that build on the GWT.

Jeff Chimene

unread,
Apr 13, 2009, 6:50:32 PM4/13/09
to Google-We...@googlegroups.com
On 04/13/2009 03:31 PM, Jaap wrote:

OTOH, !important rules shouldn't be necessary. Perhaps there's something
else wrong here...

Vitali Lovich

unread,
Apr 13, 2009, 7:03:52 PM4/13/09
to Google-We...@googlegroups.com
If in Firebug it gives the element style, then that means your style is being set explicitly in the code & you have to use !important.  Otherwise, you've got some other problem.

Thomas Broyer

unread,
Apr 13, 2009, 7:08:14 PM4/13/09
to Google Web Toolkit
Reply all
Reply to author
Forward
0 new messages