Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix ordering of css dependencies #109

Copy link
Copy link
Open
@ianstormtaylor

Description

@ianstormtaylor
Issue body actions

right now, the ignoring that the builder does, while preventing dupes, doesn't result in the proper css output. for example, imagine a situation with a parent and two children...

theme/component.json:

{
  "name": "theme",
  "local": [
    "one",
    "two"
  ]
}

theme/one/component.json:

{
  "name": "one",
  "local": [
    "two"
  ],
  "styles": [
    "index.css"
  ]
}

theme/one/index.css:

.one {}

theme/two/component.json:

{
  "name": "two",
  "styles": [
    "index.css"
  ]
}

theme/two/index.css:

.two {}

when resolving the dependencies, the builder should run into theme's two dependencies, and start with one. while evaluating one it should see that it depends on two and evaluate two first. the final output in build/build.css should be:

.two {}
.one {}

since one depends on two. instead, because two gets ignored when evaluating theme, the actual output is:

.one {}
.two {}

and then styles in one that should have overridden styles in two actually need !important flags to work. this makes it impossible (or annoying) to build up css dependencies, even though it would be a badass and obvious way to structure the css deps in themes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.