Re: [Imports]: Styleshet cascading order clarification

2014-11-04 Thread Gabor Krizsanits

- Original Message -
> From: "Tab Atkins Jr." 
> To: "Gabor Krizsanits" 
> Cc: "Hajime Morrita" , "public-webapps" 
> 
> Sent: Monday, November 3, 2014 7:12:27 PM
> Subject: Re: [Imports]: Styleshet cascading order clarification
> 
> On Mon, Nov 3, 2014 at 7:28 AM, Gabor  Krizsanits
>  wrote:
> > During our last meeting we all seemed to agree on that
> > defining/implementing
> > order for style-sheets is imports is super hard (if possible) and will
> > bring more
> > pain than it's worth for the web (aka. let's not make an already
> > over-complicated
> > system twice as complicated for very little benefits). And the consensus
> > was that we
> > should just not allow global styles in imports.
> >
> > Some months has passed but I still don't see any update on the spec. in
> > this regard,
> > so I'm just double checking that we still planning to do this or if
> > anything changed
> > since then.
> 
> Out of curiosity, why is it hard?  Without much background in the
> implementation matters, it doesn't seem that a  that
> contains a  should be any different than a  rel=stylesheet> that contains an @import rule.
> 
> ~TJ
> 

See my comments here: https://www.w3.org/Bugs/Public/show_bug.cgi?id=24756

I think the difference is the de-duping mechanism in HTML imports. Importing
the same import from multiple places in the import graph can change the import
order hence the underlying style-sheet order too. So just because link import A
is before link import B in the document does not necessary say anything about
the order of their stylesheet... 

My concern is that in complex projects it will be even harder to track down
css related issues, given that adding an extra link to the import tree can
significantly change the order of the imports. 

The other concern is performance related. We will have to rearrange the rules
all the time the import graph changes during the import parsing. But one could
argue that it's just an implementation detail...

Then again, maybe all these issues can be outweighed by some important use 
cases... 

 - Gabor



Re: [Imports]: Styleshet cascading order clarification

2014-11-03 Thread Scott Miles
I know this is probably the wrong place/time to say this, but fwiw, a
primary use case for imports is replacing:








Having the imported stylesheets apply to the main document is a big part of
the value here. If the stylesheets are for some other purpose, it's easy to
put them in a , but the reverse is not true.

I realize implementation difficulty may trump ergonomics, but I wanted to
make sure this part was heard.

Scott


On Mon, Nov 3, 2014 at 10:12 AM, Tab Atkins Jr. 
wrote:

> On Mon, Nov 3, 2014 at 7:28 AM, Gabor  Krizsanits
>  wrote:
> > During our last meeting we all seemed to agree on that
> defining/implementing
> > order for style-sheets is imports is super hard (if possible) and will
> bring more
> > pain than it's worth for the web (aka. let's not make an already
> over-complicated
> > system twice as complicated for very little benefits). And the consensus
> was that we
> > should just not allow global styles in imports.
> >
> > Some months has passed but I still don't see any update on the spec. in
> this regard,
> > so I'm just double checking that we still planning to do this or if
> anything changed
> > since then.
>
> Out of curiosity, why is it hard?  Without much background in the
> implementation matters, it doesn't seem that a  that
> contains a  should be any different than a  rel=stylesheet> that contains an @import rule.
>
> ~TJ
>
>


Re: [Imports]: Styleshet cascading order clarification

2014-11-03 Thread Tab Atkins Jr.
On Mon, Nov 3, 2014 at 7:28 AM, Gabor  Krizsanits
 wrote:
> During our last meeting we all seemed to agree on that defining/implementing
> order for style-sheets is imports is super hard (if possible) and will bring 
> more
> pain than it's worth for the web (aka. let's not make an already 
> over-complicated
> system twice as complicated for very little benefits). And the consensus was 
> that we
> should just not allow global styles in imports.
>
> Some months has passed but I still don't see any update on the spec. in this 
> regard,
> so I'm just double checking that we still planning to do this or if anything 
> changed
> since then.

Out of curiosity, why is it hard?  Without much background in the
implementation matters, it doesn't seem that a  that
contains a  should be any different than a  that contains an @import rule.

~TJ



[Imports]: Styleshet cascading order clarification

2014-11-03 Thread Gabor Krizsanits
During our last meeting we all seemed to agree on that defining/implementing
order for style-sheets is imports is super hard (if possible) and will bring 
more
pain than it's worth for the web (aka. let's not make an already 
over-complicated
system twice as complicated for very little benefits). And the consensus was 
that we
should just not allow global styles in imports.

Some months has passed but I still don't see any update on the spec. in this 
regard,
so I'm just double checking that we still planning to do this or if anything 
changed
since then.

- Gabor