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

Lines changed: 8 additions & 4 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 9 additions & 9 deletions
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

Lines changed: 4 additions & 4 deletions
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.

0 commit comments

Comments
 (0)