rstudio / rstudio/bslib

Document dark/light/gray "magic" more explicitly?

Open
#355 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
569
Forks
72
Avg merge
1d 2h
Merged PRs (30d)
5

Description

Via https://github.com/r-lib/pkgdown/pull/1682#issuecomment-872978930 cc @apreshill

I see the variables vignette mentions that fg and bg are used but I think it'd be clearer if it stated that it means the resulting colors are not grays but a mix of fg and bg.

red_theme <- bslib::bs_theme(version = 4, fg = "red", bg = "yellow")
vanilla_theme <- bslib::bs_theme(version = 4)

bslib::bs_get_variables(red_theme, c("dark", "light", "gray-500", "border-color"))
#>         dark        light     gray-500 border-color 
#>    "#FF3300"    "#FFE600"    "#FF8000"    "#FFB200"
bslib::bs_get_variables(vanilla_theme, c("dark", "light", "gray-500", "border-color"))
#>         dark        light     gray-500 border-color 
#>    "#343a40"    "#f8f9fa"    "#adb5bd"    "#dee2e6"

Created on 2021-07-29 by the reprex package (v2.0.0)

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the variables vignette referenced in the issue and review how it currently describes fg, bg, dark, light, and gray variables. Update the explanation so the color-mixing behavior is explicit, using the provided red/yellow and default-theme examples as guidance; the documentation should clearly explain why these values are not necessarily gray.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, scss
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.