sokko-g/website/src/styles
Shinuwa c3e494b8a6
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 24m57s
Validate and deploy Sokko G / deploy (push) Successful in 17s
Let players use Sokko TCG from a phone through a mobile fallback mode
#/mobile/cards shows the game without the site shell: a title, a footer
with the account and a discreet "Version complète" link, and a tab bar
fixed at the bottom. Phones opening #/cards are sent to the same section
in mobile mode unless the player chose the full version. Account,
History and Administration point to the computer.

The panels are the computer ones, adapted under .nebula-mobile (and
body.nebula-mobile-body for dialogs) for a 393×852 reference phone:
small cards with names under them when opening packs, a revealed card
shown large on tap, tap-to-pick team recruitment with a single Recruit
button and large stars, row lists for explorers and commons in the
expedition pickers, a race track and circuit that read at phone size,
and full-width actions throughout. Firefox no longer shows a mirrored
back on a flipped card.

Phone Playwright journeys check that every section fits the screen with
no button wrapping, then open a pack, run an expedition and recruit a
team by touch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 23:55:35 +01:00
..
design-system Document every Sass mixin and function with SassDoc and drop the unused ones 2026-12-01 16:22:36 +01:00
games Let a guide checklist update from its page filters without losing checks, and optionally limit the page to what the checklist contains 2026-12-01 17:39:00 +01:00
home fix add tools button from catalog position 2026-10-22 23:40:03 +02:00
icons Use the share icon and space the share dialog footer 2026-11-11 17:11:14 +01:00
overlays Open any toolbox from a list in Sokko TCG's toolbox drawer 2026-11-30 14:31:53 +01:00
toolboxes Add quantitative tasks with checklist controls to the planner 2026-10-24 15:02:33 +02:00
_aniimo.scss Add Aniimo elemental matchup calculator 2026-10-31 09:43:04 +01:00
_base.scss Migrate site controls to Nebula design system 2026-08-29 09:16:58 +02:00
_cards.scss Refine toolbox navigation and local data controls 2026-10-15 10:52:34 +02:00
_components.scss Add responsive game filters and hybrid toolbox drawer 2026-09-27 18:00:49 +02:00
_design-system.scss Add responsive game filters and hybrid toolbox drawer 2026-09-27 18:00:49 +02:00
_diablo4.scss Add goal tree toolbox module 2026-08-22 18:15:39 +02:00
_games.scss Split large Sass files into focused partials 2026-08-25 08:48:47 +02:00
_home.scss Split large Sass modules by feature area 2026-08-24 20:07:24 +02:00
_icons.scss Split remaining large Sass files by responsibility 2026-08-25 09:45:59 +02:00
_mhwilds.scss Refocus responsive layouts on compact desktop use 2026-10-05 15:47:46 +02:00
_mixins.scss Document every Sass mixin and function with SassDoc and drop the unused ones 2026-12-01 16:22:36 +01:00
_nebula-admin-guild.scss Reorganize the Guild section of Sokko TCG's administration 2026-11-30 16:53:28 +01:00
_nebula-cards-nav.scss Load the Sokko TCG styles with the cards route 2026-11-21 17:23:14 +01:00
_nebula-cards.scss Let players use Sokko TCG from a phone through a mobile fallback mode 2026-12-03 23:55:35 +01:00
_nebula-daily.scss Add the rules, storage and API of the daily team and its race 2026-11-25 21:14:36 +01:00
_nebula-expedition-bag.scss Make Sokko TCG's Watcher's Bag compact, with items used elsewhere shown small 2026-11-30 13:16:00 +01:00
_nebula-expedition-destinations.scss Offer the destination items under Sokko TCG's destinations of the day 2026-11-30 12:37:52 +01:00
_nebula-expedition-journey.scss Make the mythic rarity prismatic, centralize rarity colors and show rarity symbols in the history 2026-11-24 15:52:20 +01:00
_nebula-expedition-loadout.scss Simplify joining a Sokko TCG group and let a test player open one locally 2026-11-30 11:22:35 +01:00
_nebula-expeditions.scss Reorganize the Guild section of Sokko TCG's administration 2026-11-30 16:53:28 +01:00
_nebula-mirror.scss Make the broken mirror easier: wider margins, extra moves from balanced companions, hover outline on hard 2026-11-29 09:43:13 +01:00
_nebula-mobile-sections.scss Let players use Sokko TCG from a phone through a mobile fallback mode 2026-12-03 23:55:35 +01:00
_nebula-mobile.scss Let players use Sokko TCG from a phone through a mobile fallback mode 2026-12-03 23:55:35 +01:00
_nebula-race.scss Make Sokko TCG's Current Race fairer and explain each race afterwards 2026-11-30 16:18:18 +01:00
_nebula-team.scss Rework the daily team screens, share its team block and give the race its admin tab 2026-11-28 09:50:35 +01:00
_nebula.scss Document every Sass mixin and function with SassDoc and drop the unused ones 2026-12-01 16:22:36 +01:00
_overlays.scss Send a toolbox through an encrypted link 2026-11-11 16:26:05 +01:00
_responsive.scss Add quantitative tasks with checklist controls to the planner 2026-10-24 15:02:33 +02:00
_shell.scss Show a full reserve count on the Sokko TCG menu icon and remaining openings while opening a pack 2026-11-07 23:16:47 +01:00
_tokens.scss Add the recruitment screen of the daily team 2026-11-25 21:45:37 +01:00
_toolboxes.scss Improve toolbox architecture and initial bundle loading 2026-08-14 09:13:53 +02:00
AGENTS.md Stop new code from skipping its JSDoc or SassDoc, and tell agents to fix old gaps as they go 2026-12-01 16:34:47 +01:00
cards-mobile-route.scss Let players use Sokko TCG from a phone through a mobile fallback mode 2026-12-03 23:55:35 +01:00
cards-route.scss Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
main.scss Load the Sokko TCG styles with the cards route 2026-11-21 17:23:14 +01:00
README.md Let players use Sokko TCG from a phone through a mobile fallback mode 2026-12-03 23:55:35 +01:00

Styles (Sass)

Tout le style du site, écrit en Sass (syntaxe SCSS) et compilé par Vite. Il repose sur le Nebula Design System (NDS) : des tokens (couleurs, espaces, rayons), des classes publiques nds-* et des mixins. La référence visuelle est DESIGN_SYSTEM.md ; la page #/design-system (en développement seulement) montre tous les contrôles.

Comment les feuilles sont chargées

Point d'entrée Chargé par Contenu
main.scss main.jsx, sur toutes les pages Tokens, fond, shell, accueil, composants, jeux, toolboxes, overlays, design system, adaptations responsive
cards-route.scss features/cards/CardsPage.jsx, seulement sur la route #/cards Toutes les feuilles _nebula-*.scss de Sokko TCG
cards-mobile-route.scss features/cards/mobile/MobileCardsApp.jsx, seulement en mode mobile (#/mobile/cards), après cards-route.scss _nebula-mobile.scss (cadre) et _nebula-mobile-sections.scss (adaptations des sections), tout sous .nebula-mobile (body.nebula-mobile-body pour les fenêtres)

L'ordre des @use compte : à spécificité égale, la dernière règle gagne. cards-route.scss ré-émet à la fin les feuilles qui suivaient les cartes dans main.scss, pour garder la même priorité. tests/static-styles.test.mjs vérifie que les deux listes restent alignées.

Organisation

Chemin Contenu
_tokens.scss Variables CSS du thème (--color-*, --space-*, raretés…)
_mixins.scss Mixins partagés du thème
design-system/ Le NDS : controls/ (mixins des contrôles), attributes/ (classes publiques nds-* et attributs data-*), _surfaces.scss
_base.scss, _shell.scss, _nebula.scss Bases HTML, mise en page générale et menu, fond étoilé
_cards.scss Cartes et panneaux génériques du site (pas Sokko TCG)
_components.scss, overlays/, icons/ Composants partagés ; modales, tiroirs, notifications ; icônes SVG en masque
home/ Accueil, Librairie, À propos
games/, _games.scss, _mhwilds.scss, _diablo4.scss, _aniimo.scss Pages de jeux : communs, puis un fichier par jeu
toolboxes/, _toolboxes.scss Toolboxes : cadre des outils, contrôles partagés, un fichier ou dossier par outil
_nebula-*.scss Sokko TCG (ancien nom de code « nebula cards ») : un fichier par mécanique (-daily, -expeditions, -team, -race, -mirror…)
_responsive.scss Adaptations aux largeurs (validées à partir de 768 px) et préférences d'accessibilité

Règles

  • Réutiliser les tokens, les classes nds-* et les mixins existants avant d'écrire un style propre à un écran.
  • Un nouveau motif visuel réutilisable se documente dans DESIGN_SYSTEM.md.
  • Une nouvelle feuille de Sokko TCG s'ajoute à cards-route.scss, pas à main.scss.
  • Chaque fichier commence par // Rôle : …, et chaque mixin ou fonction a un bloc SassDoc /// au-dessus (vérifiés par tests/static-styles.test.mjs ; gabarit dans website/AGENTS.md). Survoler un @include dans VS Code affiche sa description, avec l'extension « SCSS IntelliSense ».

Vérifier

npm run check                          # compile tout le Sass via le build
npx playwright test e2e/style-layouts.spec.js e2e/nds-controls.spec.js
npm run test:assets                    # poids du CSS initial (après un build)