From: Jorge on 13 Jan 2010 07:54 On Jan 13, 1:50 pm, David Mark <dmark.cins...(a)gmail.com> wrote: > Yoda wrote: > > On Jan 13, 1:26 pm, David Mark <dmark.cins...(a)gmail.com> wrote: > >> Jorge wrote: > >>> On Jan 13, 1:12 pm, David Mark <dmark.cins...(a)gmail.com> wrote: > >>>> Do you mean what reason is there to not include > >>>> such style sheets in the styleSheets collection? Scientifically > >>>> speaking, because it would be stupid? It's another one of those > >>>> no-brainers (your specialty) near as I can tell. > >>> Thanks David. Yes, my question might be reworded as *why* would it be > >>> stupid to include them ? > >> (...) Because it's a collection, > >> not a hierarchy. Think. (...) > > > I still don't get it. Sorry. Could you please enlighten me ? > > You certainly are sorry. :) What does the styleSheets collection > abstract? What is it typically used for? How could it possibly make > sense to include imports _inside_ the specified style sheets in this > collection? In what sense are imported stylesheets "less than" stylesheets obtained/applied by a <link> or a <style> ? -- Jorge.
From: David Mark on 13 Jan 2010 08:12 Jorge wrote: > On Jan 13, 1:50 pm, David Mark <dmark.cins...(a)gmail.com> wrote: >> Yoda wrote: >>> On Jan 13, 1:26 pm, David Mark <dmark.cins...(a)gmail.com> wrote: >>>> Jorge wrote: >>>>> On Jan 13, 1:12 pm, David Mark <dmark.cins...(a)gmail.com> wrote: >>>>>> Do you mean what reason is there to not include >>>>>> such style sheets in the styleSheets collection? Scientifically >>>>>> speaking, because it would be stupid? It's another one of those >>>>>> no-brainers (your specialty) near as I can tell. >>>>> Thanks David. Yes, my question might be reworded as *why* would it be >>>>> stupid to include them ? >>>> (...) Because it's a collection, >>>> not a hierarchy. Think. (...) >>> I still don't get it. Sorry. Could you please enlighten me ? >> You certainly are sorry. :) What does the styleSheets collection >> abstract? What is it typically used for? How could it possibly make >> sense to include imports _inside_ the specified style sheets in this >> collection? > > In what sense are imported stylesheets "less than" stylesheets > obtained/applied by a <link> or a <style> ? Are you in the middle of a test or something? I'm looking at my quote and I don't see "less than". I assume you mean one or more of the former may be included in the latter. It follows that an abstraction that would include the latter would have to be hierarchical. Clear? Good luck, Jorge!
From: Jorge on 13 Jan 2010 08:53 On Jan 13, 2:12 pm, David Mark <dmark.cins...(a)gmail.com> wrote: > Jorge wrote: > > On Jan 13, 1:50 pm, David Mark <dmark.cins...(a)gmail.com> wrote: > >> Yoda wrote: > >>> On Jan 13, 1:26 pm, David Mark <dmark.cins...(a)gmail.com> wrote: > >>>> Jorge wrote: > >>>>> On Jan 13, 1:12 pm, David Mark <dmark.cins...(a)gmail.com> wrote: > >>>>>> Do you mean what reason is there to not include > >>>>>> such style sheets in the styleSheets collection? Scientifically > >>>>>> speaking, because it would be stupid? It's another one of those > >>>>>> no-brainers (your specialty) near as I can tell. > >>>>> Thanks David. Yes, my question might be reworded as *why* would it be > >>>>> stupid to include them ? > >>>> (...) Because it's a collection, > >>>> not a hierarchy. Think. (...) > >>> I still don't get it. Sorry. Could you please enlighten me ? > >> You certainly are sorry. :) What does the styleSheets collection > >> abstract? What is it typically used for? How could it possibly make > >> sense to include imports _inside_ the specified style sheets in this > >> collection? > > > In what sense are imported stylesheets "less than" stylesheets > > obtained/applied by a <link> or a <style> ? > > Are you in the middle of a test or something? I'm looking at my quote > and I don't see "less than". I assume you mean one or more of the > former may be included in the latter. It follows that an abstraction > that would include the latter would have to be hierarchical. Clear? Yes you've got to digg deep inside the collection hierarchy to access the imported ones, but an imported stylesheet is as stylesheet as any other and equally important so ISTM that it would have made perfect sense to have them all included at the same level in the collection of styleSheet*s* of the document -regardless of its origin-. Or not ? And if not, why ? -- Jorge.
From: David Mark on 13 Jan 2010 09:11 Jorge wrote: > On Jan 13, 2:12 pm, David Mark <dmark.cins...(a)gmail.com> wrote: >> Jorge wrote: >>> On Jan 13, 1:50 pm, David Mark <dmark.cins...(a)gmail.com> wrote: >>>> Yoda wrote: >>>>> On Jan 13, 1:26 pm, David Mark <dmark.cins...(a)gmail.com> wrote: >>>>>> Jorge wrote: >>>>>>> On Jan 13, 1:12 pm, David Mark <dmark.cins...(a)gmail.com> wrote: >>>>>>>> Do you mean what reason is there to not include >>>>>>>> such style sheets in the styleSheets collection? Scientifically >>>>>>>> speaking, because it would be stupid? It's another one of those >>>>>>>> no-brainers (your specialty) near as I can tell. >>>>>>> Thanks David. Yes, my question might be reworded as *why* would it be >>>>>>> stupid to include them ? >>>>>> (...) Because it's a collection, >>>>>> not a hierarchy. Think. (...) >>>>> I still don't get it. Sorry. Could you please enlighten me ? >>>> You certainly are sorry. :) What does the styleSheets collection >>>> abstract? What is it typically used for? How could it possibly make >>>> sense to include imports _inside_ the specified style sheets in this >>>> collection? >>> In what sense are imported stylesheets "less than" stylesheets >>> obtained/applied by a <link> or a <style> ? >> Are you in the middle of a test or something? I'm looking at my quote >> and I don't see "less than". I assume you mean one or more of the >> former may be included in the latter. It follows that an abstraction >> that would include the latter would have to be hierarchical. Clear? > > Yes you've got to digg deep inside the collection hierarchy to access There is no "collection hierarchy". The document.styleSheets collection is just that. But you are sort of on the right track. Why not just read the manual and realize there are other abstractions for tracking down imports. http://msdn.microsoft.com/en-us/library/ms535871(VS.85).aspx > the imported ones, but an imported stylesheet is as stylesheet as any > other and equally important so ISTM that it would have made perfect > sense to have them all included at the same level in the collection of > styleSheet*s* of the document -regardless of its origin-. Or not ? And > if not, why ? Because it doesn't make any sense at all? If you can't visualize the various abstractions and how your proposition would be tangling them up for no practical reason, then I can't help you.
From: Scott Sauyet on 13 Jan 2010 10:05
On Jan 13, 8:53 am, Jorge <jo...(a)jorgechamorro.com> wrote: > Yes you've got to digg deep inside the collection hierarchy to access > the imported ones, but an imported stylesheet is as stylesheet as any > other and equally important so ISTM that it would have made perfect > sense to have them all included at the same level in the collection of > styleSheet*s* of the document -regardless of its origin-. Or not ? And > if not, why ? Well, there would be some oddities if you tried to flatten the list in this manner. In almost every case I've ever seen of flattening a hierarchy, the parent node is included before its children. But if you did that here, the stylesheets would be in the wrong order for the CSS cascade. CSS says that @import rules have to come first in the stylesheet, and even if they're not properly placed, must be processed before other rules in the sheet. So if you have sheet a importing b followed by c importing d, the only practical order of flattening them is the counter-intuitive [b, a, d, c]. Besides, it would make much more difficult the sort of text-based manipulation described earlier in this thread! -- Scott |