Media queries producing CSS errors on compilation

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
ruthhoward
Sr. Propeller Head
Posts: 121
Joined: Tue Jul 24, 2012 12:38 am

Media queries producing CSS errors on compilation

Post by ruthhoward »

This is from the command line only.

I have targets with "10015 - CSS parser error" turned ON to report problems with the CSS. If I compile from the GUI no errors are reported.

But through the command line I get this error out:

Code: Select all

     [exec] CSS Parser: file:///C:/Perforce/techcomm/AccelrysRegistration/trunk/src/Content/Resources/Stylesheets/accl_help.css Line: 1539. Char: 18. Bad token in selector: (
My CSS contains this on line 1539

Code: Select all

@media screen and (min-width:481px)
{

	.nav
	{
		vertical-align: top;
		padding-left: 6pt;
		padding-right: 6pt;
		padding-top: 6pt;
		padding-bottom: 6pt;
		width: 95%;
		overflow: auto;
	}

	.nav div
	{
		display: block;
		float: left;
		width: 33%;
		vertical-align: top;
	}

}
This is only for one project - I have another with the exact same CSS and target settings which is not producing any errors for compilation either from the GUI or command line.

what's more I'm getting this error for PDF targets - why are they even reading "@media screen"?

I can't figure out what Flare thinks is wrong with that. Any ideas anyone?

Thanks
Ruth
ruthhoward
Sr. Propeller Head
Posts: 121
Joined: Tue Jul 24, 2012 12:38 am

Re: Media queries producing CSS errors on compilation

Post by ruthhoward »

see also this post:
http://forums.madcapsoftware.com/viewto ... 48#p104648
I'm seeing the same issue in Flare 10. I have a media query:

Code: Select all

@media screen and (min-width: 481px)
{
	.nav
	{
		vertical-align: top;
		padding-left: 6pt;
		padding-right: 6pt;
		padding-top: 6pt;
		padding-bottom: 6pt;
		width: 95%;
		overflow: auto;
	}

	.nav div
	{
		display: block;
		float: left;
		width: 33%;
		vertical-align: top;
	}
}

@media screen and (max-width: 480px)
{
	.nav
	{
		vertical-align: top;
		padding-left: 6pt;
		padding-right: 6pt;
		padding-top: 6pt;
		padding-bottom: 6pt;
		width: 95%;
		overflow: auto;
	}

	.nav div
	{
		display: left;
		padding-left: 10pt;
		float: left;
		vertical-align: top;
		position: relative;
	}
}
(I've also tried the exact CSS from MadCap Mike Hamilton's here:
http://assets.madcapsoftware.com/webina ... Design.pdf)

but I just get this error:

Code: Select all

CSS Parser: file:///[path]/help.css Line: 1549. Char: 18. Bad token in selector: (
character 18 is the end of the "and" so I'm assuming its complaining about the brace. Nothing wrong with it as far as I can see.

I only see this from the command line and not for all projects (although they all have the same CSS). For one project I have a linked CSS which uses a selector with a pseudo class - which isn't yet supported although it works - so I get a complaint about that and then nothing about the core CSS's media query.

Another target has no other errors at all. I've tried copying the CSS from the error-less project into the erroring one but it still reports the same issue. I have CSS Parser error reporting turned on in all projects and all targets, I'm not turning it off because (of course) I want to be warned if there are genuine errors.

I see this error as it begins to compile a target - before "Removing previously generated content...".

Anyone got any ideas? The error doesn't cause the build to return an error code but its messy and I don't like it and I don't like not understanding why I see it sometimes but not always.

thanks
Ruth
jbrock
Propeller Head
Posts: 47
Joined: Tue Jul 13, 2010 12:20 pm
Location: 39047
Contact:

Re: Media queries producing CSS errors on compilation

Post by jbrock »

I've never been able to get the media queries to work. Before I build, I usually compile all my CSS into one file.

It's a bit of a headache on the development side, but that single HTTP call saves a little on load time over pulling multiple CSS I think.
Justin Brock
SEO Strategist at Bomgar
(former Technical Writer)

Flarestrap | Madcap Flare SEO
My Madcap Flare site
Twitter
LinkedIn
Post Reply