Skip to main content
Inspiring
October 22, 2020
Question

Error! Failed to parse the stylesheet

  • October 22, 2020
  • 6 replies
  • 1355 views

Receive the above error when attempting to open one of my stylesheets. Will only open the stylesheet in "true code" view/editor.

 

Running RoboHelp 2020.1

 

This error didn't occur in RoboHelp 2019.14 New

 

I've identified the code that causes the error (if I remove it, the stylesheet opens in the user-friendly CSS editor):

 

 

/*  SECTIONS  */
.section {
	clear: both;
	padding: 0px;
	margin: 0px;
}
/*  COLUMN SETUP  */
.col {
	display: block;
	float:left;
	margin: 1% 0 1% 1.6%;
}
.col:first-child { margin-left: 0; }
/*  GROUPING  */
.group:before,
.group:after { content:""; display:table; }
.group:after { clear:both;}
.group { zoom:1; /* For IE 6/7 */ }
/*  GRID OF THREE  */
.span_3_of_3 { width: 100%; }
.span_2_of_3 { width: 66.13%; }
.span_1_of_3 { width: 32.26%; }
/*  GO FULL WIDTH BELOW 480 PIXELS */
@media only screen and (max-width: 480px) {
	.col {  margin: 1% 0 1% 0%; }
	.span_3_of_3, .span_2_of_3, .span_1_of_3 { width: 100%; }
}

 



I use this to generate 3-column responsive grids on "mini-home page" topics.

 

  1. I want to continue to be able to use this style.
  2. I want the stylesheet it's in to be visible/editable in the RH2020 user-friendly CSS editor.
  3. I DON'T need to be able to view or edit any part of the 3-column responsive grid styles in the user-friendly CSS editor.

 

Since the responsive grid style isn't used pervasively throughout my project, I suppose one option is to move the grid style out of my main CSS and into a standalone CSS that's used for just home page/mini-home page topics. However, RoboHelp 2019.14 handled this same CSS just fine, so I'd prefer to just have one CSS. With that in mind, maybe this is a bug? Thoughts? 

 

*Edit: To be clear, the CSS functions correctly in the output (frameless) and even in the RH 2020 topic editor + preview functions (if/when the style is used in a topic). It's just the RoboHelp 2020 user-friendly CSS editor that can't function/handle it.

This topic has been closed for replies.

6 replies

Peter Grainge
Community Expert
Community Expert
December 10, 2021

From the instances of the failure to parse a CSS file I have seen, try commenting out any media styles.

/* before the definition

*/ after it

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Inspiring
December 10, 2021

I am running Robohelp 2019.0.14 and am getting the "Failed to parse the stylesheet' error.  How can I identify what the offending code is?   Is it in red?

RoboFanAuthor
Inspiring
October 26, 2020

Thanks for narrowing it down!

 

Logged bug RH-8305

Community Expert
October 25, 2020

It looks like the @media statement isn't handled by the RH2020 css editor.

 

I tried adding @media print {body {font-size: 11px;} } and got the same error using RH2020.2.29.

 

The same code doesn't throw an error in RH2019 update 12.

RoboFanAuthor
Inspiring
October 22, 2020

Yeah, I saw that. I JUST finished upgrading 13 RH2017 projects to RH2020 this week, cleaning up some issues in each of those, moving them from RoboSource Control to Git, and then providing access to the rest of our doc team.

 

I'm a little nervous rolling out an update that's hot off the presses. I want to avoid having to rollback to 2020.1 and re-set up 15 connection profiles (speaking of which, it'd be great if you could somehow backup and restore connection profiles for just that use-case). 

 

I suppose I can install 2020.2 on a test machine and run a copy of one of my projects through it to see. 

Peter Grainge
Community Expert
Community Expert
October 22, 2020

Update 2 is out. 

 

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.