Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions source/css/_common/scaffolding/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,17 @@ h1, h2, h3, h4, h5, h6 { margin: 20px 0 15px; }
for headline in (1..6) {
h{headline} {
font-size: $font-size-headings-base - $font-size-headings-step * headline;
code {
font-size: $font-size-headings-base - $font-size-headings-step * headline;
}
}

+mobile() {
h{headline} {
font-size: $font-size-headings-base - $font-size-headings-step * headline - 4px;
code {
font-size: $font-size-headings-base - $font-size-headings-step * headline - 4px;
}
}
}
}
Expand Down
18 changes: 18 additions & 0 deletions source/css/_schemes/Gemini/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,22 @@ use_seo = hexo-config('seo');
h1 {
font-size: 1.6em;
border-bottom: 1px solid $body-bg-color;
code {
font-size: 1em;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mb need to define same em size?
For all headers below too.

Copy link
Contributor Author

@balloonio balloonio Dec 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

em | Relative to the font-size of the element (2em means 2 times the size of the current font) source

When setting h1 code font-size, the current font-size is already set to h1's font-size. Therefore, h1 code font-size 1em means relatively the same size as h1's font-size.

Here is my test results using Gemini theme with my fix. First image is the result using 1em. Second image is the result using 1.6em( the same font-size as h1).
image
image

}
}
h2 {
font-size: 1.45em;
border-bottom: 1px solid $body-bg-color;
code {
font-size: 1em;
}
}
h3 {
font-size: 1.3em;
code {
font-size: 1em;
}
if use_seo {
border-bottom: 1px solid $body-bg-color;
} else {
Expand All @@ -158,15 +167,24 @@ use_seo = hexo-config('seo');
}
h4 {
font-size: 1.2em;
code {
font-size: 1em;
}
if use_seo {
border-bottom: 1px dotted $body-bg-color;
}
}
h5 {
font-size: 1.07em;
code {
font-size: 1em;
}
}
h6 {
font-size: 1.03em;
code {
font-size: 1em;
}
}
}

Expand Down