Dennis' Domino Blog
« IBM DB2 prior to 9.7 Fix Pack 2 Multiple Security VulnerabilitiesInterfaceFLOR news: 'War on waste' and EPD »

xpages: Theme's and css media types

Permalink 05/31/10 10:52, by Dennis van Remortel, Categories: Lotus, xpages

This weekend I was trying to embed blueprint in a xpages app.
All went fine, but I ran into 1 problem: How do you get your theme to use the following syntax?

<!--sample -->
<!-- Framework CSS -->
<link rel="stylesheet" href="../../blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="../../blueprint/print.css" type="text/css" media="print">
<!--[if lt IE 8]>
<!-- Import fancy-type plugin for the sample page. -->
<link rel="stylesheet" href="../../blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">

The media= part I can't fix with the theme? I tried the following:

<resource>
<content-type>text/css</content-type>
<href>screen.css</href>
<media>screen, projection</media>
</resource>

But the generated code doesn't take the media stuff into account at all.

<link rel="stylesheet" type="text/css" href="/dev/blueprint.nsf/screen.css">
<link rel="stylesheet" type="text/css" href="/dev/blueprint.nsf/fancyscreen.css">


Any suggestions on this?

6 comments »

6 comments

Comment from: Jeremy Hodge [Visitor] · http://www.hodgebloge.com
The media attribute is not currently supported under XPages. It is something that has been requested, and I believe is being looked at.
05/31/10 @ 13:13
Comment from: Dennis van Remortel [Member] Email · http://www.d2k.nl/domino
Thanks Jeremy!
05/31/10 @ 13:25
Comment from: Fredrik Stöckel [Visitor] · http://www.twitter.com/fstockel
An alternative syntax resources is implemented in R8.5.2 (beta) and it supports the media attribute....The syntax is something like this:
<resources>
<styleSheet media="print" type="text/css" href="/path/to/stylesheet.css"></styleSheet>
</resources>

I don't know if the syntax will change or if it even makes it to the final build (as always with beta software) but we can at least hope(the syntax is much cleaner imho).


06/01/10 @ 12:00
Comment from: Dennis van Remortel [Member] Email · http://www.d2k.nl/domino
Thanks Frederik

Let's hope this makes the gold release then ;-)
06/01/10 @ 13:09
Comment from: mark b [Visitor]
**---
Browsers will respect media commands embedded in a style sheet with XPages before 8.5.2, for example:

@media print {
.buttonLeft {display:none}
.buttonRight {display:none}
.locallinks {display:none}
}

@media screen {
.buttonLeft {display:block}
.buttonRight {display:block}
.locallinks {display:block}
}
07/08/10 @ 17:04
Comment from: Dennis van Remortel [Member] Email · http://www.d2k.nl/domino
Thanks Mark

Excellent tip!!
07/08/10 @ 17:13

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
What Lotus product is discussed mainly here? The answer is domino
antispam test
Yet another Domino/Websphere Admin blog.

About me:
Lotus Notes/Domino Admin
Websphere Commerce Admin
sceptic
critic



Search

XML Feeds

Planet Lotus

powered by b2evolution free blog software

©2010 by Dennis van Remortel

Contact | b2evolution skin by Asevo | blog software | hosting