@import stylesheet generating errors

This forum is for all Flare issues related to styles, stylesheets and XML.

@import stylesheet generating errors

Postby ajpeck123 on Mon Sep 30, 2019 2:54 am

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 2017
ajpeck123
Propeller Head
 
Posts: 30
Joined: Tue Mar 07, 2017 6:01 am

Re: @import stylesheet generating errors

Postby Dave Lee on Mon Sep 30, 2019 3:35 am

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
Dave Lee
Master Propellus Maximus
 
Posts: 5790
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: @import stylesheet generating errors

Postby wclass on Tue Oct 01, 2019 2:14 am

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
wclass
Propellus Maximus
 
Posts: 1233
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: @import stylesheet generating errors

Postby Dave Lee on Tue Oct 01, 2019 2:40 am

The quotes don't matter, it was in the wrong format - either include url, or get rid of the brackets.
Dave Lee
Master Propellus Maximus
 
Posts: 5790
Joined: Mon Mar 05, 2007 8:33 am
Location: UK


Return to Styles, Stylesheets and XML

Who is online

Users browsing this forum: No registered users and 5 guests

cron