I read that page. It doesn't provide enough context for me to understand it.
I don't want to replace a stylesheet at run time; I want to replace a single style. Rule? Is that the right word? Whatever is between the { and } in a CSS file, I want to change that for an element. I need to do it dynamically, with a rule read from a database based on run time data.
On Thursday, May 15, 2014 1:50:20 PM UTC-5, Bu Pereira wrote:
-- I don't want to replace a stylesheet at run time; I want to replace a single style. Rule? Is that the right word? Whatever is between the { and } in a CSS file, I want to change that for an element. I need to do it dynamically, with a rule read from a database based on run time data.
On Thursday, May 15, 2014 1:50:20 PM UTC-5, Bu Pereira wrote:
Stylesheet is a CSS. A set of rules applicable to the page you're dealing with.
This explanation seems really simple
https://code.google.com/p/google-web-toolkit/wiki/ StyleInjector
Hope it helps.
On Thu, May 15, 2014 at 11:47 AM, <eho...@usdataworks.com> wrote:
> I don't understand what most of that means.
>
> Where and how would I wrap "this" as a CSS rule?
>
> What stylesheet are you talking about?
>
> Is there a tutorial or something for this? I've found several pages that
> mention StyleInjector, but they all seem to rely on knowledge I don't yet
> have.
>
> Thanks for trying to help.
>
>
> On Thursday, May 15, 2014 10:48:46 AM UTC-5, Thomas Broyer wrote:
>>
>> You could probably wrap this as a CSS rule: ".somethingRandom {" +
>> userProvidedCSS + "}" and then use the StyleInjector to inject that
>> stylesheet, and finally call addStyleName on the Element or Widget to apply
>> the rule.
>>
>> On Thursday, May 15, 2014 4:54:30 PM UTC+2, eho...@usdataworks.com wrote:
>>>
>>> I've figured out how to change CSS properties using
>>> Element.getStyle().setSomething(), but I need to replace an entire CSS style
>>> on the fly. I want my users to be able to supply their own CSS for certain
>>> widgets and have GWT replace the current CSS with their user defined CSS.
>>>
>>> So instead of asking a user for background image, background repeat,
>>> background size, etc, the user just pastes in
>>>
>>> background-size:100% 100%;
>>> background-repeat: no-repeat;
>>> background-image: url(some_image.jpg);
>>>
>>> Is there a way to do this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscribe@googlegroups.com .
> To post to this group, send email to google-we...@googlegroups.com .
> Visit this group at http://groups.google.com/group/google-web-toolkit .
> For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment