feat(front) - Refactor tailwind CSS#155
Conversation
| </template> | ||
|
|
||
| <style scoped> | ||
| @reference "@/styles/main.css"; |
There was a problem hiding this comment.
| --color-red: red; | ||
|
|
||
| /* Scale colors */ | ||
| @theme { |
There was a problem hiding this comment.
d3ad304 to
472c683
Compare
| vue() | ||
| vue(), | ||
| //@ts-ignore | ||
| tailwindcss() |
There was a problem hiding this comment.
b9dba68 to
4d5924f
Compare
4d5924f to
9c15947
Compare
Marc-AntoineA
left a comment
There was a problem hiding this comment.
Merci, très chouette amélioration ! Tu maîtrises bien tailwind :)
Quelques questions, essentiellement de la curiosité.
| }, | ||
| "dependencies": { | ||
| "@tailwindcss/postcss": "^4.0.14", | ||
| "@tailwindcss/vite": "^4.0.17", |
| .hexagon { | ||
| font-family: var(--font-accent); | ||
| position: relative; | ||
| clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); |
| <template> | ||
| <div data-cy="layer-switcher"> | ||
| <label for="layer-select" class="font-accent">Choix du calque</label> | ||
| <label for="layer-select" class="font-mono">Choix du calque</label> |
There was a problem hiding this comment.
Qu’est-ce qui a motivé ce changement d’un nom de classe sémantique vers un nom de classe descriptif. En l'occurence, je m’en moque que la font soit mono, par contre, c’est très important pour moi de savoir que c’est la font qui me sert à mettre en avant du texte.
There was a problem hiding this comment.
Pas trop de justification pour être honnête. J'ai donc remis font-accent
| :score="index" | ||
| :label="`${index}`" | ||
| size="small" | ||
| :size="ScoreLabelSize.SMALL" |
There was a problem hiding this comment.
L’intérêt ici est de pouvoir typer la props :size et donc d’éviter qu’on écrive n'importe quelle valeur c’est ça ?
There was a problem hiding this comment.
Effectivement c'est pour avoir un typage et pour éviter les erreurs. Au-delà de ça, si on doit modifier la valeur "small", on n'a qu'à changer la constante ScoreLabelSize.SMALL à un seul endroit. Et puis je trouve ça plus maintenable et évolutif d'utiliser des enum plutôt que des strings
|
closes #122 |
No description provided.