rstudio / rstudio/bslib

Small `value_box()` doesn't align showcase properly

Open
#994 1 comment 0 reactions 1 assignee View on GitHub

@cpsievert is already working on this.

Since Feb 27, 2024.

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

Description

When value boxes get small, we change from a "left center" layout to a "top right" layout. Turns out that, the right portion of that just happens to work when you put icons (which have margin-left: auto) in the showcase, but if you put something else, like text, the showcase is centered:

library(bslib)

page_fixed(
  value_box(
    "Title", "value", showcase = span("showcase"),
    style = "width: 275px; resize: both"
  )
)
Screenshot 2024-02-26 at 6 06 31 PM

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.