Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put @forward rules before @use rules #117

Open
jathak opened this issue Oct 14, 2019 · 2 comments
Open

Put @forward rules before @use rules #117

jathak opened this issue Oct 14, 2019 · 2 comments
Labels
enhancement New feature or request module system Part of the module system migrator

Comments

@jathak
Copy link
Member

jathak commented Oct 14, 2019

As discussed in sass/sass#2744, when a stylesheet is both used in and forwarded from the same file, the @forward rule should be ordered first, but the migrator currently does the opposite.

@jathak
Copy link
Member Author

jathak commented Oct 14, 2019

@nex3: A couple questions

  • We currently have built-in module @use rules before all other rules. Should that still be the case?
  • If a stylesheet is both used, forwarded, and configured, we currently put the configuration on the @use rule. Should this change to be on the @forward rule once @forward with is supported?

@nex3
Copy link
Contributor

nex3 commented Oct 15, 2019

  • We currently have built-in module @use rules before all other rules. Should that still be the case?

Yeah. Ideally I think we should have:

  • Built-in module @uses.
  • Library @forwards (if the migrator can even generate these).
  • Library @uses.
  • Application @forwards.
  • Application @uses.

Although above all, the existing import order should be preserved to ensure the CSS order remains consistent.

  • If a stylesheet is both used, forwarded, and configured, we currently put the configuration on the @use rule. Should this change to be on the @forward rule once @forward with is supported?

Yes. It may even be worth targeting @forward with now (maybe in a branch) to avoid having to update this logic twice.

@nex3 nex3 added the module system Part of the module system migrator label Feb 4, 2020
@jathak jathak added the enhancement New feature or request label Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module system Part of the module system migrator
Projects
None yet
Development

No branches or pull requests

2 participants