[Wmlbrowser] Custom CSS
Matthew Wilson
matthew at mjwilson.demon.co.uk
Tue Feb 28 17:27:19 EST 2006
Stanley Mok wrote:
> Hi, I am having fun exploring WML with wmlbrowser. Thanks for
> the good work. I have a request for support the use of custom
> CSS for the display so that I can use different CSS to intimate
> the look on different devices. I had extracted wml.css from
> wmlbrowser.jar, and every time I want to switch the display
> profile, I have to quit FireFox, do the modifications and update
> the CSS into wmlbrowser.jar, then run FireFox again, which is a
> PITA when one has to code and test WML the whole day.
That sounds interesting, but perhaps more complexity than I want to
introduce to the extension at the moment.
I would suggest that you include the various CSS files in wmlbrowser.jar
as files called, for example, "nokia.css", "ericsson.css", for the
different devices, and then change the file "wml.xsl" to point to the
different CSS files you have, using alternate stylesheets.
So instead of
<link href="chrome://wmlbrowser/content/wml.css" rel="stylesheet"
type="text/css" />
you would have
<link href="chrome://wmlbrowser/content/wml.css" rel="stylesheet"
type="text/css" />
<link href="chrome://wmlbrowser/content/nokia.css" rel="alternate
stylesheet" title="Nokia" type="text/css" />
<link href="chrome://wmlbrowser/content/ericsson.css" rel="alternate
stylesheet" title="Ericsson" type="text/css" />
and then Firefox should let you switch styles between the different
stylesheets.
Please let me know if you need more details on this.
Matthew
More information about the Wmlbrowser
mailing list