cli icon indicating copy to clipboard operation
cli copied to clipboard

FR: Add subtle style inline markup

Open olivroy opened this issue 2 years ago • 1 comments

I think it would be useful. as an antonym to .emph

pillar::style_subtle() as an inspiration?

I did a bit of investigation and rlang use silver() for printing see last trace. and usethis uses silver by default for their code output. https://github.com/r-lib/rlang/pull/1400/files

cli::cli_text("{.subtle code}")
pillar::style_subtle("code")
 "\033[38;5;246mcode\033[39m"

olivroy avatar Dec 01 '23 16:12 olivroy

An alternative for now:

cli::cli_div(theme = list(".hint" = list(color = "grey60")))
cli::cli_text("{.hint Run {.code tag$stap} to see full stap table}")
cli::cli_end()

Resulting in:

Image

Rafnuss avatar Aug 20 '25 08:08 Rafnuss