Dark theme: active sidebar item has no padding or border-radius

Open Beginner friendly
#193 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
scss
Domain
design, frontend

Research direction

Compare the sidebar rules in theme.scss (lines 96–116) with the active pill rules in theme-dark.scss (lines 94–101), then preview the Quarto theme in light and dark modes. Add the missing sidebar spacing and border-radius rules to the dark stylesheet; done when the active item has consistent padding, alignment, and rounded corners in both previews.

Written by the indexing model from the issue text.

Description

Problem

In dark mode, the active sidebar item may have no padding, so its text can touch the 1px outline. The item can also align differently than in light mode.

Quarto compiles the light theme and the dark theme as separate stylesheets (_extension.yml sets light: [theme.scss, ...] and dark: [theme-dark.scss, ...]). theme-dark.scss does not import theme.scss.

  • theme.scss (lines 96–116) gives .sidebar-navigation .sidebar-item-container > .sidebar-item-text and the active pill padding: 0.2rem 0.5rem, margin-left: -0.5rem, and border-radius: 5px.
  • theme-dark.scss (lines 94–101) sets only color, background-color, and an inset box-shadow on the active pill. It has no padding, margin, or border-radius rules for the sidebar.

Found in v8.1.4. The same code is on main.

Suggested fix

Copy the .sidebar-navigation .sidebar-item and .sidebar-item-text rules from theme.scss to theme-dark.scss. Also add padding, margin, and border-radius to the dark active pill. Then compare the sidebar in a light-mode and a dark-mode preview.

Found by an automated review of docs.rstudio.com, which uses v8.1.4.

Dominant language
SCSS
Stars
6
Forks
5
Avg merge
8h 10m
Merged PRs (30d)
8

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/product-doc-theme

All issues in posit-dev/product-doc-theme

Similar issues

More Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.