Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Dave Weitzel
detecting display size for Responsive theme designs
25 de Setembro de 2012 08:37
Resposta

Dave Weitzel

Ranking: Regular Member

Mensagens: 175

Data de entrada: 18 de Novembro de 2009

Mensagens recentes

I am converting some of our older themes to be responsive which is no small task.
however it would be really helpful if I could detect the size (eg <960 or < 480 ) inside the theme as well as through CSS so certain elements can be recoded.

Is there anyway that can be achieved?

realated to this I want to pass variable to the #breadcrumbs() velocity variable so they get processed by the liferay-ui taglib properly (showGuestGroup=false for instance) but cannot work out the right syntax to do this (if it is possible).

Thanks
Anônimo
RE: detecting display size for Responsive theme designs
25 de Setembro de 2012 17:38
Resposta

Anônimo

Hey Dave,

You can detect the size through native browser support for media-queries through CSS. I found this great article about it here: http://css-tricks.com/css-media-queries

About the "#breadcrumbs()" it's a velocity macro, you may want to manually embed the breadcrumbs portlet onto the page and pass in the paramaters through that.