@import stylesheet generating errors

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
ajpeck123
Propeller Head
Posts: 37
Joined: Tue Mar 07, 2017 6:01 am

@import stylesheet generating errors

Post by ajpeck123 »

Hi.

In an effort to not confuse myself, I've separated the formatting for the online help from that for the manual (in help.css and manual.css respectively).
It keeps the help.css file smaller and means the GUI developers (who may have to tweak the styles) are only affecting those used in the help.
I attach the relevant stylesheet to the target, depending on what type it is.
So far so good.

To enable me to see both sets of styling when I'm editing, I have a top-level stylesheet attached to the project called styles.css, which only has two entries:
@import ("manual.css");
@import ("help.css");

Every time I build a project, there is an error message in the logs. It says (I've removed the full path):
...\styles.css Line: 1. Char: 8. Missing string or uri
...\styles.css Line: 1. Char: 22. Invalid token (;)
...\styles.css Line: 2. Char: 8. Missing string or uri
...\styles.css Line: 2. Char: 20. Invalid token (;)

I'm inclined to ignore, as it appears to work fine... but the Release Engineer (who build the output from the Flare source I provide) is less convinced. :)

Does this esteemed group tend to agree with me? As it's primary (and I believe, only) use is within the editor, I don't see an issue...

Thanks,

Alison
Alison
Lone technical author - Flare user since March 2017
Currently using Flare 2020
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: @import stylesheet generating errors

Post by NorthEast »

You're getting errors because the format is incorrect; it should be:

@import url("file.css");

or

@import "file.css";

https://www.w3schools.com/cssref/pr_import_rule.asp
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: @import stylesheet generating errors

Post by wclass »

Just for an example, we use the following syntax without errors - uses a single rather than a double quotes, which I believe should not matter:

@import url('main-styles.css');
@import url('local.css');
Margaret Hassall - Melbourne
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: @import stylesheet generating errors

Post by NorthEast »

The quotes don't matter, it was in the wrong format - either include url, or get rid of the brackets.
Post Reply