Using online CSS file with https protocol yields warning

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
djohnson
Propeller Head
Posts: 38
Joined: Tue May 24, 2011 4:23 pm

Using online CSS file with https protocol yields warning

Post by djohnson »

I am one of those sticklers; if I see a warning when I edit or build my output I want to know why, and fix it.

Recently I had my hosting switched over to use secure https protocol instead of http (multiple reasons but the straw that did the breaking was that builds on MadCap Central--that uses https--could not access my hosted stylesheets referenced using http)

My project stylesheet (Styles.css) starts off:

Code: Select all

@import url("https://help.example.com/stylesheets/helpfonts.css");
Styles.css is the master stylesheet, and I am not allowing local stylesheets.

The helpfonts.css stylesheet loads corporate webfonts using @fontface. I use this method to load the webfonts because the corporate styles change occasionally (approximately annually) and I'd just as soon change one stylesheet as all of them.

Previously, when I used http to load the corporate stylesheet

Code: Select all

@import url("http://help.example.com/stylesheets/helpfonts.css");
all was right with my built and hosted projects, with nary a peep about missing stylesheets.

Now, whenever I edit a page in the XML editor, or build a project, I get this warning:
CSS: CSS: Missing imported CSS stylesheet https://help.example.com/stylesheets/helpfonts.css
The warning appears twice during edits and builds, but my actual build is using the correct, hosted font specified in helpfonts.css.

= = =

As I mentioned, this does not seem to affect the output but having a warning message to me is a yellow flag bordered with red: it could indicate a problem waiting to happen when I do something else. At the very least, I can tell at a glance in my Builds panel (0 errors) if all is right; if there are warnings, then I have to look.

Does anyone have any suggestions?

(I'm running Flare 2017 r3 on Windows 10, running in a VM on macOS 10.13. I'm hoping this isn't some weird issue with networking inside the VM!)
Don Johnson
Flare 2020r3, Windows 10 in a Parallels VM on a 16" MacBook Pro [as of March 2021]
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Using online CSS file with https protocol yields warning

Post by NorthEast »

You could include helpfonts.css in your project, rather than an external URL. And if you use this CSS file in lots of projects, you could share it across projects via a Project Import (global project linking) or External Resources.

I don't use any external stylesheet links, but you *might* be able to bypass Flare's CSS parser and stop the error messages by including the external stylesheet link in a master page. If you try that, you'd have to allow local stylesheets in the target.
Post Reply