Skip to content

Commit

Permalink
Add Typography Fonts Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
picturepan2 committed Aug 23, 2017
1 parent 72834a9 commit e5ae885
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/dist/spectre.css
Original file line number Diff line number Diff line change
Expand Up @@ -475,12 +475,14 @@ kbd {
background: #454d5d;
border-radius: .1rem;
color: #fff;
line-height: 1;
padding: .15rem .2rem;
}
mark {
background: #ffe9b3;
border-radius: .1rem;
color: #454d5d;
line-height: 1;
padding: .15rem .2rem;
}
blockquote {
Expand Down Expand Up @@ -1242,7 +1244,7 @@ code {
border-radius: .1rem;
color: #e06870;
font-size: .65rem;
line-height: 1rem;
line-height: 1;
padding: .15rem .2rem;
}
.code {
Expand Down
2 changes: 1 addition & 1 deletion docs/dist/spectre.min.css

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions docs/elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,25 @@ <h6>Korean</h6>
<!-- east asian example -->
<pre class="code" data-lang="HTML"><code>&lt;<span class="tag">p</span> <span class="atn">class</span>=<span class="atv">&quot;cjk&quot;</span>&gt;&lt;<span class="tag">u</span>&gt;祇園&lt;<span class="tag">/u</span>&gt;&lt;<span class="tag">u</span>&gt;精舎&lt;<span class="tag">/u</span>&gt;の鐘の声、諸行無常の響きあり。……&lt;<span class="tag">/p</span>&gt;
&lt;<span class="tag">p</span> <span class="atn">class</span>=<span class="atv">&quot;cjk&quot;</span>&gt;&lt;<span class="tag">del</span>&gt;祇園&lt;<span class="tag">/del</span>&gt;&lt;<span class="tag">del</span>&gt;精舎&lt;<span class="tag">/del</span>&gt;の鐘の声、諸行無常の響きあり。……&lt;<span class="tag">/p</span>&gt;
</code></pre>

<h4 id="typography-fonts" class="s-subtitle">Fonts</h4>
<div class="docs-note">
<p>Spectre sets the most common and best <code>font-family</code> for each OS with fallback support in old systems. There are also fonts targeted East Asian typography.</p>
</div>

<!-- fonts -->
<pre class="code"><code><span class="com">&lt;!-- Western typography targeted --&gt;</span>
<span class="atn">font-family</span>: <span class="atv">-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif</span>;
<span class="com">&lt;!-- Monospace typography targeted --&gt;</span>
<span class="atn">font-family</span>: <span class="atv">"SF Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Courier, monospace</span>;

<span class="com">&lt;!-- Chinese typography targeted --&gt;</span>
<span class="atn">font-family</span>: <span class="atv">-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif</span>;
<span class="com">&lt;!-- Japanese typography targeted --&gt;</span>
<span class="atn">font-family</span>: <span class="atv">-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic Pro", "Yu Gothic", YuGothic, Meiryo, "Helvetica Neue", sans-serif</span>;
<span class="com">&lt;!-- Korean typography targeted --&gt;</span>
<span class="atn">font-family</span>: <span class="atv">-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", "Helvetica Neue", sans-serif</span>;
</code></pre>

<h4 id="typography-blockquote" class="s-subtitle">Blockquote</h4>
Expand Down
1 change: 0 additions & 1 deletion src/codes.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ code {
font-size: .65rem;
.label-base();
.label-variant(@code-color, lighten(@code-color, 33%));
line-height: @line-height;
}

.code {
Expand Down
1 change: 1 addition & 0 deletions src/mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
// Label base style
.label-base() {
border-radius: @border-radius;
line-height: 1;
padding: .15rem .2rem;
}

Expand Down

0 comments on commit e5ae885

Please sign in to comment.