Skip to content

Commit

Permalink
dashboard - style OJS valuebox numbers in cell the same way as in div.
Browse files Browse the repository at this point in the history
…Closes #8823
  • Loading branch information
cscheid committed Mar 22, 2024
1 parent b90d5f5 commit 8d045d2
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/resources/formats/dashboard/quarto-dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1016,3 +1016,36 @@ $valuebox-colors: (
.dashboard-data-table {
margin-top: -1px;
}

/*-- ojs --*/

div.value-box-area span.observablehq--number {
/* the calculation below is pretty horrible, but it's our best effort to match
the font sizes of these two different ways of rendering a number in a value-box:
```{ojs}
//| content: valuebox
//| title: "Articles per day"
//| icon: pencil
//| color: primary
12
```
```{python}
#| content: valuebox
#| title: "Articles per day"
#| icon: pencil
#| color: primary
dict(
value = 12
)
```
See https://github.com/quarto-dev/quarto-cli/issues/8823
*/
font-size: calc(clamp(0.1em, 15cqw, 5em) * 1.25);
line-height: 1.2;
color: inherit;
font-family: var(--bs-body-font-family);
}

0 comments on commit 8d045d2

Please sign in to comment.