Skip to content

Commit

Permalink
feat: support tab-size CSS property
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Jan 6, 2020
1 parent b7cf602 commit 56a9e1d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions assets/scss/_common/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ html, body {

body {
font-size: $fontSize;
tab-size: $tabSize;
color: var(--color-contrast-high);
background-color: var(--color-bg);
overflow-wrap: break-word;
Expand Down
4 changes: 4 additions & 0 deletions assets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
$enableBackToTopAutoHide: false;
{{ end }}

{{ with .Site.Params.tabSize | default 4 }}
$tabSize: {{ . }};
{{ end }}

{{ if .Site.Params.enableChinesePunctuationGlyphCorrection }}
{{ .Scratch.Set "glyph" "'glyph-correction', " }}
$glyph: true;
Expand Down
5 changes: 5 additions & 0 deletions config-examples/en-us/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,11 @@ uglyURLs = false

fontSize = 20

######################################
## Tab Size

tabSize = 4

######################################
## Line Height

Expand Down
5 changes: 5 additions & 0 deletions config-examples/zh-cn/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,11 @@ uglyURLs = false

fontSize = 16

######################################
## 制表符的宽度

tabSize = 4

######################################
## 行间距

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Target":"css/meme.min.46b2a650b7c9df1e9a4c1f4bbdb37e988a26d2f08cc6ebc293c348fe3b595a8e.css","MediaType":"text/css","Data":{"Integrity":"sha256-RrKmULfJ3x6aTB9LvbN+mIom0vCMxuvCk8NI/jtZWo4="}}
{"Target":"css/meme.min.4b148ff5a3ef5b23cc4b3535a90689d12e6a69919d40258fc65e3a9c4c5697a9.css","MediaType":"text/css","Data":{"Integrity":"sha256-SxSP9aPvWyPMSzU1qQaJ0S5qaZGdQCWPxl46nExWl6k="}}

0 comments on commit 56a9e1d

Please sign in to comment.