Skip to content

Commit 4a0a3cc

Browse files
author
mrmrs
committed
Update image documentation.
1 parent 6aec2da commit 4a0a3cc

File tree

3 files changed

+20
-50
lines changed

3 files changed

+20
-50
lines changed

docs/general/images/index.html

+10-25
Original file line numberDiff line numberDiff line change
@@ -42,36 +42,21 @@
4242
</header>
4343

4444
<main class="">
45-
<article class="bg-near-white bt b--black-10 ph3 pt3 ph5-ns">
46-
<h4 class="f4 mv0 fw6 dib mr4">tachyons-images</h4>
47-
<span class="f4 b dib pl0 ml0 mr4">v1.0.3</span>
48-
<span class="f4 b dib pl0 ml0 mr4">41 B</span>
49-
<div>
50-
<dl class="dib mr4 mt0">
51-
<dt class="f6 db">Declarations </dt>
52-
<dd class="db pl0 ml0 f4 f2-ns b">1</span></dd>
53-
</dl>
54-
<dl class="dib mr4">
55-
<dt class="f6 db pr2">Selectors </dt>
56-
<dd class="db pl0 ml0 f4 f2-ns b">1</dd>
57-
</dl>
58-
<dl class="dib mr4">
59-
<dt class="f6 db pr2">Max. Specificity Score </dt>
60-
<dd class="db pl0 ml0 f4 f2-ns b">1</dd>
61-
</dl>
62-
<dl class="dib mr4">
63-
<dt class="f6 db pr2">Size of Avg. Rule </dt>
64-
<dd class="db pl0 ml0 f4 f2-ns b">1</dd>
65-
</dl>
66-
</div>
45+
<article class="bg-near-white bt b--black-10 pa3 ph5-ns">
46+
<h4 class="f4 mv0 fw6 dib mr4">images</h4>
6747
</article>
6848
<div class="ph3 ph5-ns pt4 pb5">
6949
<h2 class="f3 bold">Examples</h2>
7050
<h3 class="f5 book pt4 caps">Image</h3>
71-
<p class="measure lh-copy f4 f3-ns">
72-
This photo is more than 3000 pixels wide. The max-width set to 100% ensures it doesn't bleed off the viewport.
51+
<p class="measure lh-copy f5 f4-ns">
52+
This photo is more than 3000 pixels wide. The width is set to 100% to ensure it doesn't bleed off the viewport and always fills its container. In some situations, this will make the image stretch to be larger than it's actual width. To avoid the image stretching past it's width, set max-width instead.
7353
</p>
74-
<img src="/img/over-canvas.jpg">
54+
<code class="f6 db mv3">&lt;img src="/img/over-canvas.jpg" class="w-100"&gt;</code>
55+
<img src="/img/over-canvas.jpg" class="w-100">
56+
<p class="f5 f4-ns lh-copy measure mt4">The image below is 720 pixels wide, it will fill it's container until the container is wider than 720 pixels.
57+
58+
<code class="f6 db mv3">&lt;img src="/img/under-canvas.jpg" class="mw-100"&gt;</code>
59+
<img src="/img/under-canvas.jpg" class="db mw-100">
7560
<div class="mt5 cf">
7661
<div class="dib mr4">
7762
<h1 class="f4 ttu tracked fw6">Previous</h1>

img/under-canvas.jpg

24.8 KB
Loading

src/templates/docs/images/index.html

+10-25
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,21 @@
1515

1616
<%= siteHeader %>
1717
<main class="">
18-
<article class="bg-near-white bt b--black-10 ph3 pt3 ph5-ns">
19-
<h4 class="f4 mv0 fw6 dib mr4"><%= name %></h4>
20-
<span class="f4 b dib pl0 ml0 mr4">v<%= moduleVersion %></span>
21-
<span class="f4 b dib pl0 ml0 mr4"><%= moduleSize %></span>
22-
<div>
23-
<dl class="dib mr4 mt0">
24-
<dt class="f6 db">Declarations </dt>
25-
<dd class="db pl0 ml0 f4 f2-ns b"><%= moduleObj.declarations.total %></span></dd>
26-
</dl>
27-
<dl class="dib mr4">
28-
<dt class="f6 db pr2">Selectors </dt>
29-
<dd class="db pl0 ml0 f4 f2-ns b"><%= moduleObj.selectors.total %></dd>
30-
</dl>
31-
<dl class="dib mr4">
32-
<dt class="f6 db pr2">Max. Specificity Score </dt>
33-
<dd class="db pl0 ml0 f4 f2-ns b"><%= moduleObj.selectors.specificity.max %></dd>
34-
</dl>
35-
<dl class="dib mr4">
36-
<dt class="f6 db pr2">Size of Avg. Rule </dt>
37-
<dd class="db pl0 ml0 f4 f2-ns b"><%= moduleObj.rules.size.average %></dd>
38-
</dl>
39-
</div>
18+
<article class="bg-near-white bt b--black-10 pa3 ph5-ns">
19+
<h4 class="f4 mv0 fw6 dib mr4">images</h4>
4020
</article>
4121
<div class="ph3 ph5-ns pt4 pb5">
4222
<h2 class="f3 bold">Examples</h2>
4323
<h3 class="f5 book pt4 caps">Image</h3>
44-
<p class="measure lh-copy f4 f3-ns">
45-
This photo is more than 3000 pixels wide. The max-width set to 100% ensures it doesn't bleed off the viewport.
24+
<p class="measure lh-copy f5 f4-ns">
25+
This photo is more than 3000 pixels wide. The width is set to 100% to ensure it doesn't bleed off the viewport and always fills its container. In some situations, this will make the image stretch to be larger than it's actual width. To avoid the image stretching past it's width, set max-width instead.
4626
</p>
47-
<img src="/img/over-canvas.jpg">
27+
<code class="f6 db mv3">&lt;img src="/img/over-canvas.jpg" class="w-100"&gt;</code>
28+
<img src="/img/over-canvas.jpg" class="w-100">
29+
<p class="f5 f4-ns lh-copy measure mt4">The image below is 720 pixels wide, it will fill it's container until the container is wider than 720 pixels.
30+
31+
<code class="f6 db mv3">&lt;img src="/img/under-canvas.jpg" class="mw-100"&gt;</code>
32+
<img src="/img/under-canvas.jpg" class="db mw-100">
4833
<div class="mt5 cf">
4934
<div class="dib mr4">
5035
<h1 class="f4 ttu tracked fw6">Previous</h1>

0 commit comments

Comments
 (0)