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
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions media/css/base/banners/firefox-app-store.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

$font-path: '/media/protocol/fonts';
$image-path: '/media/protocol/img';

@import '~@mozilla-protocol/core/protocol/css/includes/lib';
@use '~@mozilla-protocol/core/protocol/css/includes/lib' as * with ($font-path: '/media/protocol/fonts', $image-path: '/media/protocol/img');

#firefox-app-store-banner {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
Expand Down
6 changes: 2 additions & 4 deletions media/css/base/banners/includes/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

$font-path: '/media/protocol/fonts';
$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

@use '~@mozilla-protocol/core/protocol/css/includes/lib' as *;

.c-banner {
@include clearfix;
Expand Down
6 changes: 2 additions & 4 deletions media/css/base/banners/includes/_basic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

$font-path: '/media/protocol/fonts';
$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
@use '~@mozilla-protocol/core/protocol/css/includes/lib' as *;

.c-banner {
@include clearfix;
Expand Down
5 changes: 1 addition & 4 deletions media/css/base/page-not-found.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

@import '~@mozilla-protocol/core/protocol/css/includes/lib';

$font-path: '/media/protocol/fonts';
$image-path: '/media/protocol/img';
@use '~@mozilla-protocol/core/protocol/css/includes/lib' as *;

.page-header {
.mzp-l-content {
Expand Down
7 changes: 2 additions & 5 deletions media/css/mozorg/home/includes/monitor-banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

$font-path: '/media/protocol/fonts';
$image-path: '/media/protocol/img';

@import '~@mozilla-protocol/core/protocol/css/includes/lib';
@import '../../../base/banners/includes/basic';
@use '~@mozilla-protocol/core/protocol/css/includes/lib' as * with ($font-path: '/media/protocol/fonts', $image-path: '/media/protocol/img');
@use '../../../base/banners/includes/basic';

$gradient: to right,
rgba(229, 63, 176, 0.15) 0%,
Expand Down