Targeted CSS Selectors
Many things can be customized very precisely by the use of smart CSS selectors.
To that extent you can leverage the CSS classes that b2evolution adds to the
For example the homepage may have:
But if you go to a specific article page, you may have:
disp_front changed to
disp_single : you can use that to have specific CSS styles for article pages.
Also not that
item_none changed to
item_49 : you can use that if you need specific CSS styles for the article with ID 49.
Now if the same page is viewed by a logged in user you may have:
anonymous changed to
loggedin. We also know the User Group of the logged in User:
Considerations about Page Caching
When Page Caching is on, you will get a
page_cached class. Otherwise you will get
Note that when a User is logged in, the page will never be cached to prevent leaks of personal information.
Also note that when a page is cached (on the server), it is not safe to consider it will always be viewed by the same browser / device. Therefore in that case you will always have
unknown_device. If you need to customize CSS based on the device type for anonymous users, we recommend you use CSS Media Queries.
Created by • Last edit by on Mar 27, 2018