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 /careers to use Sass @use (Issue #10896) #15821

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

alexgibson
Copy link
Member

One-line summary

Removes use of @import from careers pages .scss files.

Issue / Bugzilla link

#10896

Testing

http://localhost:8000/en-US/careers/

@alexgibson alexgibson added P3 Third level priority - Nice to have Needs Review Awaiting code review Review: XS Code review time: up to 30min Frontend HTML, CSS, JS... client side stuff labels Jan 7, 2025
@alexgibson alexgibson requested a review from a team as a code owner January 7, 2025 15:21
@maureenlholland maureenlholland self-assigned this Jan 8, 2025
@maureenlholland maureenlholland removed the Needs Review Awaiting code review label Jan 8, 2025
Copy link
Collaborator

@maureenlholland maureenlholland left a comment

Choose a reason for hiding this comment

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

LGTM r+

one non-blocking question on the image path var

@@ -43,11 +41,11 @@ $image-path: '/media/protocol/img';
}

&.c-careers-instagram {
background-image: url('#{$image-path}/icons/social/instagram/black.svg');
background-image: url('/media/protocol/img/icons/social/instagram/black.svg');
Copy link
Collaborator

Choose a reason for hiding this comment

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

question (non-blocking): any particular reason to replace with the string?

This line from styles.scss gave me the impression that variable would be set wherever it was later imported (since the file is only supposed to load once, it would apply config from the initial import... but it's been a while since I tested that)
@use '~@mozilla-protocol/core/protocol/css/includes/lib' as * with ($image-path: '/media/protocol/img');

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question! It seemed a bit unnecessary here, since the $image-path variable is mostly used for protocol components, where we import the styles but still need to dynamically change the image paths. It seemed a bit neater to use a simple string here, since the third icon uses a different hard-coded path too.

@alexgibson alexgibson merged commit 2b3f891 into mozilla:main Jan 9, 2025
3 checks passed
@alexgibson alexgibson deleted the sass-use branch January 9, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend HTML, CSS, JS... client side stuff P3 Third level priority - Nice to have Review: XS Code review time: up to 30min
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants