Is this a method that exists, or a proposed one? Yeah, something like that would work, although you typically want to injectBefore an element, either a <style> or <link> element, because of the way CSS cascading works, the later style elements have higher priority. Typically, I'd want to inject before the first link/style element to make my injected style the lowest priority. Another typical use is 'reset' style sheets. Alot of times in GWT, you'll try and integrate with an existing site which has its own CSS which targets TABLE/TR/TD by element name with some margin/padding, which tends to screw up some of the fancier GWT widgets, and the fix for that is usually to inject a 'reset' style sheet which forces some elements back to their browser defined defaults.
(ok, the real fix is to make the GWT themes use selectors with higher priority and be sure to define the needed margins/padding by all child elements of a complex element, like a DecoratorPanel.) On Wed, Mar 25, 2009 at 7:59 PM, BobV <b...@google.com> wrote: > > On Wed, Mar 25, 2009 at 7:57 PM, Ray Cromwell <cromwell...@gmail.com> > wrote: > > Awesome. With regards to StyleInjector, one feature I'd ask for is the > > ability to control where in the cascade it injects. For example, I use > IRB > > in Chronoscope to inject GWT widget Themes, but what happens is, this > > overrides any themes the user has included via <style> tags or > <stylesheet> > > module elements, because it occurs last in the stylesheet order, which > makes > > it difficult for others to selectively override IRB injected styles > (without > > annoyingly liberal usage of !important) > > Do you mean like > > StyleElement StyleInjector.injectAfter(StyleElement before, String text); > > -- > Bob Vawter > Google Web Toolkit Team > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---