Update contributing docs for sass modules#7055
Open
domoscargin wants to merge 4 commits into
Open
Conversation
📋 StatsNo changes to any distributed file sizes! Action run for af97b95 |
c3c3dff to
587b683
Compare
587b683 to
3ee08a6
Compare
Member
There was a problem hiding this comment.
Edits look neat! I'm wondering if we should also touch on specificities from supporting @use that we discovered in the css.md file:
govuk-exportsonly being necessary in import-only files or mixins that want to prevent double output- how if you need to get a reference to a function, you need to receive the output of
meta.get-functionand can no longer use astringlike we used to - placeholders requiring a little care in the order files include each other, and need unit testing
seaemsi
reviewed
May 20, 2026
Contributor
seaemsi
left a comment
There was a problem hiding this comment.
Have made a few suggestions for clarity
1 task
Co-authored-by: Seaemsi <seaemsi@users.noreply.github.com>
3ee08a6 to
21b1ada
Compare
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/tools/_exports.scss b/packages/govuk-frontend/dist/govuk/tools/_exports.scss
index a04b9ce78..6441adbfc 100644
--- a/packages/govuk-frontend/dist/govuk/tools/_exports.scss
+++ b/packages/govuk-frontend/dist/govuk/tools/_exports.scss
@@ -24,7 +24,7 @@ $govuk-imported-modules: () !default;
///
/// @param {String} $name - Name of module - must be unique within the codebase
/// @content The passed content will only be outputted if a module of the same
-/// $name has not already been outputted
+/// $name has not already been outputted. Use only with `@import`, not `@use`.
/// @access public
@mixin govuk-exports($name) {
Action run for af97b95 |
Contributor
Author
I've added a note to the govuk-exports function docs.
Outside of our specific uses (the asset urls functions), could you do this before in Sass? This feels like less of a code-style preference and more of a necessity moving forward with Sass, so not really relevant for this file?
Placeholders are non-intuitive, but again feel like less of a style preference and more of "this is how Sass works". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.