Skip to main content
Participating Frequently
February 6, 2008
Question

Snippets won't retain styles

  • February 6, 2008
  • 7 replies
  • 602 views
Hi,
I'm using RH 7 and trying to create a snippet both from scratch and by right-clicking a topic and using "Add to Snippet Library".

In both cases, the style sheet that I'm using for the project is not being applied to the snippet. When I try using the topic to create my snippet, I get the msg. "The style sheet <my custom style sheet.css> is outside of the current project and will not be shown in the Project Manager."

Originally, I thought that this might be due to some broken links because I accidently moved the folder containing my project to a different location (then moved it back). So, I started a new project and imported everything from my original project into the new one. But even with the new project I have the same problem.

Any ideas?
    This topic is closed to new replies. Start a new post to keep the conversation going.

    7 replies

    Peter Grainge
    Community Expert
    Community Expert
    April 28, 2008
    Let us know the result please.

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    April 28, 2008
    Ai. Good idea. Will do.
    Peter Grainge
    Community Expert
    Community Expert
    April 26, 2008
    Nice idea!

    Do you have to generate a printed output as well? If you do, check what happens there before you go too far. I have an uncomfortable feeling you would get one format throughout. Haven't tested.

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    April 25, 2008
    Found the solution to my problem: While Snippets only allow for standard styles by default, it is possible to simply enter a new style name in the style box. Since the Snippet does not recognize this style, it will show up with the "Normal" formatting. However, if this Snippet is placed in a topic that does recognize this style, then the formatting appears properly.

    For example, I use a style called "Title-2" which is similar to "Heading 2". In my Snippet, I enter "Title-2" as the style for my title heading. This title heading is not formatted properly in my Snippet. However, when I load this Snippet in a topic that does have the style "Title-2" defined, the formatting show up properly.

    Yeah!
    April 25, 2008
    I understand this discussion so far.

    However, when editing Snippets, it is possible to change the Style of the Snippet text. There are some basic/default/standard styles available. However, since the Snippets are not associated with any (custom) style sheet, non-basic/default/standard styles are not available.

    For example, my Snippets have a "Header 1", "Normal", "Header 2", "Normal" style, etc. for headings versus normal text. However, I have special formatting too, which I cannot apply in the Snippet (but which does appear in the topic that uses the Snippet).

    Is there some way to apply the topic's Styles to the Snippet?
    Peter Grainge
    Community Expert
    Community Expert
    February 7, 2008
    Welcome to the forum.

    Snippets do not link to a stylesheet. The idea is that they take on the stylesheet of whatever topic they appear in.

    If you always want them to appear with a particular style regardless of what topic they are in, for example if you are creating a warning and always want it have a red background, you need to apply inline styles. Embedded stylesheets don't work either. Inline styling only.

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    kdwsAuthor
    Participating Frequently
    February 7, 2008
    Thanks, yes, I finally figured this out. It would have saved me about 2 hours of time and a lot of fumbling if the online help had just mentioned that you need to save the snippet before you can drag it into your topic and have it 1) appear, and 2) use the style sheet that the topic uses.

    Maybe this is obvious, but it sure wasn't to me! Anyway, thanks for your help. I'm learning a lot from this forum.