Commit Graph

4407 Commits

Author SHA1 Message Date
Samuel R ac9a250fc4 docs: update link to schematics schema (#41258)
PREVIOUSLY:
The https://angular.io/guide/schematics#configuring-cli-schematics page has a link to "app" schematic specifically and to a version 7.

NOW:
The https://angular.io/guide/schematics#configuring-cli-schematics page links to the latest version of schematics (all of them, not just the "app" schematic) to let the reader snoop around a bit.
PR Close #41258
2021-03-18 10:02:25 -07:00
Manuele Dones ac9c4289e0 docs: replace deprecated karma-coverage-istanbul-reporter (#41246)
'karma-coverage-istanbul-reporter' usage has been deprecated since version 11.
Please install 'karma-coverage' and update 'karma.conf.js.' For more info, see https://github.com/karma-runner/karma-coverage/blob/master/README.md

PR Close #41246
2021-03-18 10:01:57 -07:00
George Kalpakas e23994191c docs: make `HeroService#gerHero()` in `toh-pt5` compatible with TS strict mode (#41234)
Fixes #41207

PR Close #41234
2021-03-18 10:00:52 -07:00
George Kalpakas 6d47b05b5b docs: align `toh-pt5` code with `toh-pt4` (#41234)
This commit aligns the code of `HeroService` `getHeroes()` and
`getHero()` methods in `toh-pt5` with that of `toh-pt4`. I.e. it applies
the changes from #40419 to `toh-pt5`.

PR Close #41234
2021-03-18 10:00:52 -07:00
Preston Lamb 81d2aabcbb docs: add preston lamb to GDE resources (#41204)
PR Close #41204
2021-03-18 09:58:07 -07:00
Kristiyan Kostadinov 59ef40988e feat(core): support TypeScript 4.2 (#41158)
Updates the repo to TypeScript 4.2 and tslib 2.1.0.

PR Close #41158
2021-03-17 09:10:25 -07:00
Alan Agius 98de4cb1bf docs: add deprecation note next to IE 11 in browser-support page (#41147)
Add a deprecation note, that IE 11 will be deprecated in version 12.

See angular/angular-cli#20225 and https://techcommunity.microsoft.com/t5/microsoft-365-blog/microsoft-365-apps-say-farewell-to-internet-explorer-11-and/ba-p/1591666

PR Close #41147
2021-03-17 09:07:37 -07:00
George Kalpakas 6bc22a7557 build(docs-infra): upgrade cli command docs sources to 5f5448301 (#41239)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](46538eea1...5f5448301):

**Modified**
- help/build.json
- help/lint.json

PR Close #41239
2021-03-17 09:06:37 -07:00
Alan Agius 95aa0cf04c docs: update assets configuration to include `followSymlinks` option (#41238)
The `followSymlinks` is not listed in the assets configuration section.

PR Close #41238
2021-03-17 09:04:15 -07:00
Teri Glover 0f0f34fb8a docs: minor update to what is Angular topic (#41123)
PR Close #41123
2021-03-17 09:01:35 -07:00
Gérôme Grignon 7d5b60e409 docs: remove unused attribute (#41211)
Fixes #41210

PR Close #41211
2021-03-16 14:48:52 -07:00
George Kalpakas 6bdad5ef6c build(docs-infra): upgrade cli command docs sources to 46538eea1 (#41227)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](edc1d0bc7...46538eea1):

**Modified**
- help/generate.json
- help/new.json

PR Close #41227
2021-03-16 11:04:21 -07:00
Alan Agius 7d6db009e9 docs: update docs to reflect production mode by default (#41173)
In CLI version 12, we introduced the concept of production builds by default.

With this change we update the documentation to reflect the changes.

More information about the change can be found https://github.com/angular/angular-cli/pull/20128

PR Close #41173
2021-03-16 09:32:44 -07:00
David Shevitz cc75e1d17b docs: add contributors guide to aio (#41061)
PR Close #41061
2021-03-15 12:16:37 -07:00
stefanos- cfaf425314 docs: add book about testing to resources (#41159)
PR Close #41159
2021-03-12 13:25:48 -08:00
Alan Agius 713b43f944 docs: remove deprecated Angular CLI APIs that have been removed (#41174)
With this change we remove deprecated Angular CLI APIs that have been removed in versions 12.

PR Close #41174
2021-03-12 13:24:28 -08:00
George Kalpakas 8d457ab2e1 fix(docs-infra): fix `<code-tabs>` in IE11 (#41183)
Previously, `<code-tabs>` did not work correctly in IE11. More
specifically, due to how IE11 handles updates to `innerHTML`, the
contents of `<code-pane>` elements were cleared before we could capture
them and pass them to the `<aio-code>` components.

This commit fixes it by ensuring we capture the `<code-pane>` contents
before clearing unneeded HTML.

Before: ![code tabs in IE11 before][1]
After: ![code tabs in IE11 after][2]

[1]: https://user-images.githubusercontent.com/8604205/110815248-f4460e00-8292-11eb-868e-eca7ba5e9cd3.png
[2]: https://user-images.githubusercontent.com/8604205/110815253-f5773b00-8292-11eb-80a6-1a0b1ea44d8f.png

PR Close #41183
2021-03-12 13:22:57 -08:00
George Kalpakas ea00e2c0b4 fix(docs-infra): fix display of AngularJS logo on the "Press kit" page in IE11 (#41183)
Previously, the AngularJS SVG logo shown on the "Press kit" page was not
displayed correctly in IE11 (see the image below).

This commit fixes it by explicitly specifying the SVG `viewBox` on the
logo.

Before: ![presskit AngularJS logo in IE11 before][1]
After: ![presskit AngularJS logo in IE11 after][2]

[1]: https://user-images.githubusercontent.com/8604205/110812629-7123b880-8290-11eb-9f71-0ae910536fa5.png
[2]: https://user-images.githubusercontent.com/8604205/110812633-7254e580-8290-11eb-896c-84f595d273b8.png

PR Close #41183
2021-03-12 13:22:57 -08:00
George Kalpakas 0d1b3fe55e fix(docs-infra): fix the layout of the "Features" page in IE11 (#41183)
IE11 does not support `justify-content: space-evenly` and therefore
falls back to the default (`flex-start`), breaking the layout of the
items in the "Features" page (see the image below).

This commit fixes the layout by specifying `space-around` as a fallback
for `justify-content`, which keeps the layout closer to the intended.

Before: ![features page layout in IE11 before][1]
After: ![features page layout in IE11 after][2]

[1]: https://user-images.githubusercontent.com/8604205/110811038-045bee80-828f-11eb-8027-d5851762a5eb.png
[2]: https://user-images.githubusercontent.com/8604205/110811076-0a51cf80-828f-11eb-98a0-2f2928128dd0.png

PR Close #41183
2021-03-12 13:22:57 -08:00
George Kalpakas 5c0122f7fd fix(docs-infra): fix the layout of docs pages in IE11 (#41183)
IE11 does not recognize the `<main>` element as a block element and
therefore it does not apply margin/paddings/widths as expected. This
resulted in the layout of docs pages being broken in IE11 (see the image
below).

This commit fixes the layout by explicitly setting `.sidenav-content`
(which is a `<main>` element) to `display: block`.

Before: ![docs pages layout in IE11 before][1]
After: ![docs pages layout in IE11 after][2]

[1]: https://user-images.githubusercontent.com/8604205/110808902-1b014600-828d-11eb-9eef-c1234dc2d436.png
[2]: https://user-images.githubusercontent.com/8604205/110808907-1ccb0980-828d-11eb-91d9-06e5cfafc894.png

PR Close #41183
2021-03-12 13:22:57 -08:00
George Kalpakas 8c939dcb40 fix(docs-infra): fix angular.io on browsers that support Custom Elements but not ES2015 (#41183)
Before #41162, angular.io was broken on IE 11 due to missing a polyfill
for an API (`Reflect.construct()`) needed by the Custom Elements ES5
shim. #41162 tried to fix this by loading the necessary polyfill
(`es.reflect.construct.js`) on browsers that do not support ES2015
modules (including IE 11).

It turns out that the fix in #41162 was itself broken, because the
`es.reflect.consruct.js` script (included directly in the page via a
`<script>` tag) was in CommonJS format (which cannot run in the browser
as is). By chance, this still allowed browsers that supported neither
Custom Elements nor ES2015 modules (such as IE 11) to work correctly as
a side-effect of loading the `@webcomponents/custom-elements` polyfill
after the Custom Elements ES5 shim (`native-shim.js`). However, on the
few browsers that natively support Custom Elements but not ES2015
modules, angular.io would still be broken.

This commit correctly fixes angular.io on all browsers by properly
bundling the polyfills and transpiling to ES5.

Implementation-wise, we use [esbuild][1] for bundling the polyfills (and
converting from CommonJS to a browser-compatible, IIFE-based format) and
[swc][2] for downleveling the code to ES5 (since `esbuild` only supports
ES2015+).

[1]: https://esbuild.github.io/
[2]: https://swc.rs/

PR Close #41183
2021-03-12 13:22:57 -08:00
Misko Hevery 70962465b5 fix(core): Switch `emitDistinctChangesOnlyDefaultValue` to true (#41121)
BREAKING CHANGE:

Switching default of `emitDistinctChangesOnlyDefaultValue`
which changes the default behavior and may cause some applications which
rely on the incorrect behavior to fail.

`emitDistinctChangesOnly` flag has also been deprecated and will be
removed in a future major release.

The previous implementation would fire changes `QueryList.changes.subscribe`
whenever the `QueryList` was recomputed. This resulted in an artificially
high number of change notifications, as it is possible that recomputing
`QueryList` results in the same list. When the `QueryList` gets recomputed
is an implementation detail, and it should not be the thing that determines
how often change event should fire.

Unfortunately, fixing the behavior outright caused too many existing
applications to fail. For this reason, Angular considers this fix a
breaking fix and has introduced a flag in `@ContentChildren` and
`@ViewChildren`, that controls the behavior.

```
export class QueryCompWithStrictChangeEmitParent {
  @ContentChildren('foo', {
    // This option is the new default with this change.
    emitDistinctChangesOnly: true,
  })
  foos!: QueryList<any>;
}
```
For backward compatibility before v12
`emitDistinctChangesOnlyDefaultValue` was set to `false. This change
changes the default to `true`.

PR Close #41121
2021-03-12 10:47:56 -08:00
Stepan Suvorov 94e8f5d4a4 docs: add stepan suvorov to GDE resources (#41178)
PR Close #41178
2021-03-11 09:31:48 -08:00
George Kalpakas f2ca29cd27 build(docs-infra): upgrade cli command docs sources to edc1d0bc7 (#41175)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](d62203a9f...edc1d0bc7):

**Modified**
- help/add.json
- help/build.json
- help/e2e.json
- help/extract-i18n.json
- help/generate.json
- help/new.json
- help/serve.json
- help/test.json

PR Close #41175
2021-03-11 09:30:51 -08:00
George Kalpakas e1e766a880 fix(docs-infra): generate the `404.html` page correctly (#41163)
Previously, the generated `404.html` page did not include a `<body>`
tag. In some browsers (such as IE 11), this was causing warnings in the
console.

This commit ensures the generated page contains a `<body>` tag. It also
fixes the indentation in the generated page.

PR Close #41163
2021-03-11 09:30:03 -08:00
George Kalpakas 79e21b966e fix(docs-infra): fix angular.io on IE 11 (#41162)
Previously, the angular.io app was broken on IE 11. In particular, pages
that included Custom Elements would fail to load, because the
`Reflect.construct()` method (which the Custom Elements ES5 shim relies
on) was not available.

This commit fixes this by loading the polyfill for `Reflect.construct()`
on browsers that do not support ES2015 (including IE 11).

PR Close #41162
2021-03-11 09:25:32 -08:00
George Kalpakas d368fa2fa4 fix(docs-infra): avoid unnecessarily loading Custom Elements ES5 shim (#41162)
The custom elements spec is not compatible with ES5 style classes. This
means ES2015 code compiled to ES5 will not work with a native
implementation of Custom Elements. To support browsers that natively
support Custom Elements but not ES2015 modules, we load
`@webcomponents/custom-elements/src/native-shim.js`, which minimally
augments the native implementation to be compatible with ES5 code.
(See [here][1] for more details.)

Previously, the shim was included in `polyfills.ts`, which meant it was
loaded in all browsers (even those supporting ES2015 modules and thus
not needing the shim).

This commit moves the shim from `polyfills.ts` to a `nomodule` script
tag in `index.html`. This will ensure that it is only loaded in browsers
that do not support ES2015 modules and thus do not needed the shim.

NOTE:
This commit also reduces size of the polyfills bundle by ~400B
(52609B --> 52215B).

[1]: https://www.npmjs.com/package/@webcomponents/custom-elements#es5-vs-es2015

PR Close #41162
2021-03-11 09:25:32 -08:00
pniedermeyer 4c79b8a644 docs: Remove of unnecessary Input (#41150)
remove unnecessary Input

PR Close #41150
2021-03-10 11:20:01 -08:00
Aristeidis Bampakos a730315fb2 docs: use double quotes in Tour of Heroes (pt1) (#41134)
Use double quotes to be consistent across the component template

PR Close #41134
2021-03-09 08:56:50 -08:00
George Kalpakas f281310d39 fix(docs-infra): print info to help debugging SW cache issue (#41106)
From time to time, an angular.io page fails to load due to requesting a
file that cannot be found neither on the server nor in the cache. We
believe this is caused by the browser's partially clearing a cache.
See #28114 for more details.

Some time ago, we introduced [SwUpdate#unrecoverable][1] to help work
around this issue by [reloading the page][2] when such an error is
detected.

However, this issue still pops up occasionally (for example, #41073).

In an attempt to help diagnose the issue, this commit prints more info
regarding the SW state and cache content when this error occurs. It will
result in something like the following being printed to the console:

```
ServiceWorker: activated

Cache: ngsw:/:db:control (2 entries)
  - https://angular.io/assignments: {"f5f02035-ee1f-463c-946c-e8b85badca25":"5c95f89a85255a6fefb4045a20f751ef32b2f3a4"}
  - https://angular.io/latest: {"latest":"5c95f89a85255a6fefb4045a20f751ef32b2f3a4"}

Cache: ngsw:/:5c95f89a85255a6fefb4045a20f751ef32b2f3a4:assets:app-shell:cache (24 entries)
  - https://angular.io/0-es2015.867022f8bb092ae1efb1.worker.js
  - https://angular.io/announcement-bar-announcement-bar-module-es2015.1b5b762c9c8837c770f8.js
  - https://angular.io/api-api-list-module-es2015.40a43cd22f50f64d63bb.js
  ...

Cache: ngsw:/:db:ngsw:/:5c95f89a85255a6fefb4045a20f751ef32b2f3a4:assets:app-shell:meta (1 entries)
  - https://angular.io/https://fonts.gstatic.com/s/robotomono/v13/L0x5DF4xlVMF-BfR8bXMIjhLq3-cXbKD.woff2:
      {"ts":1615031956601,"used":true}

If you see this error, please report an issue at https://github.com/angular/angular/issues/new?template=3-docs-bug.md
including the above logs.
```

NOTE:
This change increases the main bundle by 1649B (0.37%), but it can be
reverted as soon as we gather enough info to diagnose the issue.

[1]: https://angular.io/api/service-worker/SwUpdate#unrecoverable
[2]: https://github.com/angular/angular/blob/c676ec1ce5d586d4bc46/aio/src/app/sw-updates/sw-updates.service.ts#L55-L61

PR Close #41106
2021-03-09 08:54:52 -08:00
George Kalpakas 7a27cd262f refactor(docs-infra): simplify code snippet indentation in the "Cheat sheet" guide (#41051)
Previously, the indentation of code snippets in the "Cheat sheet" guide
was done using `<br>` elements (for line breaks) and `&emsp;` HTML
entities (for space). This was laborious and put the onus on the author
to remember to use these symbols (instead of regular whitespace
characters).
(Discussed in
https://github.com/angular/angular/pull/41051#discussion_r585651621.)

This commit changes the way `<code>` elements are styles inside the
"Cheat sheet" guide to allow using regular whitespace characters in code
snippets. It also changes all `<br>`/`&emsp;` occurrences to `\n`/`  `
respectively to make code snippets more readable in the source code.

PR Close #41051
2021-03-09 08:52:52 -08:00
George Kalpakas d7398d3025 fix(docs-infra): improve the layout of the "Features" page on medium screens (#41051)
The "Features" page organizes features in groups/rows of 3 features
each. On wide screens, all 3 paragraphs of a group/row can be shown next
to each other. On narrow screens (between 768px and 1057px), the layout
changes to stack the paragraphs vertically. On medium screens, however,
there is not enough space to show more than two paragraphs next to each
other.

Previously, the 3rd paragraph was wrapped over to the next line.

This commit improves the layout on medium screens by switching to
immediately stacking the paragraphs vertically as soon as there is not
enough space for them to be displayed in one row. Since the total width
is still too much for one paragraph, the paragraphs are limited to 80%
of the total width.

Before (on 1000px width): [features page (on 1000px) before][1]
After (on 1000px width): [features page (on 1000px) after][2]

[1]: https://user-images.githubusercontent.com/8604205/109825316-62128a00-7c42-11eb-8391-650201257274.png
[2]: https://user-images.githubusercontent.com/8604205/109825323-6343b700-7c42-11eb-86c1-e8307c5a727a.png

PR Close #41051
2021-03-09 08:52:52 -08:00
George Kalpakas 1054d554d8 fix(docs-infra): avoid truncating several API list items (#41051)
Previously, with the min width of 220px per item, several API list items
were truncated.

This commit increases the min width per item to 330px, which allows
almost all items to have their full text shown. It also increases the
API list page's max content width from 50em (800px) to 62.5em (1000px)
to allow items to be shown on three columns despite their increased
width. This increase in the content width shouldn't negatively affect
UX, since the API list page uses a multi-column layout (i.e. it does not
contain 1000px-lines of text.)

Before: ![api-list before][1]
After: ![api-list after][2]

[1]: https://user-images.githubusercontent.com/8604205/109396457-5f5e1f00-793a-11eb-80cf-1418f409325a.png
[2]: https://user-images.githubusercontent.com/8604205/109396659-499d2980-793b-11eb-95d3-f54250f7fab5.png

PR Close #41051
2021-03-09 08:52:52 -08:00
George Kalpakas a926fd020b fix(docs-infra): show ellipsis when text overflows in API list items (#41051)
Previously, when an API list item's text overflowed its container, it
was just hidden. This made it often difficult to realize that there was
more text.

This commit fixes this by ensuring an ellipsis (`...`) is shown when the
text overflows.

Before: ![api-list truncated before][1]
After: ![api-list truncated after][2]

[1]: https://user-images.githubusercontent.com/8604205/109396186-0cd03300-7939-11eb-921c-00621a3889a4.png
[2]: https://user-images.githubusercontent.com/8604205/109396187-0e016000-7939-11eb-9f3b-4535be083417.png

PR Close #41051
2021-03-09 08:52:52 -08:00
George Kalpakas 304a32b655 fix(docs-infra): limit max content width on "Contributors" and "Cheat sheet" pages (#41051)
Previously, the content width on the "Contributors" page (`/about`) and
the "Cheat sheet" guide (`/guide/cheatsheet`) was unlimited (i.e. the
content would take up all the available space horizontally). This was
not very ergonomic on large screens. Especially on the "Cheat sheet"
guide there was a lot of unnecessary whitespace between the code shown
on the left column and the description shown on the right column.

This commit fixes this by setting a max content width for both pages of
84em (1404px by default). This keeps the content at a more manageable
width and avoids unnecessary whitespace.

Before (contributors): ![contributors page on 2500px before][1]
Before (cheatsheet): ![cheatsheet on 2500px before][2]
After (contributors): ![contributors page on 2500px after][3]
After (cheatsheet): ![cheatsheet on 2500px after][4]

[1]: https://user-images.githubusercontent.com/8604205/109394323-1bb1e800-792f-11eb-9cd6-c5b83e5ae921.png
[2]: https://user-images.githubusercontent.com/8604205/109394329-1fde0580-792f-11eb-91c0-4ed7ad408b17.png
[3]: https://user-images.githubusercontent.com/8604205/109394319-181e6100-792f-11eb-9463-a281dfe80448.png
[4]: https://user-images.githubusercontent.com/8604205/109394330-210f3280-792f-11eb-9837-ddc7a8d01d19.png

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 4907d644bb refactor(docs-infra): use more consistent content width on marketing pages (#41051)
Previously, each marketing page used a different limit for its content's
width (if it had a limit at all) and implemented the width limiting in a
different way. Besides resulting in an inconsistent UX, this also made
it difficult to apply site-wide layout changes.

This commit makes the limit for most marketing pages consistent and uses
the same CSS class to make it easier to apply site-wide changes in the
future. The chosen limit is slightly larger than that of docs pages
(62.5em/1000px vs 50em/800px), because marketing pages have a different
type of content and layout (i.e. images, multi-column layout, etc.).
Finally, this commit also removes obsolete wrapper elements, CSS classes
and CSS styles, that are no longer necessary after the changes.

Notably, the homepage (`/`) and the "Contributors" page (`/about`) have
remained unchanged, because the former has its own layout that is
different from other marketing pages and the latter would offer a worse
UX with a small content width limit (as the one used on other marketing
pages).

The content widths of the rest of the marketing pages change slightly as
a result of the changes in this commit, but not in a way that would have
a negative impact on UX. More specifically:

| Page (URL)    | Size before | Size after |
|:--------------|------------:|-----------:|
| `/contribute` |       880px |     1000px |
| `/events`     |   unlimited |     1000px |
| `/features`   |       996px |     1000px |
| `/presskit`   |       800px |     1000px |
| `/resources`  |       800px |     1000px |

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 8365bc8946 refactor(docs-infra): fix code indentation in `ContributorListComponent`'s template (#41051)
This commit fixes the indentation of the template of
`ContributorListComponent` to make it more readable.

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 1b38b413de docs: fix indentation of code snippets in the "Cheat sheet" guide (#41051)
Previously, the indentation of code snippets in the "Cheat sheet" guide
was done using regular spaces. However, leading whitespace is ignored in
HTML elements (by default), which resulted in the identation being lost.

This commit fixes this by using the `&emsp;` HTML entity for
indentation, ensuring the code snippets are easier to read.

Some examples:

Before: ![cheatsheet code indentation before][1]
After: ![cheatsheet code since PR 40944][2]

[1]: https://user-images.githubusercontent.com/8604205/109385242-218dd600-78fb-11eb-9261-18ab5f2c308c.png
[2]: https://user-images.githubusercontent.com/8604205/109385246-25b9f380-78fb-11eb-8e82-d8a561deba21.png

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 76daca800e refactor(docs-infra): remove unnecessary wrapper `<div>` from the "Cheat sheet" guide (#41051)
This commit removes an unnecessary wrapper `<div>` from the
"Cheat sheet" guide. The CSS styles that referenced the element's ID
(`#cheatsheet`) have been updated to use `.page-guide-cheatsheet`
instead.

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas f85a178a49 fix(docs-infra): fix `<code>` styling in the "Cheat sheet" guide (#41051)
Since #40944, `<code>` elements have a distinctive background to make
them stand out from regular text. However, this styling is not desirable
in certain cells of the "Cheat sheet" guide's tables, which exclusively
contain code.

This commit updates the `<code>` styling to remove the distinctive
background in those "Cheat sheet" cells.

Before #40944: ![cheatsheet code before PR 40944][1]
Since #40944: ![cheatsheet code since PR 40944][2]
After this commit: ![cheatsheet code after][3]

[1]: https://user-images.githubusercontent.com/8604205/109383633-4f215200-78f0-11eb-95e2-2a2c4fb3a31f.png
[2]: https://user-images.githubusercontent.com/8604205/109383634-50527f00-78f0-11eb-8c48-ff5f96918c4d.png
[3]: https://user-images.githubusercontent.com/8604205/109383635-50eb1580-78f0-11eb-9cf2-98851692ddd9.png

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas d80d6ea3f6 fix(docs-infra): fix styling of `<code>` elements on older browsers (#41051)
Previously, styling of `<code>` elements utilized the `:not()` CSS
pseudo-class with multiple selectors (`:not(h1, h2, ...)`). It turns out
that older browsers (such as IE11) do not support multiple selectors in
a single `:not()` instance.
(See [MDN][1] and [CanIUse][2] for more info.)

This commit fixes `<code>` styling to use multiple separate `:not()`
instances instead (`:not(h1):not(h2)...`), so that they are styled
correctly on older browsers as well.

NOTE:
This change seems to trigger some kind of bug in LightHouse that causes
the a11y score of `/start` to be calculated as 0 (which is clearly
wrong). This happens on Linux (tested on CI and locally using the
Windows Subsystem for Linux (WSL)) - on Windows the score is computed
correctly as 98/100.
([Example failure][3])

The bug seems to be related to the layout of the content and goes away
if we change the viewport size (for example, switching to LightHouse's
`desktop` config) or make another change that affects the content's
layout (for example, reducing the padding of `<code>` elements).

To work around the issue, this commit updates the `test-aio-a11y.js`
script to test `/start-routing` instead of `/start`.

[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/:not#description:~:text=Using%20two%20selectors
[2]: https://caniuse.com/css-not-sel-list
[3]: https://circleci.com/gh/angular/angular/931038

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 269d7e4d22 fix(docs-infra): improve the layout of the "Features" page on medium screens (#41051)
The "Features" page organizes features in groups/rows of 3 features
each. On wide screens, all 3 paragraphs of a group/row can be shown next
to each other. On narrow screens, the layout changes to stack the
paragraphs vertically. On medium screens, however, the 3rd paragragh is
wrapped over to the next line.

Previously, the wrapped content was left-aligned, which left a lot of
empty space on the right.

This commit improves the layout on medium screens by ensuring the
paragraphs are horizontally centered (with space distributed evenly
around them).

Before: ![features page before][1]
After: ![features page after][2]

[1]: https://user-images.githubusercontent.com/8604205/109344670-b64ef000-7877-11eb-9013-890562ff2f3d.png
[2]: https://user-images.githubusercontent.com/8604205/109344678-b7801d00-7877-11eb-9224-d7715f7d7235.png

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 27bb6f6a04 fix(docs-infra): use a fixed top-menu on marketing pages as well (#41051)
Previously, in contrast to docs pages, marketing pages had a non-fixed
top-menu, which meant that the top-menu would scroll out of the viewport
along with the rest of the content. This had a couple of downsides:
- The UI was different between pages (i.e. different top-menu behavior
  on docs vs marketing pages).
- Since some of the marketing pages are long, it was not easy for people
  to navigate to a different page (i.e. they had to scroll all the way
  back up).

This commit improves the UX by using the same, fixed top-menu on all
pages, which restores consistency and allows the user to navigate around
more easily.

NOTE:
The old behavior (non-fixed top-menu) is kept on the homepage, since its
top-menu design in a little different than other pages (e.g. it uses a
transparent top-menu) and would not play well with a fixed top-menu.

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 7944ee2c30 fix(docs-infra): do not underline link icons on hover (#41051)
The external links in the docs content and the download links in the
"Press kit" page have icons next to their text (an external link icon
and a download icon respectively).

Previously, when hovering over one of those links, the icons used to get
underlined along with the link text, which was not desirable.

This commit fixes it by changing the mechanics of how these icons are
positioned inside the anchor elements so that only the link text is
underlined on hover.

Before: ![external links on hover before][1]
Before: ![presskit links on hover before][2]
After: ![external links on hover after][3]
After: ![presskit links on hover after][4]

[1]: https://user-images.githubusercontent.com/8604205/109340455-b64bf180-7871-11eb-923b-3113a237b8d8.png
[2]: https://user-images.githubusercontent.com/8604205/109340461-b815b500-7871-11eb-9c9d-91b6ffb17346.png
[3]: https://user-images.githubusercontent.com/8604205/109340458-b77d1e80-7871-11eb-884c-c1093ec83e66.png
[4]: https://user-images.githubusercontent.com/8604205/109340462-b815b500-7871-11eb-8f00-702b2b61f6ac.png

PR Close #41051
2021-03-09 08:52:51 -08:00
Sagar Pandita c1a93fcf32 docs: remove augury resource (#41107)
Partially addresses #41030.

PR Close #41107
2021-03-08 10:00:13 -08:00
LordMsz 2d69f0c9ca docs: extend :host selector documentation (#41055)
explain behavior of selectors *before* `:host` that escape encapsulation
and explain preferred usage of `:host-context`

PR Close #41055
2021-03-08 08:36:04 -08:00
Pete Bacon Darwin 2893b925c3 build(docs-infra): capture all decorators in doc-gen (#41091)
In 6cff877 we broke the decorator docs because the
doc-gen no longer knew how to identify them.

This commit updates the dgeni processor responsible
for identifying the decorators in the code and ensures
that the docs are now generated correctly.

Fixes #40851

PR Close #41091
2021-03-08 08:34:40 -08:00
George Kalpakas 7854c4ddbe test(docs-infra): run a11y tests against `/tutorial` and update a11y scores (#41103)
This commit adds `/tutorial` to the list of angular.io pages that we run
a11y tests against and updates the required scores to match the current
ones (to avoid a future regression going unnoticed).

PR Close #41103
2021-03-08 08:33:47 -08:00
George Kalpakas e59246cf5c test(docs-infra): print the browser version in `audit-web-app.js` to help debugging (#41103)
This commit updates the `audit-web-app.js` script (used to run PWA and
a11y tests on angular.io) to also print the version of the browser used
to run the tests. This can help when debugging a CI failure.

PR Close #41103
2021-03-08 08:33:47 -08:00
Sivamuthu Kumar 44bb78dbbd docs: update repo link to auto scroll to readme section (#41105)
Co-authored-by: George Kalpakas <kalpakas.g@gmail.com>
PR Close #41105
2021-03-08 08:33:00 -08:00
Sivamuthu Kumar 3d3ab4aa5d docs: add angular-eslint and remove codelyzer from tooling (#41105)
fixes #41029

PR Close #41105
2021-03-08 08:33:00 -08:00
Quentin Monmert c676ec1ce5 docs: fix some typos in angular.io examples (#41093)
This commit updates example code to make the spacing more consistent.

PR Close #41093
2021-03-05 15:08:11 -08:00
Carl Fredrik Samson e7453f15d5 docs: fix issue #40941 (#40942)
setting the `hero` property as an optional property fixes the compilation
error: `Property 'hero' has no initializer and is not definitely assigned
in the constructor` when having the ts transpiler set to "strict" mode.

PR Close #40942
2021-03-05 09:47:44 -08:00
Chris d9acaa8547 docs: remove Codelyzer recommendation from style guide (#40992)
Fixes #40903

PR Close #40992
2021-03-04 11:01:48 -08:00
MG 84b8f250f9 docs: add ng-mocks to tooling resources (#41027)
closes #41025

PR Close #41027
2021-03-03 23:31:38 +00:00
David Pine 7765b648e7 docs: update Angular Global Summit on event pages (#41050)
After my speaker meeting with the Geekle team, they communicated that
they moved the date to avoid colliding with ng-conf. Originally added
in#40697, per @mgechev.

PR Close #41050
2021-03-03 10:04:56 -08:00
David Shevitz d10599459d docs: update @reviewed date (#41060)
PR Close #41060
2021-03-03 10:03:57 -08:00
George Kalpakas ffbacbbc98 build(docs-infra): upgrade cli command docs sources to d62203a9f (#41046)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](84b99497f...d62203a9f):

**Modified**
- help/build.json

PR Close #41046
2021-03-03 09:55:43 -08:00
George Kalpakas 21f0deeaa6 build(docs-infra): update Angular framework, Material and CLI to latest methods (#40994)
This commit updates the Angular framework, Angular CDK/Material and
Angular CLI to latest stable versions (11.2.3, 11.2.2 and 11.2.2
respectively).

This update also fixes a Lighthouse audit fail due to
`@angular/core@11.0.0` being identified as vulnerable to XSS:
https://snyk.io/vuln/SNYK-JS-ANGULARCORE-1070902

Regarding the payload size increases, they are mostly attributed to
Angular Material:
- Before this commit:     448461 B
- After framework update: 448554 B ( +93 B)
- After Material update:  449292 B (+738 B)
- After CLI update:       449310 B ( +18 B)

PR Close #40994
2021-03-03 09:43:56 -08:00
George Kalpakas 6e40551394 build(docs-infra): update Lighthouse to version 7.2.0 (#40994)
In this version, we no longer need our custom logic to skip certain
HTTPS related audits on localhost, since Lighthouse will treat it as a
secure context (similar to how browsers do).
See also GoogleChrome/lighthouse#11766.

PR Close #40994
2021-03-03 09:43:56 -08:00
George Kalpakas cb16035fd3 fix(docs-infra): correctly display event dates on all timezones (#41053)
Previously, the event dates displayed on the angular.io "Events" page
(`/events`) was off by one day on timezones with a negative offset from
UTC. See
https://github.com/angular/angular/pull/41050#issuecomment-788958888.

This commit fixes it by using the `getUTC*` methods of the `Date` object
to extract the date info, which are not affected by the user's timezone.

PR Close #41053
2021-03-03 09:37:21 -08:00
Daniel 5eab6e14f1 docs: fix typo in router.md file (#41064)
PR Close #41064
2021-03-03 09:36:06 -08:00
Aristeidis Bampakos 198e841564 docs(http): add example for interceptor order (#39938)
Add an example for the order of interceptor with image

PR Close #39938
2021-03-01 15:33:36 -08:00
Kapunahele Wong 6c783c7fcb docs: rewrite structural-directives.md (#40015)
PR Close #40015
2021-03-01 15:32:26 -08:00
Kapunahele Wong 356d9a0537 docs: improve contrast of colors and body padding in boilerplate CSS (#40890)
Shifts colors to pass WebAIM contrast checker and adds media
query so that body padding is smaller at smaller widths.
Body padding responsiveness will help on StackBlitz and small
screens.

PR Close #40890
2021-03-01 15:30:32 -08:00
twerske be8893fd1d docs: add youtube to social icons (#40987)
PR Close #40987
2021-02-26 15:50:36 -08:00
Alan Agius 06fb318b3b docs: update inlineCritical default value (#40920)
Related to https://github.com/angular/angular-cli/pull/20096

PR Close #40920
2021-02-26 15:41:15 -08:00
Pete Bacon Darwin 4859c0947a build(docs-infra): implement full template checking for examples (#40930)
This commit turns on full template type checking and fixes the examples
that had errors.

PR Close #40930
2021-02-26 15:40:44 -08:00
Pete Bacon Darwin 03d92f75e6 build(docs-infra): enable Ivy in StackBlitz examples (#40930)
We need to explicitly set the `enableIvy` option in a tsconfig file
to tell StackBlitz not to use ViewEngine.

This commit will generate an appropriate tsconfig.json file in the
example data that is sent to StackBlitz, which matches the Ivy
setting of the AIO project itself.

PR Close #40930
2021-02-26 15:40:44 -08:00
George Kalpakas 272b5645c4 fix(docs-infra): improve the layout of the "Resources" page (#40944)
This commit improves the readability of the "Resources" page by limiting
the content's max width to 50em (which is 800px by default).

It also gets rid of custom color values and either uses the default
color or colors specified via Sass variables.

Before: ![resources page before][1]
After: ![resources page after][2]

This change has been extracted from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108601949-104b4380-73a8-11eb-864b-948db8c36f80.png
[2]: https://user-images.githubusercontent.com/8604205/108602036-894a9b00-73a8-11eb-870d-39bea9b46d97.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas d3eff182e3 refactor(docs-infra): clean up styling of the `<aio-resource-list>` component (#40944)
This commit cleans up the styles and the elements/classes used for
styling the content of the `<aio-resource-list>` component.

This change has been extracted from #36045.

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas 00562ed935 fix(docs-infra): center the "Contribute" page (#40944)
This commit improves the layout of the "Contribute" page by centering
the content (similar to other marketing pages).

Before: ![contribute layout before][1]
After: ![contribute layout after][2]

This change has been extracted from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108595056-5b545f00-7386-11eb-97b6-c3606dbfb5fa.png
[2]: https://user-images.githubusercontent.com/8604205/108595060-5becf580-7386-11eb-91fa-b2877f2a4691.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas 2af8099fbc fix(docs-infra): use up-to-date URLs in "Contribute" links (and replace deprecated `md-button`) (#40944)
This commit replaces some outdated URLs in "Contribute" links (on the
"Contribute" page):
- `github.com/angular/material2` --> `github.com/angular/components`
- `github.com/angular/angularfire2` --> `github.com/angular/angularfire`

It also replaces the deprecated `md-button` attribute with `mat-button`.

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas c4a9c003cb fix(docs-infra): remove unwanted underline when hovering over contributor info links (#40944)
This commit removes an unwanted underline effect when hovering over
contributor info links (`.contributor-info > .info-item`). This was
accidentally introduced in #40427.

Before: ![contributor info on hover before][1]
After: ![contributor info on hover after][2]

[1]: https://user-images.githubusercontent.com/8604205/108560170-045a7580-7305-11eb-98d2-4302d98581c6.png
[2]: https://user-images.githubusercontent.com/8604205/108560176-058ba280-7305-11eb-97eb-74cf2c830a39.png

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas d97b45d82a fix(docs-infra): make inline code stand out more (#40944)
This commit improves the styling of inline code blocks to make them
stand out more.

Before: ![code formatting before][1]
After: ![code formatting after][2]

This change has been extracted from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108554295-8e521080-72fc-11eb-94e8-09246ae334c8.png
[2]: https://user-images.githubusercontent.com/8604205/108553733-c9077900-72fb-11eb-8001-1f0baf8b95bc.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas 516de34778 fix(docs-infra): improve the appearance of `.filter-button` elements (#40944)
This commit improves the appearance of `.filter-button` elements used to
jump between different categories in "Contributors" and "Resources" pages.

Before (wide screen): ![contributors buttons (wide screen) before][1]
Before (narrow screen): ![contributors buttons (narrow screen) before][2]
After (wide screen): ![contributors buttons (wide screen) after][3]
After (narrow screen): ![contributors buttons (narrow screen) after][4]

This change has been extracted from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108414895-72376c00-7235-11eb-9537-7a7b059d09fe.png
[2]: https://user-images.githubusercontent.com/8604205/108414923-782d4d00-7235-11eb-8ba4-87a3a9ae14cd.png
[3]: https://user-images.githubusercontent.com/8604205/108414929-78c5e380-7235-11eb-807a-109b4200e64e.png
[4]: https://user-images.githubusercontent.com/8604205/108414942-7cf20100-7235-11eb-8ef0-9b2da397b3ee.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas ae50e40216 refactor(docs-infra): move `.filter-button` styles inside `.group-buttons` (#40944)
Since `.filter-button` elements only appear inside `.group-buttons`
elements, this commit moves `.filter-button` CSS styles inside
`.group-buttons` styles.

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas d6f6197728 fix(docs-infra): put the license references in a separate paragraph in the footer (#40944)
This commit improves how sentences are broken up into lines in the
footer (due to the limited max-width of the content) by moving the
license references in a separate paragraph.

Before: ![footer before][1]
After: ![footer after][2]

[1]: https://user-images.githubusercontent.com/8604205/108595211-593ed000-7387-11eb-8ee5-f13c8bf522f4.png
[2]: https://user-images.githubusercontent.com/8604205/108595214-5a6ffd00-7387-11eb-9a9d-dbaa2175f51f.png

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas 2475dbe7b2 refactor(docs-infra): remove redundant Sass mixin (#40944)
This commit removes the `bp()` Sass mixin, which was only used in one
place (and also included several unused code-branches).

PR Close #40944
2021-02-26 15:39:28 -08:00
George Kalpakas 2a518fb44c refactor(docs-infra): use Sass variables for colors used in themes (#40944)
This change has been extracted from #36045.

NOTE:
The color names for the RC theme were computed using
https://www.color-blindness.com/color-name-hue.

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:28 -08:00
George Kalpakas 6275346871 fix(docs-infra): increase margin of header-links (#40944)
This change has been extracted from #36045.

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:28 -08:00
Theoklitos Bampouris fb82558d78 docs: Change lexical in security guide (#41016)
Change `onerror` attribute reference to `script` element reference
PR Close #41016
2021-02-26 15:14:57 -08:00
cexbrayat 91cdc11aa0 fix(common): allow number or boolean as http params (#40663)
This change fixes an incompatibility between the old `@angular/http` package
and its successor (`@angular/common/http`) by re-introducing the types that were supported before.

It now allows to use number and boolean directly as HTTP params, instead of having to convert it to string first.

Before:

    this.http.get('/api/config', { params: { page: `${page}` } });

After:

    this.http.get('/api/config', { params: { page }});

`HttpParams` has also been updated to have most of its methods accept number or boolean values.

Fixes #23856

BREAKING CHANGE:

The methods of the `HttpParams` class now accept `string | number | boolean`
instead of `string` for the value of a parameter.
If you extended this class in your application,
you'll have to update the signatures of your methods to reflect these changes.

PR Close #40663
2021-02-26 12:03:50 -08:00
George Kalpakas 383d226118 fix(docs-infra): add links to glossary for terms on the "Press kit" page (#40945)
The "Press kit" page has a "Terminology" section that lists a couple of
terms (currently AOT and JIT compilation).

This commit adds links to the corresponding entries in "Glossary" to
make it easier for people to find out what the terms mean.

PR Close #40945
2021-02-26 08:28:22 -08:00
George Kalpakas 117c49f799 fix(docs-infra): more clearly separate different sections on the "Press kit" page (#40945)
This commit adds a horizontal line and some extra spacing between
different sections of the "Press kit" page to make it easier to identify
where one section ends and the next begins.

Before: ![presskit sections before][1]
After: ![presskit sections after][2]

[1]: https://user-images.githubusercontent.com/8604205/108739638-8208c600-753d-11eb-99bb-ea119640de39.png
[2]: https://user-images.githubusercontent.com/8604205/108745297-95b72b00-7543-11eb-9a35-56325477534b.png

PR Close #40945
2021-02-26 08:28:22 -08:00
George Kalpakas 78a70498b5 fix(docs-infra): improve the layout and appearance of the "Press kit" page (#40945)
This commit improves the layout and appearance of the "Press kit" page.
Most notable changes include:
- Center content and limit max width to 50em (which is 50px by default).
- Remove uppercase transform for headings.
- Use a two-column layout for icons (instead of one icon per row).
- Show "download" icons next to download links.

Before (wide): ![presskit page (wide) before][1]
Before (narrow 1/2): ![presskit page (narrow 1/2) before][2]
Before (narrow 2/2): ![presskit page (narrow 2/2) before][3]
After (wide): ![presskit page (wide) after][4]
After (narrow 1/2): ![presskit page (narrow 1/2) after][5]
After (narrow 2/2): ![presskit page (narrow 2/2) after][6]

This change is based on code from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108739632-80d79900-753d-11eb-8ddc-ac542ec5b3ac.png
[2]: https://user-images.githubusercontent.com/8604205/108739641-82a15c80-753d-11eb-9b20-8119ad117460.png
[3]: https://user-images.githubusercontent.com/8604205/108739643-83d28980-753d-11eb-8afa-2d7a5e87d586.png
[4]: https://user-images.githubusercontent.com/8604205/108739638-8208c600-753d-11eb-99bb-ea119640de39.png
[5]: https://user-images.githubusercontent.com/8604205/108739642-8339f300-753d-11eb-9b25-5c1988adb1dd.png
[6]: https://user-images.githubusercontent.com/8604205/108739645-846b2000-753d-11eb-8ef3-b6a8b7c6d1ff.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40945
2021-02-26 08:28:21 -08:00
George Kapris 953e98e211 docs: Change grammatically in security guide (#40995)
Change `controller` reference to `component` reference
PR Close #40995
2021-02-26 08:25:21 -08:00
Alan Agius d51d39cb4c docs: update docs to use new zone.js entry-points (#40823)
In CLI version 12, the old style of imports is no longer supported.

PR Close #40823
2021-02-24 07:58:29 -08:00
Carl Fredrik Samson 03de2f2b78 docs: fix ch 4 so it compiles in strict mode (#40970)
Fixes error: `TS2564: Property 'heroes' has no initializer and is not definitely assigned in the constructor`
and makes `hero` property consistent with ch 3 (ref: #40942)

PR Close #40970
2021-02-24 07:57:53 -08:00
Kapunahele Wong 06d3267824 docs: improve accessibility for toh-pt1 example (#40560)
PR Close #40560
2021-02-23 10:41:56 -08:00
Kapunahele Wong 1f91672d50 docs: improve accessibility of toh2 example (#40575)
Increases contrast of example copy.
Explicitly references inputs from labels.
Updates screenshot of styles that aren't accessible.
Removes the term master.
Provides more detailed alternate text for the image.
Adds padding to input so it is an easier target for touch or pointer.

PR Close #40575
2021-02-23 10:41:05 -08:00
Kapunahele Wong 1f7921be33 docs: improve accessibility of tohpt3 (#40617)
PR Close #40617
2021-02-23 10:40:09 -08:00
Kapunahele Wong bd6f377db2 docs: improve accessibility of tohpt4 (#40622)
PR Close #40622
2021-02-23 10:39:44 -08:00
Kapunahele Wong 4d1299bd82 docs: improve accessibility of toh-pt5 example (#40632)
PR Close #40632
2021-02-23 10:39:13 -08:00
Kapunahele Wong edd26a2b79 docs: improve accessibility of toh-pt6 (#40805)
PR Close #40805
2021-02-23 10:38:50 -08:00
Kapunahele Wong 49e02ca7d6 docs: move JsonParser class above CustomJsonInterceptor (#40964)
This move fixes the error in StackBlitz of
Cannot access 'JsonParser' before initialization

PR Close #40964
2021-02-23 10:37:26 -08:00
Daniel Díaz b84f719747 docs: update year (#40925)
PR Close #40925
2021-02-22 12:37:40 -08:00
George Kalpakas 09e1e1935a refactor(docs-infra): convert Sass mixin from camelCase to kebab-case to follow Sass conventions (#40881)
This commit converts the last remaining camelCased Sass mixin
(`deployTheme`) to kebab-case (`deploy-theme`) to follow the Sass
conventions.

Discussed in
https://github.com/angular/angular/pull/40881#discussion_r577961617.

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas 4b3e6b5a00 refactor(docs-infra): create mixin for styling marketing pages (#40881)
Previously, in order to apply some styles to marketing (i.e. non-docs)
pages, we listed the various `.page-*` classes that corresponded to docs
pages. This meant that adding/removing a marketing page required updates
in several places, which is error-prone.

This commit avoids this by using a Sass mixin for applying styles to
marketing pages.

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas c5231ce1da refactor(docs-infra): remove duplicate or unused CSS styles (#40881)
This commit removes some CSS styles that have no effect (i.e. are
duplicates or overridden by other rules).

PR Close #40881
2021-02-19 09:14:59 -08:00