refactor(css): styles inline → classes (E10-2, #163) - #173
Merged
Conversation
…E10-2, #163) Le CSS était codé en dur dans le JS (style: 'display:flex;…' massifs) : difficile à thématiser/maintenir et bloquant pour une CSP stricte (style-src 'unsafe-inline' requis). Extraction vers styles/views.css. - Zéro attribut style="" statique dans les vues (9 fichiers). - États dynamiques (actif/ouvert/propre/cliquable) → classes modificatrices (.mf-frame--active, .mf-region-block--open, .mf-valgrind--clean…) plutôt que des chaînes de style interpolées. - Seul reste du CSSOM légitime et dynamique (géométrie de l'overlay de fils SVG, glow pointeur) — non concerné par style-src, calculé au runtime. - Rendu pixel-identique : 9 écrans du harnais à 0,00 % (sources ET dist/). Débloque la CSP stricte (#166). 655 tests, lint vert, poids 254 KB. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ferme #163. Le CSS était codé en dur dans le JS (
style: 'display:flex;…') — difficile à thématiser/maintenir et bloquant pour une CSP stricte. Extraction versstyles/views.css.Ce qui change
style=""statique dans les 9 vues (bytes, callstack, controls, libft, memory, program, regionMap, valgrind, game.js)..mf-frame--active,.mf-region-block--open,.mf-valgrind--clean,.mf-region-name--open…) plutôt que des chaînes de style interpolées.style-src).Garanties
dist/.Débloque la CSP stricte (#166) : plus aucun
style="…"→style-src 'self'sans'unsafe-inline'deviendra possible une fois le script de thème externalisé.