Repository navigation
feat(design-system, blog): add accessible light mode and persistent theme toggle - #7
Merged
Merged
Conversation
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.
Objetivo
Adicionar um modo claro ao design system sem modificar a aparência do modo escuro, e integrar um botão claro/escuro ao blog (listagem e todos os artigos).
Design system (etapa 1)
design-system/tokens/tokens.css: adiciona o escopohtml[data-theme="light"]com tokens semânticos para fundo, superfícies, textos, bordas, links/acento e foco. Dark original permanece padrão no CSS.design-system/components/components.css: cabeçalho e fundo de código usam tokens, além de componente.ds-theme-toggle.design-system/theme/theme.js: controlador compartilhado executado antes do CSS, reduzindo o flash de tema incorreto; lêprefers-color-schemequando não existe preferência manual; persiste escolha emlocalStorage(rgomids-color-theme), sem falhar quando storage estiver bloqueado.Blog (etapa 2)
_layouts/base.html: botão comaria-labelcontextual; controlador carregado de forma síncrona antes das folhas de estilo. Funciona tanto em/artigos/quanto em páginas individuais.blog.css: fundo de código segue a paleta. SVGs Mermaid permanecem no tema escuro próprio para preservar legibilidade no modo claro, sem alterar as imagens.Como funciona
Escopo
Checklist
Este PR não executa merge automático.