Cant firgure out CSS Parser error

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Cant firgure out CSS Parser error

Post by chuck_agari »

I'm trying to import 2 externally hosted typefaces in my CSS, and I'm getting the following error:

CSS Parser: https://use.fontawesome.com/releases/v5.1.0/css/all.css Line: 5. Char: 2046. Missing left brace ({)

The first several lines of my CSS:

@import url('http://fonts.googleapis.com/css?family=Open+Sans');
@import url('https://use.fontawesome.com/releases/v5.1.0/css/all.css');

body {
font-size: 100%;
}

I got the error only after I added the link to fontawesome. I can comment out that line and the error goes away. But I can see no difference (besides the obvious one pointing to two different resources) between the two lines, so I'm having trouble figuring out why the 2nd line is causing the error. (It's pretty clear to me that the problem is NOT on "Line: 5".)
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Cant firgure out CSS Parser error

Post by Psider »

I wonder if it's having a fit about all.css? In that stylesheet, line 5 is the last line.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Cant firgure out CSS Parser error

Post by NorthEast »

The CSS parser message says the error is line 5 in the all.css file.

You could just have a link to the font awesome CSS from your master page instead of using @import - then Flare won't attempt to parse the font awesome CSS.
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Cant firgure out CSS Parser error

Post by chuck_agari »

Thanks for the tips. (I posted only a fragment of my own CSS, BTW).

We use Font Awesome for some glyphs. I think I'm going to see if I can just import the glyphs that we'll be using. If I'm figuring out the instructions on their page correctly, I can, which as it turns out would be better because if I import everything, each glyph turns out to be a style I can apply in the Styles list, which is...not optimal.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Cant firgure out CSS Parser error

Post by NorthEast »

chuck_agari wrote:Thanks for the tips. (I posted only a fragment of my own CSS, BTW).

We use Font Awesome for some glyphs. I think I'm going to see if I can just import the glyphs that we'll be using. If I'm figuring out the instructions on their page correctly, I can, which as it turns out would be better because if I import everything, each glyph turns out to be a style I can apply in the Styles list, which is...not optimal.
I use font awesome. I have a link to FA's stylesheet from my master page, and I don't see any of the FA styles in Flare's styles list.
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Cant firgure out CSS Parser error

Post by chuck_agari »

Dave Lee wrote:
chuck_agari wrote:Thanks for the tips. (I posted only a fragment of my own CSS, BTW).

We use Font Awesome for some glyphs. I think I'm going to see if I can just import the glyphs that we'll be using. If I'm figuring out the instructions on their page correctly, I can, which as it turns out would be better because if I import everything, each glyph turns out to be a style I can apply in the Styles list, which is...not optimal.
I use font awesome. I have a link to FA's stylesheet from my master page, and I don't see any of the FA styles in Flare's styles list.
How? When I added

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5 ... /solid.css" integrity="sha384-S2gVFTIn1tJ/Plf+40+RRAxBCiBU5oAMFUJxTXT3vOlxtXm7MGjVj62mDpbujs4C" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5 ... wesome.css" integrity="sha384-0b7ERybvrT5RZyD80ojw6KNKz6nIAlgOKXIcJ0CV7A6Iia8yt2y1bBfLBOwoc9fQ" crossorigin="anonymous">

In the <head>

</head>

section of a test master page, Flare complained of invalid syntax.
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Cant firgure out CSS Parser error

Post by Nita Beck »

SIDEBAR: You might find this recorded webinar useful: https://www.madcapsoftware.com/webinars ... e-outputs/. (It's a few years old at this point, but still worth the time to watch.) If I recall correctly, Mike Kelley covers two different ways to use Font Awesome in Flare projects.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Cant firgure out CSS Parser error

Post by NorthEast »

chuck_agari wrote:How? When I added

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5 ... /solid.css" integrity="sha384-S2gVFTIn1tJ/Plf+40+RRAxBCiBU5oAMFUJxTXT3vOlxtXm7MGjVj62mDpbujs4C" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5 ... wesome.css" integrity="sha384-0b7ERybvrT5RZyD80ojw6KNKz6nIAlgOKXIcJ0CV7A6Iia8yt2y1bBfLBOwoc9fQ" crossorigin="anonymous">

In the <head>

</head>

section of a test master page, Flare complained of invalid syntax.
Flare uses XHTML, not HTML, so all tags need to be closed - so you need to have /> at the end of those link tags.

XHTML vs HTML: https://www.w3schools.com/html/html_xhtml.asp
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Cant firgure out CSS Parser error

Post by chuck_agari »

Dave Lee wrote:
chuck_agari wrote:How? When I added

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5 ... /solid.css" integrity="sha384-S2gVFTIn1tJ/Plf+40+RRAxBCiBU5oAMFUJxTXT3vOlxtXm7MGjVj62mDpbujs4C" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5 ... wesome.css" integrity="sha384-0b7ERybvrT5RZyD80ojw6KNKz6nIAlgOKXIcJ0CV7A6Iia8yt2y1bBfLBOwoc9fQ" crossorigin="anonymous">

In the <head>

</head>

section of a test master page, Flare complained of invalid syntax.
Flare uses XHTML, not HTML, so all tags need to be closed - so you need to have /> at the end of those link tags.

XHTML vs HTML: https://www.w3schools.com/html/html_xhtml.asp
D'oh!
jimgilliam
Propeller Head
Posts: 81
Joined: Tue Jun 04, 2013 9:49 am
Location: Arkansas, U.S.A.

Re: Cant firgure out CSS Parser error

Post by jimgilliam »

I think this has changed now and Flare parses (or semi-parses?) a linked stylesheet. I attempted to link to Bootstrap 5, and during a preview or build, Flare instantly tells me something is invalid with the CSS. Maybe because it's minified? I don't know, but I have not been successful linking to any trustworthy companies like Bootstrap or Foundation. I see why with Foundation, but Bootstrap too?

Jim
:flare:
Post Reply