igniteui-astro-components 1.5.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,332 @@
1
+ ---
2
+ /**
3
+ * Renders a side-by-side "Do" / "Don't" pair of component screenshots.
4
+ *
5
+ * Usage:
6
+ * <DoDont
7
+ * doSrc={virtualScrollDo}
8
+ * doAlt="Virtual Scroll showing a list of 100,000 employees"
9
+ * dontSrc={virtualScrollDoNot}
10
+ * dontAlt="Virtual Scroll used for a list of only five employees"
11
+ * >
12
+ * <Fragment slot="do">Use the Virtual Scroll for a long list.</Fragment>
13
+ * <Fragment slot="dont">Render a short list directly with the List.</Fragment>
14
+ * </DoDont>
15
+ *
16
+ * Each panel is a framed image with a status badge pinned to its top-inline
17
+ * corner — a green check for the recommended usage, a red clear for the one to
18
+ * avoid. The frames hug their content and share a subgrid row, so every frame
19
+ * is as tall as the tallest screenshot in the row and the captions start on a
20
+ * common baseline. The frame's gray canvas shows in its padding and beside a
21
+ * screenshot narrower than the frame; screenshots are drawn at full opacity so
22
+ * their text keeps its contrast.
23
+ *
24
+ * Both description slots are required: a screenshot is never self-explanatory,
25
+ * so each panel must say in real text why it is the one to follow or avoid.
26
+ * A missing or empty slot throws at build time, like a missing `alt`.
27
+ *
28
+ * Images: an `astro:assets` import is rendered through Astro's <Image>, which
29
+ * converts the format, emits a `srcset` for 1x/2x/3x displays and writes the
30
+ * intrinsic `width`/`height` so the frame holds its size before the file
31
+ * arrives. A plain URL string is rendered as a bare <img> — Astro cannot
32
+ * inspect it, so it gets no `srcset` and no dimensions, and the frame grows
33
+ * when the image lands. Prefer imports for anything that ships in the docs.
34
+ *
35
+ * Loading: a small client script marks a frame whose image is still pending
36
+ * (`data-loading`) and the stylesheet shimmers its canvas until the image
37
+ * loads or fails. A failed image leaves `data-error` on the frame and
38
+ * the script drops a broken-image icon and a short
39
+ * "could not be loaded" notice into it. The notice is `aria-hidden`: it only
40
+ * explains the empty box to a sighted reader, and the <img> keeps carrying
41
+ * the alt for assistive tech. Without JavaScript nothing is marked and the frame
42
+ * stays static.
43
+ *
44
+ * Accessibility: `doAlt` and `dontAlt` are required and become the inner
45
+ * <img> `alt`. These images carry the guidance, so describe what each one
46
+ * shows, not merely which component it is. The badges are decorative — the
47
+ * labels already name each panel — so they are hidden from assistive tech.
48
+ * A visually hidden colon separates each label from its description so a
49
+ * screen reader hears "Do: use…" rather than one run-on phrase.
50
+ *
51
+ * Localization: the default labels follow the site language — the docs
52
+ * integration's `navLang`, the same value DocsLayout passes to the nav bar and
53
+ * footer. Pass `doLabel` / `dontLabel` to override it.
54
+ */
55
+ import type { ImageMetadata } from 'astro';
56
+ import { Image } from 'astro:assets';
57
+ import { navLang } from 'virtual:docs-template/site-meta';
58
+ import './DoDont.scss';
59
+
60
+ interface Props {
61
+ /**
62
+ * The recommended-usage image. An `astro:assets` import or a URL. Required.
63
+ *
64
+ * Named `doSrc`, not `do`, because Astro merges named slots into props —
65
+ * a prop sharing a slot's name would be overwritten by that slot.
66
+ */
67
+ doSrc: ImageMetadata | string;
68
+ /**
69
+ * The recommended-usage image's accessible description. Required — it
70
+ * becomes the inner <img>'s `alt`. Describe what the screenshot shows.
71
+ */
72
+ doAlt: string;
73
+ /** The usage-to-avoid image. An `astro:assets` import or a URL. Required. */
74
+ dontSrc: ImageMetadata | string;
75
+ /**
76
+ * The usage-to-avoid image's accessible description. Required — it becomes
77
+ * the inner <img>'s `alt`. Describe what the screenshot shows.
78
+ */
79
+ dontAlt: string;
80
+ /**
81
+ * Label for the recommended panel.
82
+ * @default 'Do' (localized: 推奨 for jp, 권장 for kr)
83
+ */
84
+ doLabel?: string;
85
+ /**
86
+ * Label for the panel to avoid.
87
+ * @default "Don't" (localized: 非推奨 for jp, 비권장 for kr)
88
+ */
89
+ dontLabel?: string;
90
+ /**
91
+ * Image loading strategy. Keep the default for a block further down a topic;
92
+ * pass `'eager'` when the block is the first thing on the page, so the
93
+ * largest contentful paint is not delayed. Eager images are also fetched at
94
+ * high priority.
95
+ * @default 'lazy'
96
+ */
97
+ loading?: 'lazy' | 'eager';
98
+ /**
99
+ * Notice shown inside a frame whose image failed to load. Hidden from
100
+ * assistive tech, which still gets the image's `alt`.
101
+ * @default 'Sorry, this image could not be loaded.' (localized for jp / kr)
102
+ */
103
+ errorText?: string;
104
+ /** Optional extra class(es) forwarded to the container. */
105
+ class?: string;
106
+ }
107
+
108
+ /**
109
+ * Default labels per site language: the integration's `navLang` (`jp`, `kr`)
110
+ * or an Astro i18n locale (`ja`, `ko`). Anything unrecognized falls back to
111
+ * English.
112
+ */
113
+ const DEFAULT_LABELS: Record<string, { do: string; dont: string; error: string }> = {
114
+ en: { do: 'Do', dont: "Don't", error: 'Sorry, this image could not be loaded.' },
115
+ jp: { do: '推奨', dont: '非推奨', error: '申し訳ありません。この画像を読み込めませんでした。' },
116
+ ja: { do: '推奨', dont: '非推奨', error: '申し訳ありません。この画像を読み込めませんでした。' },
117
+ kr: { do: '권장', dont: '비권장', error: '죄송합니다. 이 이미지를 불러올 수 없습니다.' },
118
+ ko: { do: '권장', dont: '비권장', error: '죄송합니다. 이 이미지를 불러올 수 없습니다.' },
119
+ };
120
+
121
+ const lang = (navLang ?? Astro.currentLocale ?? 'en').toLowerCase();
122
+ const defaults = DEFAULT_LABELS[lang] ?? DEFAULT_LABELS.en;
123
+
124
+ const {
125
+ doSrc,
126
+ doAlt,
127
+ dontSrc,
128
+ dontAlt,
129
+ doLabel = defaults.do,
130
+ dontLabel = defaults.dont,
131
+ loading = 'lazy',
132
+ errorText = defaults.error,
133
+ class: className,
134
+ } = Astro.props;
135
+
136
+ /**
137
+ * The width the stylesheet lays a screenshot out at (`--igd-dodont-image-width`)
138
+ * and the frame's minimum inline padding (`--igd-dodont-padding-inline`). They
139
+ * size the `srcset` candidates and the `sizes` hint, so keep them in step with
140
+ * DoDont.scss. A topic that retunes the token still gets correct pixels — the
141
+ * browser picks the closest candidate — just not the perfectly matched one.
142
+ */
143
+ const IMAGE_WIDTH = 360;
144
+ const PADDING_INLINE = 20;
145
+ const widths = [IMAGE_WIDTH, IMAGE_WIDTH * 2, IMAGE_WIDTH * 3];
146
+ // Below the stacking point the panel is the full container, so the image is
147
+ // roughly viewport-wide; above it the image sits at its design width.
148
+ const sizes = `(max-width: ${IMAGE_WIDTH + 2 * PADDING_INLINE}px) 100vw, ${IMAGE_WIDTH}px`;
149
+
150
+ const isImport = (image: ImageMetadata | string): image is ImageMetadata =>
151
+ typeof image !== 'string';
152
+
153
+ const panels = [
154
+ {
155
+ key: 'do',
156
+ image: doSrc,
157
+ alt: doAlt,
158
+ label: doLabel,
159
+ icon: 'check-bold',
160
+ variant: 'success',
161
+ },
162
+ {
163
+ key: 'dont',
164
+ image: dontSrc,
165
+ alt: dontAlt,
166
+ label: dontLabel,
167
+ icon: 'clear-bold',
168
+ variant: 'danger',
169
+ },
170
+ ] as const;
171
+
172
+ for (const panel of panels) {
173
+ if (typeof panel.image === 'string' ? !panel.image.trim() : !panel.image?.src) {
174
+ throw new Error(`<DoDont> requires a \`${panel.key}Src\` image (an import or a URL).`);
175
+ }
176
+ // The screenshots carry the guidance, so an absent, empty or whitespace-only
177
+ // alt would hide that guidance from screen-reader users. Fail loudly in dev.
178
+ if (!panel.alt?.trim()) {
179
+ throw new Error(
180
+ `<DoDont> requires a non-empty \`${panel.key}Alt\` describing the image for screen readers.`,
181
+ );
182
+ }
183
+ }
184
+
185
+ /**
186
+ * The descriptions are rendered up front so they can be validated. The slots
187
+ * carry the guidance in real, indexable text — a screenshot alone would leave
188
+ * search engines, translators and screen-reader users with only the alt — so
189
+ * an absent, empty or whitespace-only slot is a build error, like a missing
190
+ * alt. The rendered HTML is reused below instead of rendering the slot twice.
191
+ */
192
+ const descriptions: Record<(typeof panels)[number]['key'], string> = {
193
+ do: Astro.slots.has('do') ? await Astro.slots.render('do') : '',
194
+ dont: Astro.slots.has('dont') ? await Astro.slots.render('dont') : '',
195
+ };
196
+
197
+ for (const panel of panels) {
198
+ const text = descriptions[panel.key].replace(/<[^>]*>/g, '').replace(/&nbsp;/g, ' ');
199
+ if (!text.trim()) {
200
+ throw new Error(
201
+ `<DoDont> requires a non-empty "${panel.key}" slot explaining why that panel is the one to ${
202
+ panel.key === 'do' ? 'follow' : 'avoid'
203
+ }. An image is not guidance on its own.`,
204
+ );
205
+ }
206
+ }
207
+
208
+ const fetchpriority = loading === 'eager' ? 'high' : undefined;
209
+ ---
210
+
211
+ <div class:list={['igd-dodont', className]}>
212
+ {panels.map((panel) => (
213
+ <figure class:list={['igd-dodont__panel', `igd-dodont__panel--${panel.key}`]}>
214
+ <div class="igd-dodont__frame" data-error-text={errorText}>
215
+ {isImport(panel.image) ? (
216
+ <Image
217
+ class="igd-dodont__image"
218
+ src={panel.image}
219
+ alt={panel.alt}
220
+ widths={widths}
221
+ sizes={sizes}
222
+ loading={loading}
223
+ decoding="async"
224
+ fetchpriority={fetchpriority}
225
+ />
226
+ ) : (
227
+ <img
228
+ class="igd-dodont__image"
229
+ src={panel.image}
230
+ alt={panel.alt}
231
+ loading={loading}
232
+ decoding="async"
233
+ fetchpriority={fetchpriority}
234
+ />
235
+ )}
236
+ <igc-badge class="igd-dodont__badge" variant={panel.variant} outlined aria-hidden="true">
237
+ <igc-icon name={panel.icon} collection="docs" aria-hidden="true" />
238
+ </igc-badge>
239
+ </div>
240
+
241
+ <figcaption class="igd-dodont__caption">
242
+ {/* Kept on one line: Astro preserves template whitespace, and a text-node
243
+ space between the label and the separator would be announced as "Do : …". */}
244
+ {/* prettier-ignore */}
245
+ <span class="igd-dodont__label">{panel.label}<span class="igd-dodont__sr-only">: </span></span>
246
+ <div class="igd-dodont__description" set:html={descriptions[panel.key]} />
247
+ </figcaption>
248
+ </figure>
249
+ ))}
250
+ </div>
251
+
252
+ <script>
253
+ import { defineComponents, IgcBadgeComponent, IgcIconComponent } from 'igniteui-webcomponents';
254
+ import '../../../scripts/icon-registry';
255
+
256
+ defineComponents(IgcBadgeComponent, IgcIconComponent);
257
+
258
+ /**
259
+ * Mark every frame whose image has not arrived yet; the stylesheet shimmers
260
+ * a marked frame's canvas. The mark is added here, not server-side, so a
261
+ * page without JavaScript never shows a shimmer it cannot clear.
262
+ *
263
+ * `complete` is false for a lazy image the browser has not started fetching,
264
+ * so an off-screen frame shimmers until it scrolls into view and loads —
265
+ * which is exactly when a reader would look at it.
266
+ */
267
+ /** A torn picture frame: two halves of a rectangle split by a zigzag. */
268
+ const BROKEN_IMAGE_SVG =
269
+ '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">' +
270
+ '<path d="M4 11 4 5h16v6l-4-4-4 4-4-4Zm0 3 4-4 4 4 4-4 4 4v5H4Z" ' +
271
+ 'stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>';
272
+
273
+ /**
274
+ * Flag a frame whose image failed and show a broken-image icon with the
275
+ * frame's notice in its place. The notice is aria-hidden: it only tells a
276
+ * sighted reader why the box is empty, and the <img> still exposes the alt.
277
+ */
278
+ function markBroken(frame: HTMLElement): void {
279
+ if (frame.dataset.error !== undefined) return;
280
+ frame.dataset.error = '';
281
+
282
+ const fallback = document.createElement('span');
283
+ fallback.className = 'igd-dodont__fallback';
284
+ fallback.setAttribute('aria-hidden', 'true');
285
+
286
+ // Inline SVG rather than <igc-icon>: the fallback must not depend on the
287
+ // icon registry having loaded (or, in dev, on a glob that was evaluated
288
+ // before the icon file existed). Static markup, no user input.
289
+ const icon = document.createElement('span');
290
+ icon.className = 'igd-dodont__fallback-icon';
291
+ icon.innerHTML = BROKEN_IMAGE_SVG;
292
+
293
+ const text = document.createElement('span');
294
+ text.className = 'igd-dodont__fallback-text';
295
+ text.textContent = frame.dataset.errorText ?? '';
296
+
297
+ fallback.append(icon, text);
298
+ frame.append(fallback);
299
+ }
300
+
301
+ function markPendingFrames(): void {
302
+ const frames = document.querySelectorAll<HTMLElement>('.igd-dodont__frame');
303
+ for (const frame of frames) {
304
+ const img = frame.querySelector<HTMLImageElement>('.igd-dodont__image');
305
+ if (!img) continue;
306
+ if (img.complete) {
307
+ // Already settled before this ran. A broken image reports complete
308
+ // with no natural size.
309
+ if (img.naturalWidth === 0) markBroken(frame);
310
+ continue;
311
+ }
312
+
313
+ frame.dataset.loading = '';
314
+ const settle = () => {
315
+ delete frame.dataset.loading;
316
+ };
317
+ img.addEventListener('load', settle, { once: true });
318
+ img.addEventListener(
319
+ 'error',
320
+ () => {
321
+ settle();
322
+ markBroken(frame);
323
+ },
324
+ { once: true },
325
+ );
326
+ }
327
+ }
328
+
329
+ // astro:page-load fires on the initial load and after every client-router
330
+ // navigation, so it covers both without double-initialization.
331
+ document.addEventListener('astro:page-load', markPendingFrames);
332
+ </script>
@@ -0,0 +1,247 @@
1
+ @use 'igniteui-theming/sass/typography' as *;
2
+
3
+ // Unlayered on purpose: the markdown layer styles every `img` and `figure`,
4
+ // and these rules must win over it (same as Anatomy.scss).
5
+
6
+ .igd-dodont {
7
+ // The public --igd-dodont-* tokens are only read, never set, so a value from
8
+ // an ancestor or a class on the block reaches every rule; --_* hold defaults.
9
+ --_gap: var(--igd-dodont-gap, #{rem(26px)});
10
+ --_radius: var(--igd-dodont-radius, #{rem(4px)});
11
+ --_padding-block: var(--igd-dodont-padding-block, #{rem(86px)});
12
+ --_padding-inline: var(--igd-dodont-padding-inline, #{rem(20px)});
13
+ --_image-width: var(--igd-dodont-image-width, #{rem(360px)});
14
+ // Not --_badge-size: igc-badge declares that name on its own host.
15
+ --_badge-diameter: var(--igd-dodont-badge-size, #{rem(26px)});
16
+ --_badge-inset: var(--igd-dodont-badge-inset, #{rem(20px)});
17
+ --_border-width: var(--igd-dodont-border-width, #{rem(1px)});
18
+ --_accent-width: var(--igd-dodont-accent-width, #{rem(2px)});
19
+ --_stack-extra: var(--igd-dodont-stack-extra, #{rem(20px)});
20
+ --_caption-gap: var(--igd-dodont-caption-gap, #{rem(16px)});
21
+ --_min-panel-width: var(
22
+ --igd-dodont-min-panel-width,
23
+ calc(var(--_image-width) + 2 * var(--_padding-inline))
24
+ );
25
+
26
+ display: grid;
27
+ grid-template-columns: repeat(auto-fit, minmax(min(var(--_min-panel-width), 100%), 1fr));
28
+ grid-template-rows: auto auto;
29
+ // Each panel's subgrid keeps its own gap between frame and caption, so the
30
+ // extra row gap only shows between panels once they stack.
31
+ row-gap: calc(var(--_gap) + var(--_stack-extra));
32
+ column-gap: var(--_gap);
33
+ align-items: stretch;
34
+ padding: 0;
35
+ margin: 0 0 var(--_gap);
36
+ inline-size: 100%;
37
+ isolation: isolate;
38
+ }
39
+
40
+ .igd-dodont__panel {
41
+ display: grid;
42
+ grid-row: span 2;
43
+ grid-template-rows: subgrid;
44
+ gap: var(--_gap);
45
+ margin: 0;
46
+ min-inline-size: 0;
47
+ }
48
+
49
+ .igd-dodont__frame {
50
+ position: relative;
51
+ isolation: isolate;
52
+ overflow: hidden;
53
+ border-radius: var(--_radius);
54
+ display: grid;
55
+ place-items: center;
56
+ // Borders are subtracted so the spec distances hold from the outer edge.
57
+ padding: calc(var(--_padding-block) - var(--_accent-width))
58
+ calc(var(--_padding-inline) - var(--_border-width))
59
+ calc(var(--_padding-block) - var(--_border-width));
60
+ min-block-size: 0;
61
+ }
62
+
63
+ .igd-dodont__image {
64
+ display: block;
65
+ inline-size: min(var(--_image-width), 100%);
66
+ block-size: auto;
67
+ max-block-size: 100%;
68
+ object-fit: contain;
69
+ object-position: center;
70
+ border-radius: 0;
71
+ margin: 0;
72
+ }
73
+
74
+ .igd-dodont__badge {
75
+ position: absolute;
76
+ inset-block-start: calc(var(--_badge-inset) - var(--_accent-width));
77
+ inset-inline-start: calc(var(--_badge-inset) - var(--_border-width));
78
+ z-index: 1;
79
+ }
80
+
81
+ .igd-dodont__caption {
82
+ display: flex;
83
+ flex-direction: column;
84
+ gap: var(--_caption-gap);
85
+ margin: 0;
86
+ padding: 0;
87
+ text-align: start;
88
+ }
89
+
90
+ // THEME
91
+ .igd-dodont__frame {
92
+ --_bg: var(--igd-dodont-bg, light-dark(var(--ig-gray-100), var(--ig-surface-500)));
93
+ --_border-color: var(
94
+ --igd-dodont-border-color,
95
+ light-dark(var(--ig-gray-300), var(--ig-surface-700))
96
+ );
97
+
98
+ border: var(--_border-width) solid var(--_border-color);
99
+ border-block-start: var(--_accent-width) solid var(--_frame-accent);
100
+
101
+ // Canvas at 0.7 opacity behind the content; the borders sit outside it.
102
+ &::after {
103
+ content: '';
104
+ position: absolute;
105
+ inset: 0;
106
+ z-index: -1;
107
+ background: var(--_bg);
108
+ opacity: 0.7;
109
+ pointer-events: none;
110
+ }
111
+ }
112
+
113
+ .igd-dodont__frame[data-loading] {
114
+ --_shimmer: light-dark(rgb(0 0 0 / 0.05), rgb(255 255 255 / 0.07));
115
+
116
+ &::before {
117
+ content: '';
118
+ position: absolute;
119
+ inset: 0;
120
+ pointer-events: none;
121
+ background: linear-gradient(90deg, transparent 20%, var(--_shimmer) 50%, transparent 80%);
122
+ background-size: 200% 100%;
123
+ animation: igd-dodont-shimmer 1.6s ease-in-out infinite;
124
+
125
+ @media (prefers-reduced-motion: reduce) {
126
+ animation: none;
127
+ }
128
+ }
129
+ }
130
+
131
+ @keyframes igd-dodont-shimmer {
132
+ from {
133
+ background-position: 200% 0;
134
+ }
135
+
136
+ to {
137
+ background-position: -200% 0;
138
+ }
139
+ }
140
+
141
+ .igd-dodont__frame[data-error] {
142
+ .igd-dodont__image,
143
+ .igd-dodont__fallback {
144
+ grid-area: 1 / 1;
145
+ min-block-size: #{rem(120px)};
146
+ }
147
+
148
+ .igd-dodont__image {
149
+ opacity: 0;
150
+ }
151
+
152
+ .igd-dodont__fallback {
153
+ inline-size: min(var(--_image-width), 100%);
154
+ display: grid;
155
+ place-content: center;
156
+ justify-items: center;
157
+ gap: #{rem(8px)};
158
+ box-sizing: border-box;
159
+ padding: #{rem(16px)};
160
+ text-align: center;
161
+ text-wrap: balance;
162
+ pointer-events: none;
163
+ }
164
+
165
+ .igd-dodont__fallback-icon {
166
+ display: block;
167
+ inline-size: #{rem(32px)};
168
+ block-size: #{rem(32px)};
169
+ color: var(--ig-gray-600);
170
+
171
+ svg {
172
+ display: block;
173
+ inline-size: 100%;
174
+ block-size: 100%;
175
+ }
176
+ }
177
+
178
+ .igd-dodont__fallback-text {
179
+ @include type-style('subtitle-2') {
180
+ margin: 0;
181
+ }
182
+
183
+ color: var(--ig-gray-700);
184
+ }
185
+ }
186
+
187
+ .igd-dodont__badge {
188
+ --ig-badge-size: var(--_badge-diameter);
189
+ --ig-badge-border-color: light-dark(var(--ig-gray-50), var(--ig-surface-600));
190
+
191
+ &::part(base) {
192
+ inline-size: var(--_badge-diameter);
193
+ block-size: var(--_badge-diameter);
194
+ padding-inline: 0;
195
+ border-radius: 50%;
196
+ }
197
+
198
+ igc-icon {
199
+ --size: #{rem(18px)};
200
+ }
201
+ }
202
+
203
+ .igd-dodont__panel--do {
204
+ --_accent: var(--igd-dodont-accent, light-dark(var(--ig-success-900), var(--ig-success-100)));
205
+ // Same token the success badge is filled with.
206
+ --_frame-accent: var(--igd-dodont-frame-accent, var(--ig-success-900));
207
+ }
208
+
209
+ .igd-dodont__panel--dont {
210
+ // error-800: error-700 is 4.1:1 on white and fails AA for 14px text.
211
+ --_accent: var(--igd-dodont-accent, light-dark(var(--ig-error-700), var(--ig-error-300)));
212
+ // Same token the danger badge is filled with.
213
+ --_frame-accent: var(--igd-dodont-frame-accent, var(--ig-error-700));
214
+ }
215
+
216
+ // TYPOGRAPHY
217
+
218
+ .igd-dodont__label {
219
+ @include type-style('subtitle-2') {
220
+ margin: 0;
221
+ }
222
+
223
+ color: var(--_accent);
224
+ }
225
+
226
+ // Visually hidden, still read by screen readers.
227
+ .igd-dodont__sr-only {
228
+ position: absolute;
229
+ inline-size: 1px;
230
+ block-size: 1px;
231
+ padding: 0;
232
+ margin: -1px;
233
+ overflow: hidden;
234
+ clip-path: inset(50%);
235
+ white-space: nowrap;
236
+ border: 0;
237
+ }
238
+
239
+ // MDX wraps slot content in <p>; style it directly to beat the markdown layer.
240
+ .igd-dodont__description,
241
+ .igd-dodont__description :is(p, ul, ol) {
242
+ @include type-style('body-2') {
243
+ margin: 0;
244
+ }
245
+
246
+ color: var(--ig-gray-700);
247
+ }