[Repo Assist] css: introduce --surface-background and --surface-border for theming#1161
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Draft
Conversation
Decouple component surface colours from --header-background/--header-border. The new variables default to the header values for full backwards compatibility. Themes that need a distinct surface colour (e.g. dark header + light content surfaces) can now override --surface-background and --surface-border without touching the header variables. Affected components: - .copy-code-button (background + border) - --mobile-menu-background - --aside-background (sidebar) - --blockquote-bacground-color - --page-menu-background-color + border - --nav-item-border-color - --dialog-background-color - div.fsdocs-tip (border) - API docs table row borders - dialog list item borders - #fsdocs-main-menu sidebar border Closes #1156 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
|
/repo-assist, I find |
57 tasks
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.
🤖 This is an automated pull request from Repo Assist.
Summary
Closes #1156.
Introduces
--surface-backgroundand--surface-borderCSS custom properties infsdocs-default.cssto decouple component surface colours from--header-background/--header-border.Motivation
--header-backgroundwas used for both the actual page header and every surface component (copy-code button, blockquotes, sidebar menus, dialogs, tooltips, API tables). A theme with a dark header ended up with mismatched UI elements (e.g. a black copy-code button on a light code block).Changes
--surface-background: var(--header-background)and--surface-border: var(--header-border)to:root(fully backwards-compatible defaults)<header>elements keep--header-*After this change
Test Status
Build: 0 warnings, 0 errors
Tests: 281/281 Markdown tests pass
Generated by 🌈 Repo Assist, see workflow run.