Tweaking `cli::col_h1()` styling

Open
#696 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start with the cli::cli_h1() and themes reference examples, then compare the documented behavior with cli::rule(left = "aa", right = "a", col = "yellow"). Clarify how the id and class arguments support custom theming, add examples for the requested styling, and ensure the documentation explains the expected output.

Written by the indexing model from the issue text.

Description

feature

I am wondering if it was possible to make this output with cli::cli_h1()

image

cli::cli_h1(cli::col_yellow("GP goodpractice"))

Almost does it, but it doesn't affect the line.

I tried playing with https://cli.r-lib.org/reference/themes.html#examples, but it doesn't really work.

I am wondering if docs could be enhanced generally for the id and class arguments. More examples on how to create custom theming of elements would be great!

I'd be happy to make some doc edits, but I can't figure out how things work at the moment..

Using cli::rule(left = "aa", right = "a", col = "yellow") works

Dominant language
R
Stars
726
Forks
94
Avg merge
3h 35m
Merged PRs (30d)
1

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.

More from r-lib/cli

All issues in r-lib/cli

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.