This documentation is deprecated. Adaptavist's documentation has moved to a new location where it is maintained and updated. Please visit Adaptavist's new Documentation area.
style macro
The {style} macro allows you to add custom style sheets to a page or import from an external URL...
This macro is designed to allow a single page to have custom styles applied to it. The style sheet can optionally be restricted to specific media types and you can optionally import an external style sheet from a URL.
If you want to define styles for an entire Space when using the Builder theme, please use CSS Custom Styles in the theme configuration.
Because citation text is one of the inbuilt Confluence text styles, you can easily see the results:
??Some example citation text??
Resulting in: Some example citation text
Media Type Restrictions
By default, the style sheet will apply to all media type. You can, however, restrict it to specific types of media which is great for creating alternate views of printed pages, etc.
The following example shows how to hide the breadcrumb trail and remove underlines from hyperlinks when printing or when the page is spoken using text-to-speech:
If desired you can include the style macro several times on a page to include different CSS for different media types, etc.
Hints and Tips:
Set up a "style" page with your style sheets, then use the include macro to embed it on other pages. This way you can change your styles in one central location and have everything that imports the page get updated.
How do I set up style macro to work also as user macro.
I just tried to create u...
How do I set up style macro to work also as user macro.
I just tried to create user macros with some custom css which are applied by users to certain pages but the action is not applied if style macro is within a user macro.
Setting: no header, render WikiMarkup
Any Idea what I need to do?
Hello!
Wondering if anyone can help me with this.
I've tried the above code und...
Hello!
Wondering if anyone can help me with this.
I've tried the above code under example 2 but it doesn't seem to work for me.
I am trying to remove bacially everything from the page when printing so I just end up with the content on the page.
For example I want to remove the header, footer, menu leftSidebar etc...
Comments (2)
Nov 10, 2010
Klaus Feldmann says:
How do I set up style macro to work also as user macro. I just tried to create u...How do I set up style macro to work also as user macro.
I just tried to create user macros with some custom css which are applied by users to certain pages but the action is not applied if style macro is within a user macro.
Setting: no header, render WikiMarkup
Any Idea what I need to do?
Cheers
Feb 23, 2011
Joseph Davis says:
Hello! Wondering if anyone can help me with this. I've tried the above code und...Hello!
Wondering if anyone can help me with this.
I've tried the above code under example 2 but it doesn't seem to work for me.
I am trying to remove bacially everything from the page when printing so I just end up with the content on the page.
For example I want to remove the header, footer, menu leftSidebar etc...
Any help would be appreciated!!
Joey