Branding stylesheet logo image - target requires "Resolve css variables"

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
Psider
Propellus Maximus
Posts: 845
Joined: Wed Jul 06, 2011 1:32 am

Branding stylesheet logo image - target requires "Resolve css variables"

Post by Psider »

To help anyone in future, if you are using branding stylesheets with brand logos then you should tick the "Resolve CSS variables (recommended)" checkbox in the target's Advanced tab.

I'll describe what happens in the output for ticked and unticked scenarios.

HTML5 output using branding css and side navigation skin.

1. Unticked. A file is generated into the Skins\Fluid\Stylesheets\Images folder called "var(--LogoImage)" (no extension, just the variable name). Everything looks fine running locally on Windows (11). Uploading to a server, no image displays in the header.

2. Ticked. A file is generated into the same folder as above. It is the correct image (with name and extension) referenced in the branding stylesheet. It works locally and on the server.

(Interestingly, the file created in scenario 1 is actually the correct image, it just doesn't have the right name or extension. So it feels like a bug when the Advanced tab setting is not enabled.)
Psider
Propellus Maximus
Posts: 845
Joined: Wed Jul 06, 2011 1:32 am

Re: Branding stylesheet logo image - target requires "Resolve css variables"

Post by Psider »

I should also clarify that when looking at the Styles.css file generated in the Skins\Fluid\Stylesheets folder, the background property has been set to :

background: transparent url('path/var(--LogoImage)') no-repeat center center;

which feels wrong, although I'm unsure how variables are supposed to work in this case. I need to do more research. :)
AlexFox
Sr. Propeller Head
Posts: 214
Joined: Thu Oct 19, 2017 1:56 am

Re: Branding stylesheet logo image - target requires "Resolve css variables"

Post by AlexFox »

Can you share your :root declaration for that variable?
Psider
Propellus Maximus
Posts: 845
Joined: Wed Jul 06, 2011 1:32 am

Re: Branding stylesheet logo image - target requires "Resolve css variables"

Post by Psider »

I created a fresh project using the Austin Tutorial template and simply unticked the "resolve" checkbox. So it's exactly as MadCap set it up. --LogoImage: url('../Images/Styles/Austin-Logo-Online.png');
NorthEast
Master Propellus Maximus
Posts: 6389
Joined: Mon Mar 05, 2007 8:33 am

Re: Branding stylesheet logo image - target requires "Resolve css variables"

Post by NorthEast »

Yep, I can reproduce this. I'm quite glad I only use CSS variables for things like colours and sizes in my skins.

That's a pretty bad bug, considering "Resolve CSS variables" is not set by default for new targets, and most people shouldn't need to set it unless they have to support IE11.

As branding and CSS variables were the two main features in 2023R2, you'd think this would've been tested a bit more thoroughly.
Psider
Propellus Maximus
Posts: 845
Joined: Wed Jul 06, 2011 1:32 am

Re: Branding stylesheet logo image - target requires "Resolve css variables"

Post by Psider »

I've just submitted a bug report for it. I'll try to remember to post back if/when I hear back.
AlexFox
Sr. Propeller Head
Posts: 214
Joined: Thu Oct 19, 2017 1:56 am

Re: Branding stylesheet logo image - target requires "Resolve css variables"

Post by AlexFox »

Psider wrote: Mon Aug 05, 2024 11:58 pm I've just submitted a bug report for it. I'll try to remember to post back if/when I hear back.
Someone needs to set up a public bug tracker we can all contribute to as MadCap won't ever divulge what has or hasn't been reported :cry:
Psider
Propellus Maximus
Posts: 845
Joined: Wed Jul 06, 2011 1:32 am

Re: Branding stylesheet logo image - target requires "Resolve css variables"

Post by Psider »

Support has logged a bug report for this issue for me. Number 184710.
Post Reply