Skip to content

Commit 919ff12

Browse files
sjtrimblematsko
authored andcommitted
fix(aio): cheatsheet table layout fix
1 parent 6748aea commit 919ff12

2 files changed

Lines changed: 21 additions & 15 deletions

File tree

‎aio/content/guide/cheatsheet.md‎

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ Cheat Sheet
33

44
@description
55

6-
<div class="l-content-small grid-fluid docs-content cheatsheet">
7-
8-
<table>
6+
<div id="cheatsheet">
7+
<table class="is-full-width is-fixed-layout">
98
<tbody><tr>
109
<th>Bootstrapping</th>
1110
<th><p><code>import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';</code>
@@ -19,7 +18,7 @@ Cheat Sheet
1918
</tr>
2019
</tbody></table>
2120

22-
<table>
21+
<table class="is-full-width is-fixed-layout">
2322
<tbody><tr>
2423
<th>NgModules</th>
2524
<th><p><code>import { NgModule } from '@angular/core';</code>
@@ -54,7 +53,7 @@ is available to <code>declarations</code> of this module.</p>
5453
</tr>
5554
</tbody></table>
5655

57-
<table>
56+
<table class="is-full-width is-fixed-layout">
5857
<tbody><tr>
5958
<th>Template syntax</th>
6059
<th></th>
@@ -120,7 +119,7 @@ is available to <code>declarations</code> of this module.</p>
120119
</tr>
121120
</tbody></table>
122121

123-
<table>
122+
<table class="is-full-width is-fixed-layout">
124123
<tbody><tr>
125124
<th>Built-in directives</th>
126125
<th><p><code>import { CommonModule } from '@angular/common';</code>
@@ -146,7 +145,7 @@ is available to <code>declarations</code> of this module.</p>
146145
</tr>
147146
</tbody></table>
148147

149-
<table>
148+
<table class="is-full-width is-fixed-layout">
150149
<tbody><tr>
151150
<th>Forms</th>
152151
<th><p><code>import { FormsModule } from '@angular/forms';</code>
@@ -160,7 +159,7 @@ is available to <code>declarations</code> of this module.</p>
160159
</tr>
161160
</tbody></table>
162161

163-
<table>
162+
<table class="is-full-width is-fixed-layout">
164163
<tbody><tr>
165164
<th>Class decorators</th>
166165
<th><p><code>import { Directive, ... } from '@angular/core';</code>
@@ -187,7 +186,7 @@ is available to <code>declarations</code> of this module.</p>
187186
</tr>
188187
</tbody></table>
189188

190-
<table>
189+
<table class="is-full-width is-fixed-layout">
191190
<tbody><tr>
192191
<th>Directive configuration</th>
193192
<th><p><code>@Directive({ property1: value1, ... })</code>
@@ -207,7 +206,7 @@ is available to <code>declarations</code> of this module.</p>
207206
</tr>
208207
</tbody></table>
209208

210-
<table>
209+
<table class="is-full-width is-fixed-layout">
211210
<tbody><tr>
212211
<th>Component configuration</th>
213212
<th><p>
@@ -234,7 +233,7 @@ so the <code>@Directive</code> configuration applies to components as well</p>
234233
</tr>
235234
</tbody></table>
236235

237-
<table>
236+
<table class="is-full-width is-fixed-layout">
238237
<tbody><tr>
239238
<th>Class field decorators for directives and components</th>
240239
<th><p><code>import { Input, ... } from '@angular/core';</code>
@@ -277,7 +276,7 @@ so the <code>@Directive</code> configuration applies to components as well</p>
277276
</tr>
278277
</tbody></table>
279278

280-
<table>
279+
<table class="is-full-width is-fixed-layout">
281280
<tbody><tr>
282281
<th>Directive and component change detection and lifecycle hooks</th>
283282
<th><p>(implemented as class methods)
@@ -323,7 +322,7 @@ so the <code>@Directive</code> configuration applies to components as well</p>
323322
</tr>
324323
</tbody></table>
325324

326-
<table>
325+
<table class="is-full-width is-fixed-layout">
327326
<tbody><tr>
328327
<th>Dependency injection configuration</th>
329328
<th></th>
@@ -343,7 +342,7 @@ so the <code>@Directive</code> configuration applies to components as well</p>
343342
</tr>
344343
</tbody></table>
345344

346-
<table>
345+
<table class="is-full-width is-fixed-layout">
347346
<tbody><tr>
348347
<th>Routing and navigation</th>
349348
<th><p><code>import { Routes, RouterModule, ... } from '@angular/router';</code>
@@ -388,5 +387,4 @@ so the <code>@Directive</code> configuration applies to components as well</p>
388387
</td>
389388
</tr>
390389
</tbody></table>
391-
392390
</div>

‎aio/src/styles/2-modules/_table.scss‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ table {
88
width: 100%;
99
}
1010

11+
&.is-fixed-layout {
12+
table-layout: fixed;
13+
}
14+
1115
thead {
1216
vertical-align: middle;
1317
border-color: inherit;
@@ -83,4 +87,8 @@ table {
8387

8488
}
8589
}
90+
}
91+
92+
#cheatsheet table tbody td {
93+
overflow: auto;
8694
}

0 commit comments

Comments
 (0)