Is it possible to use CSS Rem unit in GWT 2.0 layout system?

57 views
Skip to first unread message

Chak Lai

unread,
Aug 27, 2024, 4:54:35 PMAug 27
to GWT Users
Greetings,

Is it possible to use CSS Rem unit in GWT 2.0 layout system?

I have a legacy GWT project that uses GWT 2.0 layout system. The project has been upgraded to gwt-2.11.0 successfully. However, I notice the current Enum Style.Unit in the com.google.gwt.dom.client package does not include REM unit for CSS Viewport. I have trouble extend the project to mobile device or small screen.


Thanks.

Craig Mitchell

unread,
Aug 27, 2024, 11:55:02 PMAug 27
to GWT Users
You should be able to set it directly, something like this:

myPanel.getElement().getStyle().setProperty("margin", "rem(14%, 3%)");

Reply all
Reply to author
Forward
0 new messages