TextShadow won't apply

42 views
Skip to first unread message

Evan Ruff

unread,
Sep 7, 2011, 9:54:23 PM9/7/11
to google-we...@googlegroups.com
I think I might be going crazy. I have a Label element. I'm trying to apply a simple text shadow using:

myLabel.getElement().getStyle().setProperty( "textShadow", "#000 5px 5px 5px" );

and it does not show up.

I've also tried:

DOM.setStyleAttribute( myLabel.getElement(), "textShadow", "#FFF 5px 5px 5px" );

but still, I never get the shadow. If I apply "text-shadow" directly to the element using the Chrome dev tools, it displays as expected.

Why does GWT hate my textShadow property?

Any way around it?

Thanks!

Evan


Gal Dolber

unread,
Sep 8, 2011, 12:55:52 AM9/8/11
to google-we...@googlegroups.com
that should work,
why don't you use myLabel.getElement().getStyle().setProperty("textShadow", "...") ?


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/nEejhPMljCEJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

http://code.google.com/p/guit/




Gal Dolber

unread,
Sep 8, 2011, 12:56:17 AM9/8/11
to google-we...@googlegroups.com
never mind... 

Evan Ruff

unread,
Sep 8, 2011, 10:01:10 AM9/8/11
to google-we...@googlegroups.com
ANNNNNNND.... as usual, I'm an idiot.

I was adding a semi-colon to the end of the statement. 

myLabel.getElement().getStyle().setProperty( "textShadow", "#000 5px 5px 5px" );

works like a charm. 

myLabel.getElement().getStyle().setProperty( "textShadow", "#000 5px 5px 5px;" );

Doesn't apply.

Rookie mistake, sorry guys.

E
Reply all
Reply to author
Forward
0 new messages