Revealjs: code block at the end of a callout lost its bottom spacing since 1.8.15
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- html, scss
- Lĩnh vực
- frontend
Hướng nghiên cứu
Hai quy tắc nằm trong src/resources/formats/revealjs/quarto.scss, quanh các dòng 919-926 và 975-977, và chúng khớp với div.sourceCode cuối cùng nhưng không khớp với lớp bao div.code-copy-outer-scaffold do bộ hậu xử lý HTML thêm vào (xem src/format/reveal/format-reveal.ts quanh dòng 260). Hãy render một bản trình chiếu revealjs với một callout kết thúc bằng khối mã, rồi kiểm tra khoảng cách bên dưới đoạn mã trên trình duyệt. Hoàn thành khi cả hai bộ chọn cũng khớp với scaffold như phần tử con cuối cùng và khoảng cách khớp với 1.7.34 cho cả hai loại callout.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In Revealjs, when a code block is the last element of a callout, it now sits against the bottom of the callout. With appearance="simple" and no title, the code block border touches the callout border.
Gap between the bottom of the code block and the bottom of the callout, measured with Chromium on the example below:
| Callout | 1.7.34 | main |
|---|---|---|
| Default, titled, ending with code | 12.03px | 8.33px |
| Simple, untitled, ending with code | 15.74px | 0.93px |
The 0.93px is only the 1px callout border. Callouts ending with a paragraph render the same in both versions.
#13024 is first released in 1.8.15, so I expect the change to start there. I only rendered with 1.7.34 and main, not with 1.8.14 or 1.8.15.
Reproducible example
---
title: Callout last child code
format: revealjs
---
## Titled ending with code
::: {.callout-note}
## Titled
Some text.
```python
x = 1
```
:::
## Simple untitled ending with code
::: {.callout-note appearance="simple"}
Some text.
```python
x = 1
```
:::
What happens
Since #13024, the HTML postprocessor wraps code blocks in a div.code-copy-outer-scaffold for the copy button. Revealjs uses the same postprocessor with copyCode: true:
So the last child of .callout-content is now the scaffold div and not div.sourceCode. Two rules added in #11251 to handle a code block in last position no longer match.
For simple untitled callouts, #11251 added a margin below a last div.sourceCode so that the code border does not merge with the callout border. This rule never matches now, which is the visible part:
For titled callouts, the last child gets padding-bottom: 0.5rem and no margin, except when it is a div.sourceCode, which keeps the var(--r-block-margin) margin. This exclusion was there to avoid the duplicated background color on a code block in last position. The scaffold is not excluded, so it gets the 8px padding instead of the 12px margin. This one is more cosmetic.
We could make both selectors also target div.code-copy-outer-scaffold when it is the last child.
Related: #13446 and #13238 are about the same scaffold change on HTML callouts, which use different rules in the Bootstrap stylesheets.
- Ngôn ngữ chính
- JavaScript
- Star
- 6.1k
- Fork
- 463
- Merge trung bình
- 21 giờ 10 phút
- Pull request đã merge (30 ngày)
- 61
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của quarto-dev/quarto-cli
-
Website navbar hides the notebook preview headerCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởaccessibility bug embed websites
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
quarto-dev/quarto-cli#14972 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility documentation revealjs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
quarto-dev/quarto-cli#14971 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility revealjs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
quarto-dev/quarto-cli#14970 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
a11y: notebook preview header is outside any landmarkCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởaccessibility embed
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
quarto-dev/quarto-cli#14968 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility revealjs themes
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
quarto-dev/quarto-cli#14963 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của quarto-dev/quarto-cli
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
yjh051108/dsh-routing-suite#216 ·
-
bug user-priority/P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
t8y2/dbx#11718 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 4 ngày
-
bug confirmed perf
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
videojs/video.js#9400 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent/scanner bug hive/hosted-available-lke648397-260827-5n31
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày