Skip to content

Commit

Permalink
fix: font-family 修复字体搭配失效问题
Browse files Browse the repository at this point in the history
  • Loading branch information
MOxFIVE committed Apr 18, 2016
1 parent acc93bb commit c5cfa4b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
5 changes: 1 addition & 4 deletions source/css/_partial/article.styl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
.article-title {
color: #696969;
margin-left: 0px;
font-weight: 300;
font-weight: 400;
line-height: 1.3;
margin-bottom: 20px;
-webkit-transition: color 0.3s;
Expand Down Expand Up @@ -191,7 +191,6 @@
}
h2{
margin: .5em auto;
font-weight: bold;
color: #9c9;
padding-bottom: 5px;
border-bottom: 1px solid #ddd;
Expand All @@ -210,7 +209,6 @@
background: rgba(243, 248, 253, .6);
border: 1px solid #d2e8fa;
padding: 0.2em 0.6em;
font-weight: normal;
&:hover a {
text-decoration: underline;
};
Expand All @@ -220,7 +218,6 @@
}
h4,h5,h6{
margin-top: 20px;
font-weight: bold;
color: #574C4C;
padding-bottom: 5px;
border-bottom: 1px solid #ddd;
Expand Down
4 changes: 2 additions & 2 deletions source/css/_partial/highlight.styl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $line-numbers

.article-entry
pre, code
font-family: font-mono, font-chs
font-family: font-mono, monospace, font-chs
font-size: 1em
pre
@extend $code-block
Expand Down Expand Up @@ -67,7 +67,7 @@ $line-numbers
padding: 15px article-padding 15px 0
.gist-file
border: none
font-family: font-mono
font-family: font-mono monospace
margin: 0
.gist-data
background: none
Expand Down
2 changes: 1 addition & 1 deletion source/css/_partial/main.styl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
.header-author{
text-align: center;
margin: 13px 0;
font-family: Roboto, "Roboto", serif;
font-family: font-serif, serif;
font-size: base-font-size + 14;
transition: 0.3s;
}
Expand Down
8 changes: 4 additions & 4 deletions source/css/_variables.styl
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ color-pinterest = #cb2027
color-google = #dd4b39

// Fonts
font-chs = "Microsoft YaHei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif
font-sans = "Lucida Grande", Verdana, "Helvetica Neue", Arial, sans-serif
font-serif = Times, Georgia, serif
font-mono = Menlo, Consolas, "Source Code Pro", Inconsolata, Monaco, monospace
font-chs = "Microsoft YaHei", "Hiragino Sans GB", "WenQuanYi Micro Hei" // sans-serif
font-sans = "Lucida Grande", Verdana, "Helvetica Neue", Arial // sans-serif
font-serif = Times, Georgia // serif
font-mono = Menlo, Consolas, "Source Code Pro", Inconsolata, Monaco // monospace
font-icon = FontAwesome
base-font-size = hexo-config("base_font_size")px
font-size = 14px
Expand Down
5 changes: 3 additions & 2 deletions source/css/style.styl
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ body
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
-moz-font-feature-settings: "liga" on;
color: rgba(0,0,0,.75);
color: #333
-webkit-overflow-scrolling: touch

::selection
background: rgba(147, 181, 224, .6);
color: white;

h2,h3,h4,h5,h6 {
font-family: font-serif, font-chs;
font-family: font-serif, serif;
font-weight bold
}
h1,h2,h3{
display: block;
Expand Down

1 comment on commit c5cfa4b

@MOxFIVE
Copy link
Owner Author

Choose a reason for hiding this comment

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

#78

预期基础字体搭配:

font-family:  "Lucida Grande", Verdana, "Helvetica Neue", Arial, "Microsoft YaHei", 
"Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif

之前实际有效的样式:

font-family: "Lucida Grande", Verdana, "Helvetica Neue", Arial, sans-serif

Please sign in to comment.