Revised proposal: we should use the "href" attribute on stylesheet,  
not "src". This makes it parallel to the include syntax better, and  
avoids muddying the waters with "resource" and "source" attributes on  
views. (Thanks to Neil Mix for pointing this out.)

-ben

On Sep 18, 2006, at 1:06 PM, Benjamin Shine wrote:

>
> For including external css files, I propose (and have implemented) a
> src="foo.css" attribute on the stylesheet tag. We've already adopted
> the stylesheet tag; this is a change to that tag which adds the src
> attribute. css files specified with src attribute should be looked
> for relative to the application file's path.
>
> Stylesheets thus can either be specified inline
> <stylesheet>
>   ...rules...
> </stylesheet>
>
> or
> <stylesheet src="foo.css"/>
>
> Multiple stylesheets are allowed, in any combination and order of
> external and inline. Lexical order is preserved; stylesheets go in
> the order they are declared in the file. I chose this syntax because
> it parallels <include href="foo.lzx"/>, which is in the same spirit
> as external stylesheets. I chose not to use the various DHTML  
> syntaxes:
>       did not use <link rel="stylesheet/>  because in lzx it doesn't make
> sense to have an element named "link" whose only usage is to link to
> an external stylesheet.
>       did not use <style>...stylesheet...</style> because it gets
> plurality wrong; with this syntax, a single style tag can and often
> does include many style rules.
>       did not use <?xml-stylesheet  href="[Style Sheet URL]" type="text/
> css"?> because our implementation of CSS is not a preprocessor
> instruction
>
> I also propose (and have implemented) removing the cssfile attribute
> from canvas.
>
> I do not currently support @import("foo.css") statements within css
> itself -- this is LPP-2702, not planned for inclusion in 3.4. I also
> do not support a http parameter for stylesheets -- LPP-2703, also not
> planned for inclusion in 3.4.
>
> [I'm not yet including a changeset or asking for changeset approval
> -- just looking for approval/discussion on the src="foo.css" syntax.]
>
> -ben
>
> _______________________________________________
> Laszlo-dev mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev


_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to