componentjs / component

frontend package manager and build tool for modular web applications
https://github.com/componentjs/guide
MIT License
4.55k stars 305 forks source link

CSS ordering remote & local components??? #599

Closed clintwood closed 10 years ago

clintwood commented 10 years ago

From the wiki doc on css ordering it is not clear to me what order (if any) is guaranteed for remote components.

From the wiki I understand that remote component CSS is included first then local CSS from .locals is appended after that.

Is there any order to the remote component CSS? Is there a way to enforce order of CSS for remote and local components? What effect does component-bundler have on this order, does it preserve order when bundling?

@jonathanong ?

timaschew commented 10 years ago

maybe related: https://github.com/component/builder2.js/issues/29

clintwood commented 10 years ago

Thanks @timaschew, will take a look...

jonathanong commented 10 years ago

yeah, remotes before locals per bundle.

clintwood commented 10 years ago

@jonathanong, figured that thanks, but are remotes ordered in the order they are required or on whichever downloads first?

jonathanong commented 10 years ago

Order they are required. Remotes are all resolved before locals. There's a "flatten" function somewhere that has all the logic

clintwood commented 10 years ago

@jonathanong, thanks for your time...

clintwood commented 10 years ago

hahaha, @timaschew, yup, its definitely this: https://github.com/component/builder2.js/issues/29... a day later with randomly breaking CSS...