Traditionally, Liferay has offered Themes as a solution to customize the experience and visual appearance of a site. While this works well in many cases, it presents unique challenges as well, being the most recurring the fact that UI administration controls inadvertently change as well, making themes harder to produce.
This is an obvious but unfortunate consequence of how HTML and CSS work, which makes applying styles really prone to bleeding into undesired components and causing undesired effects.
Below can be seen one a common approach to get the right styling for components and pages:
The goal of this task is to provide a mechanism to isolate administration interfaces from changes in a Liferay Theme.
We initially tried a similar approach with As an admin, I want to be able to deploy CSS and JS that affect all sites and pages independently of their theme. In there we focused on making sure that some CSS was always applied regardless of the theme. That approach differs from now in that if theme does not apply to components, we would not need to apply CSS on top to overwrite what the themes do.
- Specific administration components are not affected by the site theme
- Administration interfaces are always presented using the same (admin/classic) theme
- DXP offers a way for widget/taglib creators to mark their applications and components as "isolated"