Skip to main content
Participant
January 21, 2021
Beantwortet

How to stop Robohelp editing CSS file in output?

  • January 21, 2021
  • 4 Antworten
  • 512 Ansichten

Hey guys, first time posting to the forum so hope it's up to standard and I'm clear enough

 

Basically I'm adding CSS text animations using the @14668356 rule, it works perfectly in RoboHelp and when previewing the topic in a browser, but breaks once the project is generated 

 

So I had a look in my CSS file in the output and can see that RoboHelp has added its own bits to the code which breaks some of it

 

Specifically, this goes from

 

@14668356 colorRotate {
from {
color: #6666ff;
}

 

and becomes 

 

keyframes colorRotate {
.RH-LAYOUT-CENTERPANEL-topic-box from, .RH-LAYOUT-FOOTER-container from {
color: #6666ff;
}

 

Is there anyway to prevent Robohelp form editing my CSS files so that I can avoid it breaking on output? Otherwise I'll have to manually edit it after 😞 

 

Thanks!

-Dan

    Dieses Thema wurde für Antworten geschlossen.
    Beste Antwort von Peter Grainge

    The other thing to try is you can add a CSS to User Assets in the skin editor.

     

    That way the second definition of that style should override the first. Give that a try and see if it works. Let us know.

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

    4 Antworten

    Participant
    January 21, 2021

    Scratch my last comment - I misunderstood (it's been a long week)

     

    I've added an animations.css file both in the topic properties and in the skin as a user asset and it overrides the styles perfectly and works!

     

    Thanks for the suggestion @Peter Grainge  🙂

     

    All the best

    -Dan

    Participant
    January 21, 2021

    That does indeed work - however as the file is added in the output it means that the CSS isn't read while authoring 

     

    Therefore a workaround is to attach the CSS to the topic while authoring, then remove it before generating the Help system

     

    Still a slight overhead involved, but as long as it works! Would be nice to have an ignore flag in a future update so CSS files can be unedited during output 

     

    Thanks again and all the best

    -Dan

    Peter Grainge
    Community Expert
    Community Expert
    January 21, 2021

    The other thing to try is you can add a CSS to User Assets in the skin editor.

     

    That way the second definition of that style should override the first. Give that a try and see if it works. Let us know.

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

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Peter Grainge
    Community Expert
    Community Expert
    January 21, 2021

    Classic versions used to edit various files but I thought that wasn't the case with the New UI.

     

    You haven't said which you are using and the version. Is your version up to date?

     

    In the new UI you could try having two copies of the UI with one having the code you want linked to a master page, then specify that master page in the preset. Not sure if it will work but it's worth a try.

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

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

    Hey Peter, my bad, I'm using 2020.3.32, not too sure how master pages work but I'll have a read through your doc and give it a try

     

    I removed my CSS sheet from the topic properties, instead attahced it to a master page, then assigned that master page to the output and the topic but robohelp still appends the .RH-LAYOUT-CENTERPANEL property

     

    I assume that this is appended for the frameless output, as .RH-LAYOUT-CENTERPANEL is the name of the container for the topic content 

     

    Worst case scenario I'll just store any css that gets broken into a seperate file and paste that over the output, at most it's a bit of an inconvience, was just wondering if there was someway for RoboHelp to ignore certain files 

     

    Also, thanks for your swift response!

     

    -Dan