Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.
This object is in archive! 

Paper Lantern - Add Webmail Body Class

Jo Stonehouse shared this idea 8 years ago
Completed

Could we get a class added to the body tag, when we're in webmail?


i.e.


<body id="cpanel_body" class="webmail">


We'd like to apply a slightly different style in the navbar in the 'webmail' view to what we have in the 'cpanel' view. At the moment there is no way to differentiate between the two.


Hopefully a simple feature change.


Thank you.

Replies (3)

photo
2

I voted for this as it seems like a good thing to have if you are creating cutom styles.

photo
1

This should even be more general. Each page should have a page type body class for pages that match html layout-wise and a unique body class for each individual page so styles can be targeted to groups of pages with the same layout or more specifically to an individual page if needed.

photo
1

Starting in v60 (upcoming 2016 fall release), we've added exactly this.


  1. .webmail { background-color: red;}
  2. .cpanel { background-color: blue;}


In the cPanel end-user interface, we've also added each application's "appkey" as the ID on the BODY tag as well, so that you can target styles specifically to individual applications.


    #site_publisher h1, #site_publisher h2 { color: red; }

The list of 'appkeys' is available at https://documentation.cpanel.net/display/SDK/Guide+to+cPanel+Interface+Customization+-+Appkeys

photo
1

Forgot to mention, this is available in our EDGE release (v59) right now if you want to start using it.

Replies have been locked on this page!