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

Migrate /base to use @use (#10896) #15973

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maureenlholland
Copy link
Collaborator

If this changeset needs to go into the FXC codebase, please add the WMO and FXC label.

One-line summary

Significant changes and points to review

Issue / Bugzilla link

Testing

@maureenlholland
Copy link
Collaborator Author

maureenlholland commented Feb 4, 2025

Don't configure in the includes file, only in the top level files

47.41 1 | throw new Error("Module build failed (from ./node_modules/sass-loader/dist/cjs.js):\nThis module was already loaded, so it can't be configured using \"with\".\n  ┌──> node_modules/@mozilla-protocol/core/protocol/css/includes/_lib.scss\n6 │ @forward 'config';\n  │ ^^^^^^^^^^^^^^^^^ new load\n  │ ━━━━━━━━━━━━━━━━━ original load\n  ╵\n  ┌──> media/css/base/banners/includes/_basic.scss\n5 │ @use '~@mozilla-protocol/core/protocol/css/includes/lib' as * with ($font-path: '/media/protocol/fonts', $image-path: '/media/protocol/img');\n  │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ configuration\n  ╵\n  node_modules/@mozilla-protocol/core/protocol/css/includes/_lib.scss 6:1  @use\n  media/css/base/banners/includes/_basic.scss 5:1                          @import\n  media/css/mozorg/home/includes/monitor-banner.scss 9:9                   root stylesheet");

Issue (already configured by lib, doesn't want configuration on basic)
Screenshot 2025-02-04 at 10 36 34 AM

NOTE: when a module is already loaded, it can not later be loaded
with configuration
$image-path: '/media/protocol/img';

@import '~@mozilla-protocol/core/protocol/css/includes/lib';
// NOTE: config must be handled by file @use-ing this includes file
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test with !default vars too

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I can declare lib defaults from the base file: https://sass-lang.com/documentation/variables/#configuring-modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant