Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all hardcoded font sizes #1005

Merged
merged 9 commits into from
Jul 25, 2019
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
30 changes: 15 additions & 15 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -416,17 +416,21 @@ tagcloud:


# ---------------------------------------------------------------
# Font Settings. Introduced in NexT v5.0.1.
# Font Settings
# See: https://theme-next.org/docs/theme-settings/#Fonts-Customization
# ---------------------------------------------------------------
# Find fonts on Google Fonts (https://www.google.com/fonts)
# All fonts set here will have the following styles:
# light | light italic | normal | normal italic | bold | bold italic
# Be aware that setting too much fonts will cause site running slowly
# ---------------------------------------------------------------
# To avoid space between header and sidebar in scheme Pisces / Gemini, Web Safe fonts are recommended for `global` (and `logo`):
# To avoid space between header and sidebar in scheme Pisces / Gemini, Web Safe fonts are recommended for `global` (and `title`):
# Arial | Tahoma | Helvetica | Times New Roman | Courier New | Verdana | Georgia | Palatino | Garamond | Comic Sans MS | Trebuchet MS
# ---------------------------------------------------------------

font:
# Use custom fonts families or not.
# Depended options: `external` and `family`.
enable: false

# Uri of fonts host, e.g. //fonts.googleapis.com (Default).
Expand All @@ -435,39 +439,35 @@ font:
# Font options:
# `external: true` will load this font family from `host` above.
# `family: Times New Roman`. Without any quotes.
# `size: xx`. Use `px` as unit.
# `size: x.x`. Use `px` as unit. Default: 16

# Global font settings used for all elements in <body>.
# Global font settings used for all elements inside <body>.
global:
external: true
family: Lato
size:

# Font settings for Headlines (H1, H2, H3, H4, H5, H6).
# Fallback to `global` font settings.
headings:
# Font settings for site title (.site-title).
title:
external: true
family:
size:

# Font settings for posts.
# Fallback to `global` font settings.
posts:
# Font settings for headlines (<h1> to <h6>).
headings:
external: true
family:
size:

# Font settings for Logo.
# Fallback to `global` font settings.
logo:
# Font settings for posts (.post-body).
posts:
external: true
family:
size:

# Font settings for <code> and code blocks.
codes:
external: true
family:
size:


# ---------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/footer/footer.styl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.footer {
font-size: 14px;
font-size: $font-size-small;
color: $grey-dark;

img { border: none; }
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/header/menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

a, span.exturl {
show();
font-size: 13px;
font-size: $font-size-smaller;
line-height: inherit;
border-bottom: 1px solid $menu-link-border;
transition-property: border-color;
Expand Down
5 changes: 3 additions & 2 deletions source/css/_common/components/header/site-meta.styl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
color: $brand-color;
background: $brand-bg;
border-bottom: none;
line-height: $title-font-size;
&:hover { color: $brand-hover-color; }
}

Expand All @@ -25,8 +26,8 @@
.site-title {
display: inline-block;
vertical-align: top;
line-height: 36px;
font-size: $logo-font-size;
line-height: 1.5;
font-size: $title-font-size;
font-weight: normal;
font-family: $font-family-logo;
}
Expand Down
4 changes: 2 additions & 2 deletions source/css/_common/components/highlight/copy-code.styl
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
display: inline-block;
position: absolute;
padding: 2px 6px;
font-size: 13px;
font-size: $font-size-smaller;
font-weight: 700;
line-height: 20px;
line-height: 1.6;
color: #333;
white-space: nowrap;
vertical-align: middle;
Expand Down
3 changes: 1 addition & 2 deletions source/css/_common/components/highlight/highlight.styl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $highlight_theme = hexo-config("codeblock.highlight_theme");
// Placeholder: $code-block
$code-block {
margin: 20px 0;
font-size: $code-font-size;
font-size: $font-size-small;
color: $highlight-foreground;
background: $highlight-background;
line-height: $line-height-code-block;
Expand All @@ -23,7 +23,6 @@ code {
color: $code-foreground;
background: $code-background;
border-radius: $code-border-radius;
font-size: $code-font-size;
}

pre {
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/pages/archive.styl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}

.fa-external-link {
font-size: 15px;
font-size: $font-size-small;
margin-left: 5px;
}
}
2 changes: 1 addition & 1 deletion source/css/_common/components/pages/breadcrumb.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ul.breadcrumb {
margin: 1em 0;
padding: 0 2em;
text-align: center;
font-size: $font-size-small
font-size: $font-size-smallest;

& li {
display: inline;
Expand Down
12 changes: 7 additions & 5 deletions source/css/_common/components/post/post-collapse.styl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
position: relative;
margin: 60px 0;

h1, h2 { margin-left: 20px; }
h1, h2 {
margin-left: 20px;
}

small { color: $grey; margin-left: 5px; }

Expand Down Expand Up @@ -63,7 +65,7 @@
content: " ";
position: absolute;
left: 0;
top: 12px;
top: $font-size-smallest;
width: 6px;
height: 6px;
margin-left: -4px;
Expand All @@ -83,16 +85,16 @@

.post-meta {
position: absolute;
font-size: 12px;
font-size: $font-size-smallest;
left: 20px;
top: 5px;
}

.post-comments-count { display: none; }

.post-title {
margin-left: 60px;
font-size: 16px;
margin-left: $font-size-smallest * 5;
font-size: $font-size-medium;
font-weight: normal;
line-height: inherit;

Expand Down
4 changes: 0 additions & 4 deletions source/css/_common/components/post/post-copyright.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@
border-left: $post-copyright.border.width $post-copyright.border.style $post-copyright.border.color;
background-color: $post-copyright.bg;
list-style: none;

i.fa {
font-size: 15px;
}
}
4 changes: 2 additions & 2 deletions source/css/_common/components/post/post-meta.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
margin: 3px 0 60px 0;
color: $grey-dark;
font-family: $font-family-posts;
font-size: 12px;
font-size: $font-size-smallest;
text-align: center;

.post-description {
font-size: 14px;
font-size: $font-size-small;
margin-top: 2px;
}

Expand Down
6 changes: 3 additions & 3 deletions source/css/_common/components/post/post-nav.styl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
a {
position: relative;
show();
line-height: 25px;
font-size: 14px;
line-height: 1.6;
font-size: $font-size-small;
color: $link-color;
border-bottom: none;

Expand All @@ -33,7 +33,7 @@
}

.fa {
font-size: 12px;
font-size: $font-size-smallest;
margin-right: 5px;
}
}
Expand Down
5 changes: 2 additions & 3 deletions source/css/_common/components/post/post-reward.styl
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
margin: 0;
padding: 0 15px;
border-radius: 5px;
height: $font-size-large * 2;
line-height: $font-size-large * 2;
font-size: $font-size-large;
line-height: 2;
font-size: $font-size-medium;
color: #fff;
background: #F44336;
letter-spacing: normal;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/post/post-tags.styl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
a {
display: inline-block;
margin-right: 10px;
font-size: 13px;
font-size: $font-size-smaller;
}
}
2 changes: 1 addition & 1 deletion source/css/_common/components/post/post-title.styl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}

.fa {
font-size: 20px;
font-size: $font-size-larger;
margin-left: 5px;
}
}
2 changes: 1 addition & 1 deletion source/css/_common/components/post/post-widgets.styl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}

.social-like {
font-size: 14px;
font-size: $font-size-small;
text-align: center;
display: flex;
justify-content: center;
Expand Down
6 changes: 3 additions & 3 deletions source/css/_common/components/post/post.styl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

.post-body span.exturl {
.fa {
font-size: 14px;
font-size: $font-size-small;
margin-left: 4px;
}
}
Expand All @@ -21,15 +21,15 @@
.post-body .figure .caption {
margin: -20px auto 15px;
text-align: center;
font-size: $font-size-base;
font-size: $font-size-small;
color: $grey-dark;
font-weight: bold;
line-height: 1;
}

.post-sticky-flag {
display: inline-block;
font-size: 16px;
font-size: $font-size-medium;
transform: rotate(30deg);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
margin-right: 10px;
margin-bottom: 10px;
border-bottom-color: $black-light;
font-size: 13px;
font-size: $font-size-smaller;
if hexo-config('social_icons.transition') { the-transition(); }

&::before {
Expand Down
4 changes: 2 additions & 2 deletions source/css/_common/components/sidebar/sidebar-blogroll.styl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.links-of-blogroll {
margin-top: 10px;
font-size: 13px;
font-size: $font-size-smaller;
}

.links-of-blogroll-title {
margin-top: 0;
font-size: 14px;
font-size: $font-size-small;
font-weight: $font-weight-bold;
}
.links-of-blogroll-list {
Expand Down
1 change: 0 additions & 1 deletion source/css/_common/components/sidebar/sidebar-button.styl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

i {
color: rgb(252, 100, 35);
font-size: 14px;
}

&:hover {
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/sidebar/sidebar-nav.styl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
display: inline-block;
cursor: pointer;
border-bottom: 1px solid transparent;
font-size: 14px;
font-size: $font-size-small;
color: $sidebar-nav-color;

&:hover { color: $sidebar-nav-hover-color; }
Expand Down
4 changes: 2 additions & 2 deletions source/css/_common/components/sidebar/sidebar-toc.styl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.post-toc-empty {
font-size: 14px;
font-size: $font-size-small;
color: $grey-dim;
}

Expand All @@ -12,7 +12,7 @@
padding: 0 2px 5px 10px;
text-align: left;
list-style: none;
font-size: 14px;
font-size: $font-size-small;

& > ol { padding-left: 0; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ul.popular-posts {
margin-left: 2em;
.popular-posts-title {
font-weight: normal;
font-size: $font-size-base;
font-size: $font-size-small;
margin: 0;
line-height: $line-height-base * 1.2;
}
Expand Down
Loading