[Ur] Stylesheet questions

Bryn Keller xoltar at xoltar.org
Tue Jan 1 19:22:56 EST 2013


Hi folks,

I'm playing around with Ur/Web. It looks very interesting, but I have many
questions.

I'm having a hard time getting CSS styling to work in my application,
because I can't figure out how to get my application to serve a file from
the filesystem. If I have a file called stylesheet.css, where should I put
it in relation to the .exe file to allow it to be served, and what should I
use for the URL to reference it?

Alternatively, if I wanted to generate the styles dynamically, would I
write that as unit -> transaction blob, or something else? Something like
the following?

fun blogStyle () =
    returnBlob (textBlob ".blogPost {background-color:red; }")
                    (blessMime "text/css")


How would I then reference that in a <link> element? There's no "link"
field for <link>s like there is for <a>s, so the usual {foo ()}
interpolation within an <xml> document doesn't look like it works -
link.Href wants an url, not a transaction blob.

Thanks in advance for your help!

Bryn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20130101/e74778af/attachment.html>


More information about the Ur mailing list