Invalid line-height: inherit 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

Invalid line-height: inherit error

Post by chuck_agari »

I'm getting an error now that I have Font Awesome locally: CSS: Invalid line-height: inherit. I looked, and this property-value pair is in nearly every selector in the Font Awesome CSS file.

Actually, it's not quite so much an error as a message. Which opens up the Messages pane pretty much every time I'm working in the file, taking away screen real estate.

According to MDN, inherit is not a valid value for the line-height property. But I could not find anything about this on the W3C site, and CSS Lint did not flag it as an error. Which made me wonder if it's a newly allowed value that Flare has not caught up with yet.

Because it's not an error, I'm assuming that it's just being properly ignored by the parser, which is correct for CSS when there's an invalid value for a property, but the constant messaging is annoying. I've written the Font Awesome folks to get their take before I indulged my initial impulse: to just delete that property-value pair throughout the CSS file. But I'd like to hear from any CSS experts here who can give me some guidance.

thx
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Invalid line-height: inherit error

Post by Psider »

MDN lists it as a global value and Quirksmode says it should work for any property:
https://www.quirksmode.org/css/cascading/values.html

So it's probably a quirk with Flare and you should log a bug?
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Invalid line-height: inherit error

Post by NorthEast »

Try putting the CSS links to font awesome in your master page - I think that should bypass Flare's CSS parser, and stop the error message.
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Invalid line-height: inherit error

Post by chuck_agari »

Dave Lee wrote:Try putting the CSS links to font awesome in your master page - I think that should bypass Flare's CSS parser, and stop the error message.
I don't want it in my master page. It clutters up the Style pane with hundreds of styles, making it much harder to find and apply the styles I do use.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Invalid line-height: inherit error

Post by NorthEast »

chuck_agari wrote:
Dave Lee wrote:Try putting the CSS links to font awesome in your master page - I think that should bypass Flare's CSS parser, and stop the error message.
I don't want it in my master page. It clutters up the Style pane with hundreds of styles, making it much harder to find and apply the styles I do use.
Well, not really - it doesn't show the FA styles when you edit topics.
It only shows FA styles (and CSS parser errors) when you edit the master page itself, which isn't going to be so much of an issue.
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Invalid line-height: inherit error

Post by chuck_agari »

Dave Lee wrote:
chuck_agari wrote:
Dave Lee wrote:Try putting the CSS links to font awesome in your master page - I think that should bypass Flare's CSS parser, and stop the error message.
I don't want it in my master page. It clutters up the Style pane with hundreds of styles, making it much harder to find and apply the styles I do use.
Well, not really - it doesn't show the FA styles when you edit topics.
It only shows FA styles (and CSS parser errors) when you edit the master page itself, which isn't going to be so much of an issue.
Interesting. It appears that you're right, and I'm curious why that is.

Then again, before I created a new project, I hacked the Font Awesome CSS so that it contained only the glyphs I am using. None of them use that property, but if they did, I'd delete it from my hacked version.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Invalid line-height: inherit error

Post by NorthEast »

chuck_agari wrote:Interesting. It appears that you're right, and I'm curious why that is.
Yeah, the style list for topics will show styles from (a) stylesheets linked directly in that topic, and (b) the master stylesheet (of the current selected primary target).

The list doesn't seem to show styles for stylesheets linked from a master page - which is probably a bug, but means it's a handy way to hide styles from the list.

Flare desperately needs a better way to hide styles, especially when using 3rd party CSS like FontAwesome. You can disable styles in Flare (so they don't appear in the list), but that has serious bugs (doesn't work for any generic class), and isn't a practical method when you need to hide a few thousand styles.

I have to pin all styles that I use. Luckily you can copy the pinned styles list (Project\Users\your.name\PinnedStyles.xml) between users/projects.
cdschroeder
Sr. Propeller Head
Posts: 189
Joined: Mon Feb 22, 2016 9:18 am
Location: Cincinnati, OH

Re: Invalid line-height: inherit error

Post by cdschroeder »

I'm seeing this error too, but I don't have Font Awesome installed locally and I'm already linking to it via the masterpage.

I've done a project-wide source code search for "inherit" - no results. "line-height" returns exactly four results, all of which are valid.

Any ideas? I wouldn't be too concerned except that the message pops up with every edit made to the masterpage via the XML editor. And each time the message appears, Flare stops responding for about 10-30 seconds. :cry:
Casey

Image
Jbleasdale
Propeller Head
Posts: 58
Joined: Tue Mar 21, 2017 3:35 pm

Re: Invalid line-height: inherit error

Post by Jbleasdale »

I had this particular issue in my project.

In terms of the font awesome side of things, I just commented out the line-height declaration as we were not using it anyway.

At the time (and since) I reported it to Madcap. It's valid CSS, so Flare should not complain about it. I never actually got a reply about whether they viewed it as a bug or not. I should chase that.

I have also requested a better way of hiding styles, or even creating your own style clipboards in a more user friendly way. So I suggest others ask for this too which will increase the chances of it being done.

I have also requested the ability to mute messages and an update to the CSS parser so that it supports the most up to date CSS functions.
Joe Bleasdale

My Linkedin

Image
cdschroeder
Sr. Propeller Head
Posts: 189
Joined: Mon Feb 22, 2016 9:18 am
Location: Cincinnati, OH

Re: Invalid line-height: inherit error

Post by cdschroeder »

Jbleasdale wrote:In terms of the font awesome side of things, I just commented out the line-height declaration as we were not using it anyway.
The weird thing in my case is that I haven't even downloaded the Font Awesome stylesheet. I'm just linking to the online file via the masterpage. So I can't comment out the styles unless we decide to download and reference it locally. :|
Jbleasdale wrote:I have also requested a better way of hiding styles, or even creating your own style clipboards in a more user friendly way.
Jbleasdale wrote:I have also requested the ability to mute messages and an update to the CSS parser so that it supports the most up to date CSS functions.
Going to put in these feature requests right now!
Casey

Image
Post Reply