Again that seems to me a problem out of the Royale realm (that is code and
compilation to get a concrete compilation)
Does it can be solved, instead of using inject_html, just by using an
custom HTML template and setting the links to CSS files in the required
order? or even using loadCSS function in Core library?

El mié., 12 feb. 2020 a las 13:46, Harbs (<[email protected]>) escribió:

> The problem is caused by the fact that we have no mechanism of specifying
> CSS dependency order in Royale.
>
> The design of the CSS makes sense. Requiring a specific order for the CSS
> files is a valid strategy.
>
> NPM (via modules) does have a way to specify CSS order.
>
> I think this is a general problem which we should try to solve. To me, the
> only question is technically what’s the best way to do so.
>
> Possibly inject_html is the wrong tool (as we’ve already discussed), but
> it’s the only one we have as of now.
>
> I’m not sure how the order of the inject_html is determined. Maybe there
> should be some sorting logic which corresponds to dependency trees?
>
> Maybe the right answer is to have a way to declare file dependencies and
> that should include order as well?
>
> Harbs
>
> > On Feb 12, 2020, at 1:54 PM, Carlos Rovira <[email protected]>
> wrote:
> >
> > Hi Harbs,
> >
> > if I understand the issue correctly this not seems a Royale issue to me,
> > but a problem in Spectrum CSS structure design.
> > In Royale, we provide CSSs to the compiler from libraries, and that
> > generate just one compiled CSS file. User's project CSS takes precedence
> > over framework libraries, so if a user override a style, that wins over
> the
> > royale one. Since load an external CSS is outside the Royale sandbox, I
> > think the loaded CSS should solve its problem to not have
> > collision problems within them.
> >
> >
> > El mié., 12 feb. 2020 a las 10:04, Harbs (<[email protected]>)
> escribió:
> >
> >> I’ve run into an interesting issue while working on the Spectrum
> >> components.[1]
> >>
> >> To quickly summarize:
> >>
> >> I’m using inject_html to automatically add CSS links to the index.html
> >> file. Doing so gives no control over the order of said dependencies.
> >>
> >> The CSS files are required to be loaded in the declared dependency list
> >> (in the npm package).
> >>
> >> I think we need to resolve this issue somehow and I’m not sure of the
> best
> >> way to go about it.
> >>
> >> Thoughts?
> >> Harbs
> >>
> >> [1]https://github.com/adobe/spectrum-css/issues/481 <
> >> https://github.com/adobe/spectrum-css/issues/481>
> >
> >
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to