Recommend that users write @forward before @use (#384)

This commit is contained in:
Natalie Weizenbaum 2019-10-11 14:09:31 -07:00 committed by GitHub
parent 8a706f57a6
commit b2ab9cbe50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,13 @@ module once!
[public]: use#private-members [public]: use#private-members
If you *do* write both a `@forward` and a `@use` for the same module in the same
file, it's always a good idea to write the `@forward` first. That way, if your
users want to [configure the forwarded module][], that configuration will be
applied to the `@forward` before your `@use` loads it without any configuration.
[configure the forwarded module]: use#configuring-modules
<% fun_fact do %> <% fun_fact do %>
The `@forward` rule acts just like `@use` when it comes to a module's CSS. The `@forward` rule acts just like `@use` when it comes to a module's CSS.
Styles from a forwarded module will be included in the compiled CSS output, Styles from a forwarded module will be included in the compiled CSS output,