Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify how code color is defined #1387

Open
chalin opened this issue Feb 1, 2023 · 0 comments
Open

Simplify how code color is defined #1387

chalin opened this issue Feb 1, 2023 · 0 comments

Comments

@chalin
Copy link
Collaborator

chalin commented Feb 1, 2023

Here's how <code> element color is defined in Docsy currently:

  1. assets/scss/_variables.scss overrides the Bootstrap $code-color variable. The BS $code-color default is pink (unlikely to be a useful color), but Docy's override of using the secondary color as a base isn't much more helpful (at least not in projects I've worked on).
  2. Docsy has context-specific overrides setting code color to inherit, which usually means it'll fall back to $body-color (a reasonable default IMHO):
  • .td-content p code
  • .td-content li > code
  • .td-content table code
  1. But some contexts fall back to $code-color, such as the <dd> in Shortcode blocks.

On almost all projects that I've worked on, a single code color is used throughout the project, and often it matches the base "body color". So, IMHO, we should set $code-color to be equivalent to $body-color1 and use this in all contexts (i.e., avoid contextual overrides).

Thoughts?

Note that this issue is a followup to:

Footnotes

  1. We'll probably need to set it to var(--bs-body-color) since BS's $body-color won't be defined by the time we choose to set the value of $code-color.

@chalin chalin mentioned this issue May 4, 2023
14 tasks
@chalin chalin added this to the 23Q4 milestone Nov 8, 2023
@chalin chalin modified the milestones: 23Q4, 24Q1 Jan 11, 2024
@chalin chalin modified the milestones: 24Q1, 24Q2 Apr 2, 2024
@chalin chalin modified the milestones: 24Q2, 24Q3 Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant