No objections, just a thought that maybe this would feature would best
live in a utility class designed for managing element's CSS Classes.
--
Sandy McArthur
"He who dares not offend cannot be honest."
- Thomas Paine
I think your suggestion is fine and will suit current and future GWT
developers best.
However, the most problematic change to the whole style handling is
that in the current 1.4 RC 1 implementation, removeStyleName() throws
an IllegalArguementException if the last (base) style is to be
removed. IMO that is unfortunate in two ways:
1.) it breaks current applications to the point that they do not work
anymore (e.g. ours dies when an IllegalArguementException is thrown,
because in other context of the code it means that something went
terribly wrong)
2.) it leaves the checking whether the style to be removed is allowed
to be removed up to the caller
If removeStyleName() should not leave the className empty, then maybe
it should either just not remove the last style, or replace it with
the "gwt-nostyle" name. Maybe if setStyleName() is left as it was
before, so should removeStyleName().
I'm a bit late to the party here, but are you saying that the
following CSS is not cross-browser?
.myWidget.focused {
/* styles here */
}
It's been a while, but I could have sworn that syntax works.
Ian
--
Tired of pop-ups, security holes, and spyware?
Try Firefox: http://www.getfirefox.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.
To post to this group, send email to Google-Web-Toolkit-Contributors...@googlegroups.com
To unsubscribe from this group, send email to Google-Web-Toolkit-Contributor s-unsu...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit-Contributors?hl=en
-~----------~----~----~----~-- ----~----~------~--~---
So PushButton.pressed is treated as .pressed. This works fine until
you decide that you want to apply a different style to
ToggleButton.pressed.
http://www.quirksmode.org/css/multipleclasses.html
--
Mat Gessel
http://www.asquare.net/gwttk/
On 7/4/07, Ian Petersen <ispe...@gmail.com> wrote:
One of my widgets no longer works because of this change.
When the widget had some secondary style attached I could no longer
remove
that style by just using setStyleName. It took me an hour or so to
realize that the
behaviour changed this dramatically.
I sure wish it did. This unfortunately does not work on IE :(
On 7/4/07, Ian Petersen <ispe...@gmail.com> wrote:
On 7/2/07, Joel Webber <j...@google.com> wrote:
> If we had instead defined the style name like this:
>
> styleName = 'myWidget focused disabled'
>
> We would have no reliable way of specifying a rule like this:
>
> (.myWidget && .focused) { }
>
> (that's not valid CSS syntax, of course, but it's also inexpressible in a
> cross-browser manner)
I'm a bit late to the party here, but are you saying that the
following CSS is not cross-browser?
.myWidget.focused {
/* styles here */
}
It's been a while, but I could have sworn that syntax works.
Ian
--
Tired of pop-ups, security holes, and spyware?
Try Firefox: http://www.getfirefox.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.
To post to this group, send email to Google-Web-Toolkit-Contributors@googlegroups.com
To unsubscribe from this group, send email to Google-Web-Toolkit-Contributors -unsub...@googlegroups.com