Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit e59cd9a

Browse files
Eric Jimenezkwalrath
Eric Jimenez
authored andcommitted
chore: remove deprecated clear= and use clear layout helpers (#2822)
* define clear layout helpers * replace deprecated clear= with helper
1 parent bde8fe1 commit e59cd9a

File tree

5 files changed

+36
-24
lines changed

5 files changed

+36
-24
lines changed

public/docs/ts/_cache/guide/architecture.jade

+11-11
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ figure
5555

5656
A typical module is a cohesive block of code dedicated to a single purpose.
5757
A module **exports** something of value in that code, typically one thing such as a class.
58-
<br clear="all"><br>
58+
<br class="l-clear-both">
5959

6060
block modules-in-dart
6161
//- N/A
@@ -118,7 +118,7 @@ block angular-library-modules
118118

119119
:marked
120120
`!{_at_angular}/core` is the primary Angular library from which we get most of what we need.
121-
<br clear="all">
121+
<br class="l-clear-both">
122122

123123
There are other important Angular libraries too, such as `!{_at_angular}/common`<span if-docs="ts">,
124124
`!{_at_angular}/http`</span> and `!{_at_angular}/router`.
@@ -229,7 +229,7 @@ figure
229229
We can and _will_ mix our custom components with native HTML in the same layouts.
230230

231231
In this manner we'll compose complex component trees to build out our richly featured application.
232-
<br clear="all">
232+
<br class="l-clear-both">
233233

234234
.l-main-section
235235
:marked
@@ -239,7 +239,7 @@ figure
239239

240240
:marked
241241
<p style="padding-top:10px">Metadata tells Angular how to process a class.</p>
242-
<br clear="all">
242+
<br class="l-clear-both">
243243
:marked
244244
[Looking back at the code](#component-code) for `HeroListComponent`, we see that it's just a class.
245245
There is no evidence of a framework, no "Angular" in it at all.
@@ -294,7 +294,7 @@ figure
294294
We apply other metadata !{_decorator}s in a similar fashion to guide Angular behavior.
295295
`@Injectable`, `@Input`, and `@Output` are a few of the more popular !{_decorator}s
296296
we'll master as our Angular knowledge grows.
297-
<br clear="all">
297+
<br class="l-clear-both">
298298
:marked
299299
The architectural takeaway is that we must add metadata to our code
300300
so that Angular knows what to do.
@@ -314,7 +314,7 @@ figure
314314

315315
There are four forms of data binding syntax. Each form has a direction &mdash; to the DOM, from the DOM, or in both directions &mdash;
316316
as indicated by the arrows in the diagram.
317-
<br clear="all">
317+
<br class="l-clear-both">
318318
:marked
319319
We saw three forms of data binding in our [example](#templates) template:
320320

@@ -350,12 +350,12 @@ figure
350350
We don't know all the details yet,
351351
but it's clear from these examples that data binding plays an important role in communication
352352
between a template and its component.
353-
<br clear="all">
353+
<br class="l-clear-both">
354354
figure
355355
img(src="/resources/images/devguide/architecture/parent-child-binding.png" alt="Parent/Child binding" style="float:left; width:300px; margin-left:-40px;margin-right:10px" )
356356
:marked
357357
Data binding is also important for communication between parent and child components.
358-
<br clear="all">
358+
<br class="l-clear-both">
359359

360360
.l-main-section
361361
:marked
@@ -368,7 +368,7 @@ figure
368368

369369
A directive is a class with directive metadata. In !{_Lang} we apply the `@Directive` !{_decorator}
370370
to attach metadata to the class.
371-
<br clear="all">
371+
<br class="l-clear-both">
372372
:marked
373373
We already met one form of directive: the component. A component is a *directive-with-a-template*;
374374
a `@Component` !{_decorator} is actually a `@Directive` !{_decorator} extended with template-oriented features.
@@ -427,7 +427,7 @@ figure
427427

428428
Almost anything can be a service.
429429
A service is typically a class with a narrow, well-defined purpose. It should do something specific and do it well.
430-
<br clear="all">
430+
<br class="l-clear-both">
431431
:marked
432432
Examples include:
433433
* logging service
@@ -478,7 +478,7 @@ figure
478478
_Dependency injection_ is a way to supply a new instance of a class
479479
with the fully-formed dependencies it requires. Most dependencies are services.
480480
Angular uses dependency injection to provide new components with the services they need.
481-
<br clear="all">
481+
<br class="l-clear-both">
482482
:marked
483483
Angular can tell which services a component needs by looking at the types of its constructor parameters.
484484
For example, the constructor of our `HeroListComponent` needs a `HeroService`:

public/docs/ts/latest/guide/architecture.jade

+11-11
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ figure
5454
_Angular modules_ are a big deal.
5555
This page introduces modules; the [Angular modules](ngmodule.html) page covers them in depth.
5656

57-
<br clear="all"><br>
57+
<br class="l-clear-both"><br>
5858
:marked
5959
Every Angular app has at least one module, the _root module_, conventionally named `AppModule`.
6060

@@ -130,7 +130,7 @@ figure
130130
Each Angular library name begins with the `!{_at_angular}` prefix.
131131

132132
You install them with the **npm** package manager and import parts of them with JavaScript `import` statements.
133-
<br clear="all"><br>
133+
<br class="l-clear-both"><br>
134134
:marked
135135
For example, import Angular's `Component` decorator from the `@angular/core` library like this:
136136
+makeExample('app/app.component.ts', 'import', '')(format='.')
@@ -214,7 +214,7 @@ figure
214214
:marked
215215
Notice how `<hero-detail>` rests comfortably among native HTML elements. Custom components mix seamlessly with native HTML in the same layouts.
216216

217-
<br clear="all">
217+
<br class="l-clear-both">
218218

219219
.l-hr
220220

@@ -226,7 +226,7 @@ figure
226226

227227
:marked
228228
<p style="padding-top:10px">Metadata tells Angular how to process a class.</p>
229-
<br clear="all">
229+
<br class="l-clear-both">
230230
:marked
231231
[Looking back at the code](#component-code) for `HeroListComponent`, you can see that it's just a class.
232232
There is no evidence of a framework, no "Angular" in it at all.
@@ -275,7 +275,7 @@ figure
275275

276276
Apply other metadata !{_decorator}s in a similar fashion to guide Angular behavior.
277277
`@Injectable`, `@Input`, and `@Output` are a few of the more popular !{_decorator}s.
278-
<br clear="all">
278+
<br class="l-clear-both">
279279
:marked
280280
The architectural takeaway is that you must add metadata to your code
281281
so that Angular knows what to do.
@@ -296,7 +296,7 @@ figure
296296
Add binding markup to the template HTML to tell Angular how to connect both sides.
297297

298298
As the diagram shows, there are four forms of data binding syntax. Each form has a direction &mdash; to the DOM, from the DOM, or in both directions.
299-
<br clear="all">
299+
<br class="l-clear-both">
300300
:marked
301301
The `HeroListComponent` [example](#templates) template has three forms:
302302

@@ -330,12 +330,12 @@ figure
330330
:marked
331331
Data binding plays an important role in communication
332332
between a template and its component.
333-
<br clear="all">
333+
<br class="l-clear-both">
334334
figure
335335
img(src="/resources/images/devguide/architecture/parent-child-binding.png" alt="Parent/Child binding" style="float:left; width:300px; margin-left:-40px;margin-right:10px" )
336336
:marked
337337
Data binding is also important for communication between parent and child components.
338-
<br clear="all">
338+
<br class="l-clear-both">
339339

340340
.l-hr
341341

@@ -350,7 +350,7 @@ figure
350350

351351
A directive is a class with directive metadata. In !{_Lang}, apply the `@Directive` !{_decorator}
352352
to attach metadata to the class.
353-
<br clear="all">
353+
<br class="l-clear-both">
354354
:marked
355355
A component is a *directive-with-a-template*;
356356
a `@Component` !{_decorator} is actually a `@Directive` !{_decorator} extended with template-oriented features.
@@ -410,7 +410,7 @@ figure
410410

411411
Almost anything can be a service.
412412
A service is typically a class with a narrow, well-defined purpose. It should do something specific and do it well.
413-
<br clear="all">
413+
<br class="l-clear-both">
414414
:marked
415415
Examples include:
416416
* logging service
@@ -463,7 +463,7 @@ figure
463463
_Dependency injection_ is a way to supply a new instance of a class
464464
with the fully-formed dependencies it requires. Most dependencies are services.
465465
Angular uses dependency injection to provide new components with the services they need.
466-
<br clear="all">
466+
<br class="l-clear-both">
467467
:marked
468468
Angular can tell which services a component needs by looking at the types of its constructor parameters.
469469
For example, the constructor of your `HeroListComponent` needs a `HeroService`:

public/docs/ts/latest/guide/index.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ figure
77
:marked
88
This is a practical guide to Angular for experienced programmers who
99
are building client applications in HTML and #{_Lang}.
10-
<br style="clear:left;">
10+
<br class="l-clear-left">
1111

1212
:marked
1313
## Organization

public/docs/ts/latest/guide/lifecycle-hooks.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ figure
1616
that provide visibility into these key life moments and the ability to act when they occur.
1717

1818
A directive has the same set of lifecycle hooks, minus the hooks that are specific to component content and views.
19-
<br clear="all">
19+
<br class="l-clear-both">
2020
## Table of Contents
2121
* [Overview](#hooks-overview)
2222
<br><br>

public/resources/css/layout/_layout.scss

+12
Original file line numberDiff line numberDiff line change
@@ -296,3 +296,15 @@ button.verbose.on {display: none}
296296
display: flex;
297297
flex-wrap: wrap;
298298
}
299+
300+
.l-clear-left {
301+
clear: left;
302+
}
303+
304+
.l-clear-right {
305+
clear: right;
306+
}
307+
308+
.l-clear-both {
309+
clear: both;
310+
}

0 commit comments

Comments
 (0)