Skip to content

Commit 8d6ea5b

Browse files
hawkgspkozlowski-opensource
authored andcommitted
docs: fix missing alert block styles in the API reference (#59020)
Substitute legacy alert classes with the new ones. PR Close #59020
1 parent 35d390d commit 8d6ea5b

File tree

16 files changed

+46
-42
lines changed

16 files changed

+46
-42
lines changed

adev/shared-docs/styles/docs/_alert.scss

+8-4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828

2929
p {
3030
margin-inline-start: 1.65rem;
31+
32+
&:first-child {
33+
margin-block-start: 0;
34+
}
35+
36+
&:last-child {
37+
margin-block-end: 0;
38+
}
3139
}
3240

3341
.docs-dark-mode & {
@@ -39,10 +47,6 @@
3947
}
4048
}
4149

42-
.docs-viewer .docs-alert p {
43-
margin-block: 0;
44-
}
45-
4650
.docs-alert-note {
4751
--alert-gradient: var(--blue-to-teal-vertical-gradient);
4852
--alert-accent: var(--bright-blue);

adev/src/content/cli/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ng serve
4242
In your browser, open http://localhost:4200/ to see the new application run.
4343
When you use the [ng serve](cli/serve) command to build an application and serve it locally, the server automatically rebuilds the application and reloads the page when you change any of the source files.
4444

45-
<div class="alert is-helpful">
45+
<div class="docs-alert docs-alert-helpful">
4646

4747
When you run `ng new my-first-project` a new folder, named `my-first-project`, will be created in the current working directory.
4848
Since you want to be able to create files inside that folder, make sure you have sufficient rights in the current working directory before running the command.

adev/src/content/guide/prerendering.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ng add @angular/ssr
1616

1717
</docs-code>
1818

19-
<div class="alert is-helpful">
19+
<div class="docs-alert docs-alert-helpful">
2020

2121
To create an application with prerendering capabilities from the beginning use the [`ng new --ssr`](tools/cli/setup-local) command.
2222

packages/animations/src/animation_metadata.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ export function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSe
966966
* - `true` and `false` also match expression values of `1` and `0` respectively (but do not match
967967
* _truthy_ and _falsy_ values)
968968
*
969-
* <div class="alert is-helpful">
969+
* <div class="docs-alert docs-alert-helpful">
970970
*
971971
* Be careful about entering end leaving elements as their transitions present a common
972972
* pitfall for developers.
@@ -1205,15 +1205,15 @@ export function useAnimation(
12051205
* - Those inserted dynamically (via `ViewContainerRef`)
12061206
* - Those that have a structural directive (which, under the hood, are a subset of the above ones)
12071207
*
1208-
* <div class="alert is-helpful">
1208+
* <div class="docs-alert docs-alert-helpful">
12091209
*
12101210
* Note that elements will be successfully queried via `:enter`/`:leave` even if their
12111211
* insertion/removal is not done manually via `ViewContainerRef`or caused by their structural
12121212
* directive (e.g. they enter/exit alongside their parent).
12131213
*
12141214
* </div>
12151215
*
1216-
* <div class="alert is-important">
1216+
* <div class="docs-alert docs-alert-important">
12171217
*
12181218
* There is an exception to what previously mentioned, besides elements entering/leaving based on
12191219
* their own logic, elements with an animation trigger can always be queried via `:leave` when

packages/common/http/src/provider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function makeHttpFeature<KindT extends HttpFeatureKind>(
8282
* feature functions to `provideHttpClient`. For example, HTTP interceptors can be added using the
8383
* `withInterceptors(...)` feature.
8484
*
85-
* <div class="alert is-helpful">
85+
* <div class="docs-alert docs-alert-helpful">
8686
*
8787
* It's strongly recommended to enable
8888
* [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) for applications that use

packages/core/src/di/injection_token.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {ɵɵdefineInjectable} from './interface/defs';
2121
* `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
2222
* the `Injector`. This provides an additional level of type safety.
2323
*
24-
* <div class="alert is-helpful">
24+
* <div class="docs-alert docs-alert-helpful">
2525
*
2626
* **Important Note**: Ensure that you use the same instance of the `InjectionToken` in both the
2727
* provider and the injection call. Creating a new instance of `InjectionToken` in different places,

packages/core/src/i18n/tokens.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const LOCALE_ID: InjectionToken<string> = new InjectionToken(ngDevMode ?
8080
*
8181
* See the [i18n guide](guide/i18n/locale-id) for more information.
8282
*
83-
* <div class="alert is-helpful">
83+
* <div class="docs-alert docs-alert-helpful">
8484
*
8585
* **Deprecation notice:**
8686
*

packages/core/src/render3/after_render/api.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export enum AfterRenderPhase {
3535
* `AfterRenderPhase.EarlyRead` phase if reading can wait until after the write phase.
3636
* **Never** write to the DOM in this phase.
3737
*
38-
* <div class="alert is-important">
38+
* <div class="docs-alert docs-alert-important">
3939
*
4040
* Using this value can degrade performance.
4141
* Instead, prefer using built-in browser functionality when possible.
@@ -55,7 +55,7 @@ export enum AfterRenderPhase {
5555
* DOM, that haven't been refactored to use a different phase. **Never** use this phase if
5656
* it is possible to divide the work among the other phases instead.
5757
*
58-
* <div class="alert is-critical">
58+
* <div class="docs-alert docs-alert-critical">
5959
*
6060
* Using this value can **significantly** degrade performance.
6161
* Instead, prefer dividing work into the appropriate phase callbacks.

packages/core/src/render3/after_render/hooks.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export interface AfterRenderOptions {
5555
/**
5656
* The phase the callback should be invoked in.
5757
*
58-
* <div class="alert is-critical">
58+
* <div class="docs-alert docs-alert-critical">
5959
*
6060
* Defaults to `AfterRenderPhase.MixedReadWrite`. You should choose a more specific
6161
* phase instead. See `AfterRenderPhase` for more information.
@@ -83,7 +83,7 @@ export interface AfterRenderOptions {
8383
* - `read`
8484
* Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.
8585
*
86-
* <div class="alert is-critical">
86+
* <div class="docs-alert docs-alert-critical">
8787
*
8888
* You should prefer using the `read` and `write` phases over the `earlyRead` and `mixedReadWrite`
8989
* phases when possible, to avoid performance degradation.
@@ -110,7 +110,7 @@ export interface AfterRenderOptions {
110110
* manual DOM access, ensuring the best experience for the end users of your application
111111
* or library.
112112
*
113-
* <div class="alert is-important">
113+
* <div class="docs-alert docs-alert-important">
114114
*
115115
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
116116
* You must use caution when directly reading or writing the DOM and layout.
@@ -159,7 +159,7 @@ export function afterRender<E = never, W = never, M = never>(
159159
* Register a callback to be invoked each time the application finishes rendering, during the
160160
* `mixedReadWrite` phase.
161161
*
162-
* <div class="alert is-critical">
162+
* <div class="docs-alert docs-alert-critical">
163163
*
164164
* You should prefer specifying an explicit phase for the callback instead, or you risk significant
165165
* performance degradation.
@@ -172,7 +172,7 @@ export function afterRender<E = never, W = never, M = never>(
172172
* - on browser platforms only
173173
* - during the `mixedReadWrite` phase
174174
*
175-
* <div class="alert is-important">
175+
* <div class="docs-alert docs-alert-important">
176176
*
177177
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
178178
* You must use caution when directly reading or writing the DOM and layout.
@@ -254,7 +254,7 @@ export function afterRender(
254254
* - `read`
255255
* Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.
256256
*
257-
* <div class="alert is-critical">
257+
* <div class="docs-alert docs-alert-critical">
258258
*
259259
* You should prefer using the `read` and `write` phases over the `earlyRead` and `mixedReadWrite`
260260
* phases when possible, to avoid performance degradation.
@@ -281,7 +281,7 @@ export function afterRender(
281281
* manual DOM access, ensuring the best experience for the end users of your application
282282
* or library.
283283
*
284-
* <div class="alert is-important">
284+
* <div class="docs-alert docs-alert-important">
285285
*
286286
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
287287
* You must use caution when directly reading or writing the DOM and layout.
@@ -332,7 +332,7 @@ export function afterNextRender<E = never, W = never, M = never>(
332332
* Register a callback to be invoked the next time the application finishes rendering, during the
333333
* `mixedReadWrite` phase.
334334
*
335-
* <div class="alert is-critical">
335+
* <div class="docs-alert docs-alert-critical">
336336
*
337337
* You should prefer specifying an explicit phase for the callback instead, or you risk significant
338338
* performance degradation.
@@ -344,7 +344,7 @@ export function afterNextRender<E = never, W = never, M = never>(
344344
* - on browser platforms only
345345
* - during the `mixedReadWrite` phase
346346
*
347-
* <div class="alert is-important">
347+
* <div class="docs-alert docs-alert-important">
348348
*
349349
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
350350
* You must use caution when directly reading or writing the DOM and layout.

packages/core/src/render3/reactivity/after_render_effect.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export type ɵFirstAvailableSignal<T extends unknown[]> = T extends [infer H, ..
241241
* Register an effect that, when triggered, is invoked when the application finishes rendering, during the
242242
* `mixedReadWrite` phase.
243243
*
244-
* <div class="alert is-critical">
244+
* <div class="docs-alert docs-alert-critical">
245245
*
246246
* You should prefer specifying an explicit phase for the effect instead, or you risk significant
247247
* performance degradation.
@@ -254,7 +254,7 @@ export type ɵFirstAvailableSignal<T extends unknown[]> = T extends [infer H, ..
254254
* - on browser platforms only
255255
* - during the `mixedReadWrite` phase
256256
*
257-
* <div class="alert is-important">
257+
* <div class="docs-alert docs-alert-important">
258258
*
259259
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
260260
* You must use caution when directly reading or writing the DOM and layout.
@@ -285,7 +285,7 @@ export function afterRenderEffect(
285285
* - `read`
286286
* Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.
287287
*
288-
* <div class="alert is-critical">
288+
* <div class="docs-alert docs-alert-critical">
289289
*
290290
* You should prefer using the `read` and `write` phases over the `earlyRead` and `mixedReadWrite`
291291
* phases when possible, to avoid performance degradation.
@@ -313,7 +313,7 @@ export function afterRenderEffect(
313313
* manual DOM access, ensuring the best experience for the end users of your application
314314
* or library.
315315
*
316-
* <div class="alert is-important">
316+
* <div class="docs-alert docs-alert-important">
317317
*
318318
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
319319
* You must use caution when directly reading or writing the DOM and layout.

packages/platform-server/init/PACKAGE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The initialization happens as a [side effect of importing](https://developer.moz
88
import '@angular/platform-server/init';
99
```
1010

11-
<div class="alert is-important">
11+
<div class="docs-alert docs-alert-important">
1212

1313
The import must come before any imports (direct or transitive) that rely on DOM built-ins being available.
1414

packages/service-worker/src/update.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class SwUpdate {
9191
* In most cases, you should not use this method and instead should update a client by reloading
9292
* the page.
9393
*
94-
* <div class="alert is-important">
94+
* <div class="docs-alert docs-alert-important">
9595
*
9696
* Updating a client without reloading can easily result in a broken application due to a version
9797
* mismatch between the application shell and other page resources,

packages/upgrade/src/common/src/downgrade_injectable.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import {getTypeName, isFunction, validateInjectionKey} from './util';
4646
*
4747
* {@example upgrade/static/ts/full/module.ts region="example-app"}
4848
*
49-
* <div class="alert is-important">
49+
* <div class="docs-alert docs-alert-important">
5050
*
5151
* When using `downgradeModule()`, downgraded injectables will not be available until the Angular
5252
* module that provides them is instantiated. In order to be safe, you need to ensure that the

packages/upgrade/static/src/downgrade_module.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ let moduleUid = 0;
6767
* available until the downgraded module has been bootstrapped, i.e. by instantiating a downgraded
6868
* component.
6969
*
70-
* <div class="alert is-important">
70+
* <div class="docs-alert docs-alert-important">
7171
*
7272
* You cannot use `downgradeModule()` and `UpgradeModule` in the same hybrid application.<br />
7373
* Use one or the other.
@@ -98,7 +98,7 @@ let moduleUid = 0;
9898
* For a more detailed discussion of the differences and their implications, see
9999
* [Upgrading for Performance](https://angular.io/guide/upgrade).
100100
*
101-
* <div class="alert is-helpful">
101+
* <div class="docs-alert docs-alert-helpful">
102102
*
103103
* You can manually trigger a change detection run in AngularJS using
104104
* [scope.$apply(...)](https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$apply) or
@@ -183,7 +183,7 @@ export function downgradeModule<T>(
183183
* available until the downgraded module has been bootstrapped, i.e. by instantiating a downgraded
184184
* component.
185185
*
186-
* <div class="alert is-important">
186+
* <div class="docs-alert docs-alert-important">
187187
*
188188
* You cannot use `downgradeModule()` and `UpgradeModule` in the same hybrid application.<br />
189189
* Use one or the other.
@@ -214,7 +214,7 @@ export function downgradeModule<T>(
214214
* For a more detailed discussion of the differences and their implications, see
215215
* [Upgrading for Performance](https://angular.io/guide/upgrade).
216216
*
217-
* <div class="alert is-helpful">
217+
* <div class="docs-alert docs-alert-helpful">
218218
*
219219
* You can manually trigger a change detection run in AngularJS using
220220
* [scope.$apply(...)](https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$apply) or
@@ -300,7 +300,7 @@ export function downgradeModule<T>(moduleOrBootstrapFn: NgModuleFactory<T>): str
300300
* available until the downgraded module has been bootstrapped, i.e. by instantiating a downgraded
301301
* component.
302302
*
303-
* <div class="alert is-important">
303+
* <div class="docs-alert docs-alert-important">
304304
*
305305
* You cannot use `downgradeModule()` and `UpgradeModule` in the same hybrid application.<br />
306306
* Use one or the other.
@@ -331,7 +331,7 @@ export function downgradeModule<T>(moduleOrBootstrapFn: NgModuleFactory<T>): str
331331
* For a more detailed discussion of the differences and their implications, see
332332
* [Upgrading for Performance](https://angular.io/guide/upgrade).
333333
*
334-
* <div class="alert is-helpful">
334+
* <div class="docs-alert docs-alert-helpful">
335335
*
336336
* You can manually trigger a change detection run in AngularJS using
337337
* [scope.$apply(...)](https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$apply) or

packages/upgrade/static/testing/src/create_angular_testing_module.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,23 @@ export class AngularTestingModule {
5050
*
5151
* <code-example path="upgrade/static/ts/full/module.spec.ts" region="angular-spec"></code-example>
5252
*
53-
* <div class="alert is-important">
53+
* <div class="docs-alert docs-alert-important">
5454
*
5555
* This helper is for testing services not Components.
5656
* For Component testing you must still bootstrap a hybrid app. See `UpgradeModule` or
5757
* `downgradeModule` for more information.
5858
*
5959
* </div>
6060
*
61-
* <div class="alert is-important">
61+
* <div class="docs-alert docs-alert-important">
6262
*
6363
* The resulting configuration does not wire up AngularJS digests to Zone hooks. It is the
6464
* responsibility of the test writer to call `$rootScope.$apply`, as necessary, to trigger
6565
* AngularJS handlers of async events from Angular.
6666
*
6767
* </div>
6868
*
69-
* <div class="alert is-important">
69+
* <div class="docs-alert docs-alert-important">
7070
*
7171
* The helper sets up global variables to hold the shared Angular and AngularJS injectors.
7272
*

packages/upgrade/static/testing/src/create_angularjs_testing_module.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,23 @@ import {UpgradeAppType} from '../../../src/common/src/util';
4141
* <code-example path="upgrade/static/ts/full/module.spec.ts"
4242
* region="angularjs-spec"></code-example>
4343
*
44-
* <div class="alert is-important">
44+
* <div class="docs-alert docs-alert-important">
4545
*
4646
* This helper is for testing services not components.
4747
* For Component testing you must still bootstrap a hybrid app. See `UpgradeModule` or
4848
* `downgradeModule` for more information.
4949
*
5050
* </div>
5151
*
52-
* <div class="alert is-important">
52+
* <div class="docs-alert docs-alert-important">
5353
*
5454
* The resulting configuration does not wire up AngularJS digests to Zone hooks. It is the
5555
* responsibility of the test writer to call `$rootScope.$apply`, as necessary, to trigger
5656
* AngularJS handlers of async events from Angular.
5757
*
5858
* </div>
5959
*
60-
* <div class="alert is-important">
60+
* <div class="docs-alert docs-alert-important">
6161
*
6262
* The helper sets up global variables to hold the shared Angular and AngularJS injectors.
6363
*

0 commit comments

Comments
 (0)