We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Typography Handbook by Kenneth Wang http://typographyhandbook.com/
A concise, referential guide on best web typographic practices. github repo: https://github.com/kennethwang14/TypographyHandbook
這一份排版指南主要分三大部份及其下各小分節 介紹詳細,且參考資源眾多
變因有五:
這邊有很多測試字體的服務~
三種狀況
一需避免,三要拍拍手 第二種比較多討論空間
他這邊舉三種對應方式
1- Flash of Unstyled Text ( FOUT ) 第一種就是先 fallback font 到目標字體加載完畢後再切換,畫面會閃
2- Flash of Invisible Text ( FOIT ) 第二種是先把字隱藏不見,字體載完後秀出來 體感較好,但有可能加載失敗造成永遠不可見
3- The Whitescreen Approach 先白畫面,通通載完再秀
他推薦第一種,理由是「content is king」
這幾類都可以搭配 web font loader 異步處理 & 加載時機判斷
這邊他提到有個 W3C spec 在推:CSS Font Loading Module Level 3
字型都有一些特徵來歸類 而 font-feature-settings 這個 CSS 屬性就可以宣告各邊用到的是哪一種特徵的字型 讓瀏覽器能盡量選有這種特徵的字型做為 fallback
font-feature-settings
這邊他提了一些大小、距離單位的建議用法
em
rem
%
box-sizing: border-box;
max-width
padding-x
Modularscale: 輔助調整各級字級,有相關 Sass & PostCSS 實作 plugin
line-height + margin-bottom + padding
line-height
margin-bottom
padding
建議遵守前面提過的 Law of Proximity
※ 這個參考就好,不要鑽牛角尖…
#000
CSS trcik: underline -> background-image + text-shadow
underline
background-image
text-shadow
記得處理 ::selection 的樣式
::selection
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Typography Handbook
by Kenneth Wang
http://typographyhandbook.com/
這一份排版指南主要分三大部份及其下各小分節
介紹詳細,且參考資源眾多
1. Typographic Design 排版設計
1-1. Visual Hierarchy 視覺層次
變因有五:
1-2. 完形(Gestalt Law)
2. Fonts
2-1. 選字體
這邊有很多測試字體的服務~
2-2. web fonts
2-3. font loading
三種狀況
一需避免,三要拍拍手
第二種比較多討論空間
他這邊舉三種對應方式
1- Flash of Unstyled Text ( FOUT )
第一種就是先 fallback font 到目標字體加載完畢後再切換,畫面會閃
2- Flash of Invisible Text ( FOIT )
第二種是先把字隱藏不見,字體載完後秀出來
體感較好,但有可能加載失敗造成永遠不可見
3- The Whitescreen Approach
先白畫面,通通載完再秀
他推薦第一種,理由是「content is king」
這幾類都可以搭配 web font loader
異步處理 & 加載時機判斷
有兩個資源不錯:
2-4 OpenType Features
字型都有一些特徵來歸類
而
font-feature-settings
這個 CSS 屬性就可以宣告各邊用到的是哪一種特徵的字型讓瀏覽器能盡量選有這種特徵的字型做為 fallback
這篇介紹最詳細~
這頁可以實測網頁效果的 playground ~
W3C spec 反而寫得不多哩
IE10+, Safari 9.1+, Blink, Firefox, iOS Safari 9.3+, Android 4.4+
— Tests by Gustavo Ferreira
這篇直接將結果一次全呈現出來,很猛!棒棒!(不過網頁好長~
3. Web Style Guide
3-1 Relative Units
這邊他提了一些大小、距離單位的建議用法
em
,rem
em
,rem
,%
em
3-2 Containers
box-sizing: border-box;
他這邊推的作法是 inherit 的處理方式~max-width
+padding-x
: mobile-friendly page3-3 Font Sizing
Modularscale: 輔助調整各級字級,有相關 Sass & PostCSS 實作 plugin
3-4 Vertical Spacing
line-height
+margin-bottom
+padding
建議遵守前面提過的 Law of Proximity
建議搭配套件使用: sassline、megatype
※ 這個參考就好,不要鑽牛角尖…
3-5 Color
#000
-> dark-gray3-6 Underlining
CSS trcik:
underline
->background-image
+text-shadow
記得處理
::selection
的樣式The text was updated successfully, but these errors were encountered: