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

Use SASS modules, remove all uses of @import rule #17

Closed
wants to merge 4 commits into from

Conversation

luisdlopez
Copy link
Contributor

GitHub Issue or Internal Use Azure Devops Work Item ID:

Proposed Changes

  • Bug fix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes, no api changes)
  • Build or CI related changes
  • Documentation content changes
  • Other, please describe:

What is the current behavior?

Our SASS code uses the @import rule.

What is the new behavior?

The SASS team discourages the continue use of the @import rule (it will be phased out eventually). You can read more about it here:

https://sass-lang.com/documentation/at-rules/import/

css: {
preprocessorOptions: {
scss: {
additionalData: `@import "./src/styles/_variables.scss"; @import "./src/styles/mixins/_media-queries.scss";`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Pourquoi enleve ca?
C'est poche de devoir import et prefixer les helpers.
@use "../../../../styles/variables" as v;
v.get-spacing(md);

Copy link
Contributor

Choose a reason for hiding this comment

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

On pourait le remplacer par ca et evite les changements partout.
@use "./src/styles/variables" as *; @use "./src/styles/mixins/media-queries" as *;


@media (max-width: (get-media(xxs) - 1)) {
@media (max-width: (v.get-media(xxs) - 1)) {
Copy link

Choose a reason for hiding this comment

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

Je sais que ça n'a rien à avoir avec la tâche, mais sais-tu si il y a une raison à l'utilisation du max-width? Il me semble qu'on avait tous parlé de faire du mobile first et donc de toujours utiliser du min-width. Ça peut créer des problème d'utiliser du max et du min-width ensemble, il y a souvent 1px où les styles explosent quand on utilise les deux

@luisdlopez luisdlopez closed this Sep 19, 2024
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.

4 participants