Runtime Skins bootstrapping Content Styling?

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets

Runtime Skins bootstrapping Content Styling?

Postby Paul Griffiths on Tue Jun 18, 2019 5:31 am

Runtime Skins is an established feature that allows the reader to switch skins on-the-fly in a deployed Help system. For example, from one colour scheme to another.

I'm wondering if there's any way I can exploit (hack) this feature to change the colour scheme of the content too (e.g. H1 color, table cell background color, etc).

I'm floating this idea in case someone can immediately shoot it down and thereby save me a fruitless attempt at a proof of concept.

Cheers
Paul Griffiths
Sr. Propeller Head
 
Posts: 244
Joined: Wed Apr 18, 2007 2:25 am
Location: Nottingham, UK

Re: Runtime Skins bootstrapping Content Styling?

Postby Dave Lee on Tue Jun 18, 2019 8:01 am

Yep, it should be fairly easy to do.

The skin's name is included as a class on the html tag, such as "_Skins_YourSkinName" (at least when using a HTML5 top nav skin).
You can see this if you press F12 in your browser (to open developer tools), and look at the html tag.

So that means you could set up your CSS based on the skin's class name.

For example, to make the h1 red with a particular skin, you could use something like:

Code: Select all
html._Skins_YourSkinName h1
{
   color: red;
}
Dave Lee
Master Propellus Maximus
 
Posts: 5657
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Runtime Skins bootstrapping Content Styling?

Postby Paul Griffiths on Thu Jun 20, 2019 12:35 am

Thanks Dave.

Must admit I had assumed this would not be possible! Now for the PoC.

Cheers
Paul Griffiths
Sr. Propeller Head
 
Posts: 244
Joined: Wed Apr 18, 2007 2:25 am
Location: Nottingham, UK


Return to Web-based Outputs

Who is online

Users browsing this forum: No registered users and 4 guests