IBM Lotus Notes/Domino 8.5.2 is still in
beta, All features referenced in this blog post may or may not appear in
the final version of 8.5.2.
If you attended the Lotusphere session
‘Make Your XPages Applications POP with CSS And Themes’ given by myself
and David Leedy one of the things we mentioned was that in Domino 8.5.1
and lower there was no way to specify the media type for a CSS file that
was added directly to an XPage or added via a theme document.
The great news is that is the latest
8.5.2 code drop that I’m using ( code drop 5 for anybody else who might
be on the managed beta ) has been updated so that you can now specify the
media type in either location.
When adding a Style Sheet directly to
an XPage you will have to go to the ‘All Properties’ section for the page
and then expand out the ‘Resources’ and ‘StyleSheet’ sections to find the
media property. It’s a nice handy dropdown list. This may get updated in
later builds to expose the property in the helper dialog box that appears
when you initially add the style sheet.
If you prefer to use theme documents
rather the add style sheets directly to an XPage you can specify the media
type by adding the tags for it like this :
This is especially great news for anybody
who is using the BluePrint framework as that framework comes with a print.css
file but you should consider setting up a printing CSS file for any apps
that you are building. The most common use for a print.css file would be
to use it to hide parts of the page that don’t need printing. For example
on a wiki app you could hide the sidebar so that the end user who prints
the page just gets the raw content. Who needs a tag cloud on a printout.