Skip to content

Commit 8ef3805

Browse files
Merge pull request #226 from nothingworksinc/vertical-alignment-docs
Add vertical alignment docs
2 parents a01f57c + 5884062 commit 8ef3805

File tree

1 file changed

+89
-4
lines changed

1 file changed

+89
-4
lines changed

docs/source/docs/vertical-alignment.blade.md

Lines changed: 89 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,94 @@ title: "Vertical Alignment"
55

66
# Vertical Alignment
77

8-
<div class="subnav">
9-
<a class="subnav-link" href="#usage">Usage</a>
10-
<a class="subnav-link" href="#responsive">Responsive</a>
11-
<a class="subnav-link" href="#customizing">Customizing</a>
8+
<div class="text-xl text-slate-light mb-4">
9+
Utilities for controlling the vertical alignment of an inline or table-cell box.
1210
</div>
1311

12+
@include('_partials.feature-badges', [
13+
'responsive' => true,
14+
'customizable' => false,
15+
'hover' => false,
16+
'focus' => false
17+
])
18+
19+
<div class="border-t border-grey-lighter">
20+
<table class="w-full text-left" style="border-collapse: collapse;">
21+
<colgroup>
22+
<col class="w-1/5">
23+
<col class="w-1/3">
24+
<col>
25+
</colgroup>
26+
<thead>
27+
<tr>
28+
<th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest">Class</th>
29+
<th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest">Properties</th>
30+
<th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest">Description</th>
31+
</tr>
32+
</thead>
33+
<tbody class="align-baseline">
34+
<tr>
35+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.align-baseline</td>
36+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">vertical-align: baseline;</td>
37+
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Align the baseline of an element with the baseline of its parent</td>
38+
</tr>
39+
<tr>
40+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.align-top</td>
41+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">vertical-align: top;</td>
42+
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Align the top of an element and its descendants with the top of the entire line.</td>
43+
</tr>
44+
<tr>
45+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.align-middle</td>
46+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">vertical-align: middle;</td>
47+
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Align the middle of an element with the baseline plus half the x-height of the parent.</td>
48+
</tr>
49+
<tr>
50+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.align-bottom</td>
51+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">vertical-align: bottom;</td>
52+
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Align the bottom of an element and its descendants with the bottom of the entire line.</td>
53+
</tr>
54+
<tr>
55+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.align-text-top</td>
56+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">vertical-align: text-top;</td>
57+
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Align the top of an element with the top of the parent element's font.</td>
58+
</tr>
59+
<tr>
60+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.align-text-bottom</td>
61+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">vertical-align: text-bottom;</td>
62+
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Align the bottom of an element with the bottom of the parent element's font.</td>
63+
</tr>
64+
</tbody>
65+
</table>
66+
</div>
67+
68+
### Tables
69+
70+
@component('_partials.code-sample')
71+
<table class="w-full">
72+
<tbody>
73+
<tr>
74+
<td class="py-8 text-grey-darker align-baseline">Baseline text<td>
75+
<td class="py-6 text-grey-darker align-top">Top-aligned text<td>
76+
<td class="py-4 text-grey-darker align-middle">Middle-aligned text<td>
77+
<td class="py-2 text-grey-darker align-bottom">Bottom-aligned text<td>
78+
</tr>
79+
</tbody>
80+
</table>
81+
@endcomponent
82+
83+
84+
### Inline-block Elements
85+
86+
@component('_partials.code-sample')
87+
<div>
88+
<button class="align-middle text-blue-dark font-semibold py-2 px-4 border border-blue rounded mr-3">
89+
Button
90+
</button>
91+
<button class="align-middle bg-blue-dark text-white text-sm font-semibold py-1 px-3 border border-blue-dark rounded-full mr-3">
92+
Button
93+
</button>
94+
<button class="align-middle text-blue-dark font-semibold py-3 px-6 border border-blue rounded">
95+
Button
96+
</button>
97+
</div>
98+
@endcomponent

0 commit comments

Comments
 (0)