Skip to content

Commit 892c8a6

Browse files
authored
fix: added tab-size support for top-level content and code elements (#632)
1 parent 75c6cae commit 892c8a6

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,14 @@ MIT
8787
- `--yfm-color-table-row-background`
8888
- `--yfm-color-border`
8989
- `--yfm-color-accent`
90+
- `--yfm-tab-size`
9091

9192
**code**
9293

9394
- `--yfm-color-inline-code`
9495
- `--yfm-color-inline-code-background`
9596
- `--yfm-color-code-background`
97+
- `--yfm-tab-size-code`
9698

9799
**hightlight**
98100

README.ru.md

+2
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,14 @@ MIT
8787
- `--yfm-color-table-row-background`
8888
- `--yfm-color-border`
8989
- `--yfm-color-accent`
90+
- `--yfm-tab-size`
9091

9192
**code**
9293

9394
- `--yfm-color-inline-code`
9495
- `--yfm-color-inline-code-background`
9596
- `--yfm-color-code-background`
97+
- `--yfm-tab-size-code`
9698

9799
**hightlight**
98100

src/scss/_common.scss

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
line-height: 20px;
2323
word-wrap: break-word;
2424
color: var(--yfm-color-text);
25+
tab-size: var(--yfm-tab-size, inherit);
2526

2627
* {
2728
box-sizing: border-box;
@@ -349,6 +350,7 @@
349350
font-size: 0.875em;
350351
white-space: pre-wrap;
351352
color: var(--yfm-color-inline-code);
353+
tab-size: var(--yfm-tab-size-code, inherit);
352354
}
353355

354356
pre {

0 commit comments

Comments
 (0)