Skip to main content
Tejas Dandekar
Inspiring
October 23, 2018
Answered

RH2017 - Applying styles to snippet

  • October 23, 2018
  • 1 reply
  • 658 views

I have around 50 snippets with few lines of text in it. As part of the branding, we are changing the font style and size. How can I define a style and apply to all snippets?

When I edit a snippet and define a style it gets applied to only the selected snippet. I want to apply it to all.

I am not able to apply a style defined in the master page to the snippet. Any pointers?

This topic has been closed for replies.
Correct answer Peter Grainge

Whilst you can apply a CSS to a snippet, if the topic CSS and the snippet CSS both have the same style names, topic CSS wins. So if the P tag is 10pt Verdana in topic CSS and in snippet it is 11pt Times, in the output both will be 10pt Verdana. The trick is to use classes such as p.snippet and use unique names.


See www.grainge.org for free RoboHelp and Authoring information.

@petergrainge

1 reply

Community Expert
October 23, 2018

You can apply a stylesheet to a snippet using the Properties dialog box. Then you can select styles as normal.

Do note that if you are changing the font style and size in  your regular stylesheet, then the snippets will get those automatically in the output. For example, if you change your Normal style to be Arial Black 15pt, then any plain paragraphs in your snippets will display display in Arial Black 15pt in the output.

Peter Grainge
Community Expert
Peter GraingeCommunity ExpertCorrect answer
Community Expert
October 25, 2018

Whilst you can apply a CSS to a snippet, if the topic CSS and the snippet CSS both have the same style names, topic CSS wins. So if the P tag is 10pt Verdana in topic CSS and in snippet it is 11pt Times, in the output both will be 10pt Verdana. The trick is to use classes such as p.snippet and use unique names.


See www.grainge.org for free RoboHelp and Authoring information.

@petergrainge

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

I made the assumption that the standard topic css would be applied. I wouldn't recommend a separate css for the snippets.