Is posible to get value from CSS to vaadin?

Hi everybody!

I´m stucked in problem with components reattach after iPhone/iPad rotation. I read some forum threads but withnout complete solution. Problem maybe is generaly in my application design and fact that iOS
do not
screenWidth and screenHeight
values after rotation (as android devices do). Please read my idea below and let me know If is there any hope with whis workaround :wacko:.

I have defined different value for landscape/portrait mode in CSS:

@media only screen and (device-width:768px)and (orientation:portrait){
	/*iPad Portrait orientation styles */
	.iPad_width {
	background: #f00; /* red */

@media only screen and (device-width:768px)and (orientation:landscape){
	/*iPad landscape orientation styles */
	.iPad_width {
	background: #00f; /* blue */

I had an idea to define some UI compoment (without adding it to layout) → setStyleName(“iPad_width”) → and after that from some component getter get some value to know device orientation, somethnig like this:

Label widthPanel = new Label();

I can see changing background color afrter rotation immediately, but getter to component color seems to not exists. Width setting in CSS does not working (as i read somewhere on forum).

Is here some component with both CSS option and getter in java…? Or can I make this with customcomponent?

While there probably would be a better solution for your specific iOS rotation problem, you could also check out if the
Css Tools add-on
can help.

Thank you very much! -_- This addon solved my problem.