Skip to content

Commit

Permalink
Avoid applying quarto-figure CSS inside html widgets outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
cderv committed Feb 19, 2024
1 parent 6f4e15c commit 43d304b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions news/changelog-1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ All changes included in 1.5:
- ([#4802](https://github.com/quarto-dev/quarto-cli/issues/4802)): Change name of temporary input notebook to avoid accidental overwriting.
- ([#8433](https://github.com/quarto-dev/quarto-cli/issues/8433)): Escape jupyter widget states that contain `</script>` so they can be embedded in HTML documents.

## Knitr

- ([#7843](https://github.com/quarto-dev/quarto-cli/issues/7843)): fix an issue with Quarto figure specific css rules applying inside HTML widgets output.

## Website Listings

- ([#8147](https://github.com/quarto-dev/quarto-cli/issues/8147)): Ensure that listings don't include the contents of the output directory
Expand Down
9 changes: 6 additions & 3 deletions src/resources/formats/html/_quarto-rules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,18 @@ figure .quarto-layout-row figure figcaption {
margin-bottom: 0;
}
.quarto-figure-left > figure > p,
.quarto-figure-left > figure > div /* for mermaid and dot diagrams */ {
/* for mermaid and dot diagrams, excluding impact on htmlwidget output */
.quarto-figure-left > figure > div:not(.html-widget, :nth-child(1):not(.html-widget)) {
text-align: left;
}
.quarto-figure-center > figure > p,
.quarto-figure-center > figure > div /* for mermaid and dot diagrams */ {
/* for mermaid and dot diagrams, excluding impact on htmlwidget output */
.quarto-figure-center > figure > div:not(.html-widget, :nth-child(1):not(.html-widget)) {
text-align: center;
}
.quarto-figure-right > figure > p,
.quarto-figure-right > figure > div /* for mermaid and dot diagrams */ {
/* for mermaid and dot diagrams, excluding impact on htmlwidget output */
.quarto-figure-right > figure > div:not(.html-widget, :nth-child(1):not(.html-widget)) {
text-align: right;
}

Expand Down

0 comments on commit 43d304b

Please sign in to comment.