Skip to content

Commit a7f5d2d

Browse files
Let a gradient stop name a theme colour, drawn in the reader's (#74)
* Let a gradient stop name a theme colour, drawn in the reader's ColorGradient.Roles records the theme role each stop stands for. Relayout with LayoutContext.Tones recolours those stops for the reader, and a page writes them as var(--ms-tone-<role>, <colour>). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rqqt7TK8MH3rfMYZGSAgd1 * Keep a sampled fallback for toned gradients on a page; keep roles with their stops A var() in a gradient makes the declaration invalid rather than dropped in a browser that cannot blend in the space, so the toned gradient goes in its own variable and the stylesheet uses it only under @supports. A stop the reader cannot decode drops its role with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rqqt7TK8MH3rfMYZGSAgd1 * Note --ms-shade-toned in the changelog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rqqt7TK8MH3rfMYZGSAgd1 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent b52993e commit a7f5d2d

10 files changed

Lines changed: 172 additions & 18 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

99
## 2.24.0 — Unreleased
1010

11+
### Added
12+
13+
- **`ColorGradient.Roles`**: the theme colour each stop stands for (`ThemeRole?`, by position). Where a
14+
layout is drawn for a reader with a theme of their own, `LayoutContext.Tones` gives the colour for
15+
each role, and a `Shaded` block or a gauge is shaded in those colours rather than the ones the stops
16+
were written with (`ColorGradient.Toned`). A reader with no theme keeps the written colours. A page
17+
writes such a stop as `var(--ms-tone-<role>, <colour>)`, in `--ms-shade-toned`
18+
beside the sampled `--ms-shade` (class `ms-toned`), and the stylesheet uses it where the browser can
19+
blend in the gradient's space. The roles are stored on the wire as `ro`.
20+
1121
### Changed
1222

1323
- **A `Table` read linearly is one line per row**: its labelled values, comma-separated

‎MarkupString.Html/Emitters/LayoutHtml.cs‎

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,8 @@ private static void GaugeBar(Gauge gauge, ColorGradient gradient, double maximum
416416
html.Write(Decimal(value));
417417
html.Write("\"");
418418
BarWidth(gauge, html);
419-
html.Write("><div class=\"ms-gauge-fill\" style=\"width:");
419+
var toned = gauge.Shade != GaugeShade.Value && gradient.HasRoles;
420+
html.Write(toned ? "><div class=\"ms-gauge-fill ms-toned\" style=\"width:" : "><div class=\"ms-gauge-fill\" style=\"width:");
420421
html.Write(Decimal(Math.Round(ratio * 100, 2)));
421422
html.Write("%;");
422423
if (gauge.Shade == GaugeShade.Value)
@@ -428,7 +429,9 @@ private static void GaugeBar(Gauge gauge, ColorGradient gradient, double maximum
428429
{
429430
html.Write("background-image:");
430431
html.Write(gradient.ToCss(9));
431-
html.Write(";background-image:");
432+
// A theme colour's var() would leave the declaration invalid, not dropped, in a browser that cannot blend in
433+
// the space; the stylesheet puts it in place only where it can (as for a shaded block).
434+
html.Write(toned ? ";--ms-shade-toned:" : ";background-image:");
432435
html.Write(gradient.ToCss());
433436
html.Write(";background-size:");
434437
html.Write(Decimal(Math.Round(100 / ratio, 2)));
@@ -595,15 +598,25 @@ private static void Shaded(Shaded shaded, HtmlLayoutWriter html)
595598
GradientFlow.Diagonal => "to bottom right",
596599
_ => "to right",
597600
};
601+
var toned = shaded.Gradient.HasRoles;
598602
html.Write(shaded.Target switch
599603
{
600-
GradientTarget.Borders => "<div class=\"ms-shaded ms-shade-borders\" style=\"--ms-shade:",
601-
GradientTarget.Text => "<div class=\"ms-shaded ms-shade-text\" style=\"--ms-shade:",
602-
_ => "<div class=\"ms-shaded\" style=\"--ms-shade:",
604+
GradientTarget.Borders => "<div class=\"ms-shaded ms-shade-borders",
605+
GradientTarget.Text => "<div class=\"ms-shaded ms-shade-text",
606+
_ => "<div class=\"ms-shaded",
603607
});
608+
html.Write(toned ? " ms-toned\" style=\"--ms-shade:" : "\" style=\"--ms-shade:");
604609
html.Write(shaded.Gradient.ToCss(9, direction));
610+
if (toned)
611+
{
612+
// A stop that names a theme colour is written as its variable, which only the unsampled gradient keeps. Its
613+
// var() would leave the declaration invalid in a browser that cannot blend in the space, rather than dropped,
614+
// so the stylesheet uses it only where the space is supported, and the sampled colours elsewhere.
615+
html.Write(";--ms-shade-toned:");
616+
html.Write(shaded.Gradient.ToCss(direction));
617+
}
605618
// Shading the box drawing alone, the text is not clipped to the gradient, so nothing is painted behind it.
606-
if (shaded.Target != GradientTarget.Borders)
619+
else if (shaded.Target != GradientTarget.Borders)
607620
{
608621
html.Write(";background-image:var(--ms-shade);background-image:");
609622
html.Write(shaded.Gradient.ToCss(direction));

‎MarkupString.Html/LayoutCss.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ public static class LayoutCss
9595
".ms-shaded:not(.ms-shade-borders) { -webkit-background-clip: text; background-clip: text; color: transparent; }\n" +
9696
".ms-shaded:not(.ms-shade-borders) :is(.ms-box-title, .ms-rule-title, .ms-field > dt, .ms-table th, .ms-bullets .ms-marker) { color: transparent; }\n" +
9797
".ms-shaded:not(.ms-shade-text) :is(.ms-box, .ms-gauge-bar), .ms-shaded:not(.ms-shade-text) :is(.ms-rule, .ms-divider)::before, .ms-shaded:not(.ms-shade-text) :is(.ms-rule, .ms-divider)::after, .ms-shaded:not(.ms-shade-text) .ms-line { border-image: var(--ms-shade) 1; }\n" +
98+
".ms-shaded.ms-toned:not(.ms-shade-borders) { background-image: var(--ms-shade); }\n" +
99+
"@supports (background-image: linear-gradient(in oklch, red, blue)) { .ms-shaded.ms-toned:not(.ms-shade-borders) { background-image: var(--ms-shade-toned); } .ms-shaded.ms-toned:not(.ms-shade-text) :is(.ms-box, .ms-gauge-bar), .ms-shaded.ms-toned:not(.ms-shade-text) :is(.ms-rule, .ms-divider)::before, .ms-shaded.ms-toned:not(.ms-shade-text) :is(.ms-rule, .ms-divider)::after, .ms-shaded.ms-toned:not(.ms-shade-text) .ms-line { border-image: var(--ms-shade-toned) 1; } .ms-gauge-fill.ms-toned { background-image: var(--ms-shade-toned) !important; } }\n" +
98100
".ms-table-wrap { max-width: 100%; overflow-x: auto; }\n" +
99101
".ms-table { border-collapse: collapse; }\n" +
100102
".ms-table.ms-fill { width: 100%; }\n" +

‎MarkupString.Tests/Layout/GradientTests.cs‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,62 @@ public async Task TheFallback_SurvivesSerialization()
169169
await Assert.That(json).Contains("\"fs\":2");
170170
await Assert.That(MarkupTextSerializer.Serialize(read, Registry)).IsEqualTo(json);
171171
}
172+
173+
/// <summary>A gradient from the theme's primary colour (red when written) to blue, in a box.</summary>
174+
private static MarkupText TonedBox() =>
175+
BlockLayout.Build(new TextBlock(MarkupText.Plain("abc")).Bordered()
176+
.Shaded(new ColorGradient([Red, Blue]) { Roles = [ThemeRole.Primary, null] }, GradientFlow.Characters), 0);
177+
178+
[Test]
179+
public async Task AStopNamingAThemeColour_TakesTheReadersColour_AfterTheSerializer()
180+
{
181+
var read = MarkupTextSerializer.Deserialize(MarkupTextSerializer.Serialize(TonedBox(), Registry), Registry);
182+
var context = LayoutContext.Default with { Tones = role => role == ThemeRole.Primary ? Lime : null };
183+
184+
var output = BlockLayout.Relayout(read, 0, context).Render(MarkupFormat.Ansi, Registry);
185+
186+
await Assert.That(output).Contains("38;2;0;255;0m");
187+
await Assert.That(output).DoesNotContain("38;2;255;0;0m");
188+
await Assert.That(output).Contains("38;2;0;0;255m");
189+
}
190+
191+
[Test]
192+
public async Task AStopNamingAThemeColour_KeepsItsOwn_ForAReaderWithoutATheme()
193+
{
194+
var read = MarkupTextSerializer.Deserialize(MarkupTextSerializer.Serialize(TonedBox(), Registry), Registry);
195+
196+
await Assert.That(BlockLayout.Relayout(read, 0, LayoutContext.Default).Render(MarkupFormat.Ansi, Registry))
197+
.IsEqualTo(TonedBox().Render(MarkupFormat.Ansi, Registry));
198+
}
199+
200+
[Test]
201+
public async Task AStopNamingAThemeColour_IsItsVariable_OnAPage()
202+
{
203+
var gradient = new ColorGradient([Red, Blue]) { Roles = [ThemeRole.Primary, null] };
204+
205+
await Assert.That(gradient.ToCss()).IsEqualTo("linear-gradient(to right in oklch, var(--ms-tone-primary, #ff0000), #0000ff)");
206+
}
207+
208+
[Test]
209+
public async Task AStopThatCannotBeRead_TakesItsThemeColourWithIt()
210+
{
211+
var json = MarkupTextSerializer.Serialize(TonedBox(), Registry);
212+
var unreadable = new System.Text.RegularExpressions.Regex("\"st\":\\[\\{\"t\":\"#\",\"p\":\\[null,\\[\\{\"k\":\"ansi\"")
213+
.Replace(json, "\"st\":[{\"t\":\"#\",\"p\":[null,[{\"k\":\"nosuch\"");
214+
var read = MarkupTextSerializer.Deserialize(unreadable, Registry);
215+
var context = LayoutContext.Default with { Tones = role => role == ThemeRole.Primary ? Lime : null };
216+
217+
await Assert.That(unreadable).IsNotEqualTo(json);
218+
await Assert.That(BlockLayout.Relayout(read, 0, context).Render(MarkupFormat.Ansi, Registry)).DoesNotContain("38;2;0;255;0m");
219+
}
220+
221+
[Test]
222+
public async Task AStopNamingAThemeColour_IsUsedOnAPage_OnlyWhereTheBrowserCanBlendIt()
223+
{
224+
var html = TonedBox().Render(MarkupFormat.Html, Registry);
225+
226+
await Assert.That(html).Contains("class=\"ms-shaded ms-toned\" style=\"--ms-shade:linear-gradient(to right, #");
227+
await Assert.That(html).Contains(";--ms-shade-toned:linear-gradient(to right in oklch, var(--ms-tone-primary, #ff0000), #0000ff)");
228+
await Assert.That(html).DoesNotContain("background-image:");
229+
}
172230
}

‎MarkupString/ColorGradient.cs‎

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,27 @@ public sealed record ColorGradient(ImmutableArray<IColorMarkup> Stops, GradientS
101101
/// <summary>How many times the colours run over the length, one after the other.</summary>
102102
public int Repeat { get; init; } = 1;
103103

104+
/// <summary>
105+
/// The theme colour each stop stands for, by position, or null for a stop that is only its colour; empty
106+
/// when none does. A stop that names one is drawn in the reader's colour for it where a layout is drawn
107+
/// for a reader (<see cref="Layout.LayoutContext.Tones"/>), and a page writes it as the CSS variable
108+
/// <c>--ms-tone-&lt;role&gt;</c>, with its own colour as the fallback.
109+
/// </summary>
110+
public ImmutableArray<ThemeRole?> Roles { get; init; } = [];
111+
112+
/// <summary>
113+
/// The gradient with each stop that names a theme colour (<see cref="Roles"/>) in the colour
114+
/// <paramref name="tones"/> gives it; a stop it gives no colour keeps its own.
115+
/// </summary>
116+
public ColorGradient Toned(Func<ThemeRole, IColorMarkup?> tones)
117+
{
118+
ArgumentNullException.ThrowIfNull(tones);
119+
if (Roles.IsDefaultOrEmpty || Stops.IsDefaultOrEmpty) return this;
120+
var stops = Stops.Select((stop, i) =>
121+
i < Roles.Length && Roles[i] is { } role && tones(role) is { Foreground: not null } toned ? toned : stop);
122+
return this with { Stops = [.. stops] };
123+
}
124+
104125
private int Cycles => Math.Clamp(Repeat, 1, 1000);
105126

106127
/// <summary>Where along the stops <paramref name="position"/> falls, once repeated and mirrored.</summary>
@@ -223,19 +244,19 @@ internal MarkupText[] ShadeLines(IReadOnlyList<MarkupText> lines, GradientFlow f
223244
/// <summary>The gradient as a CSS <c>linear-gradient</c> running <paramref name="direction"/>, <c>to bottom</c> say, in its own space.</summary>
224245
public string ToCss(string direction)
225246
{
226-
var colors = Colors;
247+
var colors = CssColors;
227248
if (colors.Length == 0) return string.Empty;
228249
if (colors.Length == 1) colors = [colors[0], colors[0]];
229250
var space = Space.ToString().ToLowerInvariant();
230251
if (!Mirror && Cycles == 1)
231-
return $"linear-gradient({direction} in {space}, {string.Join(", ", colors.Select(color => color.ToHex()))})";
252+
return $"linear-gradient({direction} in {space}, {string.Join(", ", colors)})";
232253

233254
// Each run of the colours over its own stretch; a mirrored run goes there and back.
234255
var run = Mirror ? [.. colors, .. colors.Reverse().Skip(1)] : colors;
235256
var stops = new List<string>();
236257
for (var cycle = 0; cycle < Cycles; cycle++)
237258
for (var i = 0; i < run.Length; i++)
238-
stops.Add($"{run[i].ToHex()} {Percent((cycle + i / (double)(run.Length - 1)) / Cycles)}");
259+
stops.Add($"{run[i]} {Percent((cycle + i / (double)(run.Length - 1)) / Cycles)}");
239260
return $"linear-gradient({direction} in {space}, {string.Join(", ", stops)})";
240261
}
241262

@@ -255,13 +276,25 @@ public string ToCss(int samples, string direction)
255276
return $"linear-gradient({direction}, {list})";
256277
}
257278

279+
/// <summary>The stops' colours for a page: a stop that names a theme colour as its CSS variable, its own colour the fallback.</summary>
280+
private string[] CssColors => [.. (Stops.IsDefault ? [] : Stops)
281+
.Select((stop, i) => (stop.Foreground, Role: !Roles.IsDefault && i < Roles.Length ? Roles[i] : null))
282+
.Where(stop => stop.Foreground is not null)
283+
.Select(stop => stop.Role is { } role
284+
? $"var(--ms-tone-{ThemePalette.RoleName(role)}, {stop.Foreground!.Value.ToHex()})"
285+
: stop.Foreground!.Value.ToHex())];
286+
287+
/// <summary>Whether any stop names a theme colour (<see cref="Roles"/>).</summary>
288+
public bool HasRoles => !Roles.IsDefault && Roles.Any(role => role is not null);
289+
258290
private static string Percent(double fraction) =>
259291
(Math.Round(fraction * 100, 2)).ToString("0.##", CultureInfo.InvariantCulture) + "%";
260292

261293
/// <inheritdoc/>
262294
public bool Equals(ColorGradient? other) =>
263295
other is not null && Space == other.Space && Mirror == other.Mirror && Cycles == other.Cycles
264-
&& (Stops.IsDefault ? [] : Stops).SequenceEqual(other.Stops.IsDefault ? [] : other.Stops);
296+
&& (Stops.IsDefault ? [] : Stops).SequenceEqual(other.Stops.IsDefault ? [] : other.Stops)
297+
&& (Roles.IsDefault ? [] : Roles).SequenceEqual(other.Roles.IsDefault ? [] : other.Roles);
265298

266299
/// <inheritdoc/>
267300
public override int GetHashCode()
@@ -271,6 +304,7 @@ public override int GetHashCode()
271304
hash.Add(Mirror);
272305
hash.Add(Cycles);
273306
foreach (var stop in Stops.IsDefault ? [] : Stops) hash.Add(stop);
307+
foreach (var role in Roles.IsDefault ? [] : Roles) hash.Add(role);
274308
return hash.ToHashCode();
275309
}
276310

‎MarkupString/Layout/Blocks/Block.cs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,16 @@ public sealed record LayoutContext
107107

108108
private bool ShadesLines => Shading is GradientTarget.All or GradientTarget.Borders;
109109

110+
/// <summary>
111+
/// For a reader with a theme of their own, the colour it gives each theme colour, or null where it gives
112+
/// none; null for a reader without one. A gradient stop that names a theme colour
113+
/// (<see cref="ColorGradient.Roles"/>) is drawn in it.
114+
/// </summary>
115+
public Func<ThemeRole, IColorMarkup?>? Tones { get; init; }
116+
117+
/// <summary><paramref name="gradient"/> in this reader's theme colours (<see cref="Tones"/>).</summary>
118+
internal ColorGradient Toned(ColorGradient gradient) => Tones is { } tones ? gradient.Toned(tones) : gradient;
119+
110120
/// <summary>Where text with no alignment of its own sits: a table column's, or one set with <see cref="BlockExtensions.Aligned"/>.</summary>
111121
public Alignment TextAlignment { get; init; } = Alignment.Left;
112122

‎MarkupString/Layout/Blocks/BlockCodec.cs‎

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,14 @@ public void Gradient(string name, ColorGradient? gradient)
176176
foreach (var stop in gradient.Stops.IsDefault ? [] : gradient.Stops)
177177
MarkupTextSerializer.Write(_json, MarkupText.Wrap(stop, "#"), _registry);
178178
_json.WriteEndArray();
179+
if (gradient.HasRoles)
180+
{
181+
_json.WriteStartArray("ro");
182+
foreach (var role in gradient.Roles)
183+
if (role is { } named) _json.WriteStringValue(ThemePalette.RoleName(named));
184+
else _json.WriteNullValue();
185+
_json.WriteEndArray();
186+
}
179187
_json.WriteEndObject();
180188
}
181189

@@ -313,6 +321,13 @@ public ImmutableArray<MarkupText> Texts(string name) =>
313321
? [.. list.EnumerateArray().Where(item => item.ValueKind == JsonValueKind.Object).Select(item => MarkupTextSerializer.Read(item, _state.Registry))]
314322
: [];
315323

324+
/// <summary>The theme colour each of a gradient's stops names, null for one that names none; empty when there are none.</summary>
325+
internal ImmutableArray<ThemeRole?> Roles(string name) =>
326+
TryGet(name, JsonValueKind.Array, out var list)
327+
? [.. list.EnumerateArray().Select(item =>
328+
item.ValueKind == JsonValueKind.String && ThemePalette.TryParseRole(item.GetString()!, out var role) ? role : (ThemeRole?)null)]
329+
: [];
330+
316331
/// <summary>A child block.</summary>
317332
public Block? Block(string name) =>
318333
_element.ValueKind == JsonValueKind.Object && _element.TryGetProperty(name, out var value) ? Inner(value).Object() : null;
@@ -364,13 +379,18 @@ public TEnum Enum<TEnum>(string name, TEnum fallback = default) where TEnum : st
364379
{
365380
if (!TryGet(name, JsonValueKind.Object, out var value)) return null;
366381
var inner = Inner(value);
367-
var stops = inner.Texts("st")
368-
.SelectMany(text => text.Runs.SelectMany(run => run.Markups).OfType<IColorMarkup>().Take(1))
369-
.ToImmutableArray();
370-
return new ColorGradient(stops, inner.Enum("sp", GradientSpace.Oklch))
382+
var roles = inner.Roles("ro");
383+
// A stop this reader has no codec for is left out, and the theme colour it named with it, so the rest keep theirs.
384+
var read = inner.Texts("st")
385+
.Select((text, i) => (Stop: text.Runs.SelectMany(run => run.Markups).OfType<IColorMarkup>().FirstOrDefault(),
386+
Role: i < roles.Length ? roles[i] : null))
387+
.Where(stop => stop.Stop is not null)
388+
.ToArray();
389+
return new ColorGradient([.. read.Select(stop => stop.Stop!)], inner.Enum("sp", GradientSpace.Oklch))
371390
{
372391
Mirror = inner.Bool("mi"),
373392
Repeat = inner.Int("re", 1, 1, 1000),
393+
Roles = roles.IsEmpty ? [] : [.. read.Select(stop => stop.Role)],
374394
};
375395
}
376396

‎MarkupString/Layout/Blocks/Gauge.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public override void Draw(LayoutContext context, int width, IList<MarkupText> li
6565
var bar = BarWidth > 0 ? Math.Min(BarWidth, Math.Max(1, room)) : Math.Max(1, room);
6666
var full = (int)Math.Round(bar * Ratio);
6767
var fill = BlockText.Run(filled, full);
68-
if (Gradient is { IsEmpty: false } gradient)
68+
if (Gradient is { } given && context.Toned(given) is { IsEmpty: false } gradient)
6969
fill = Shade == GaugeShade.Value ? gradient.Paint(fill, Ratio) : gradient.ShadeLines([fill], GradientFlow.Across, bar)[0];
7070
else fill = context.Paint(t => t.GaugeFilledColor, fill);
7171
var rest = context.Paint(t => t.GaugeEmptyColor, BlockText.Run(empty, bar - full));

‎MarkupString/Layout/Blocks/Modifiers.cs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public override Block MapText(Func<MarkupText, MarkupText> map) =>
3838
/// <inheritdoc/>
3939
public override void Draw(LayoutContext context, int width, IList<MarkupText> lines)
4040
{
41-
if (Gradient.IsEmpty)
41+
var gradient = context.Toned(Gradient);
42+
if (gradient.IsEmpty)
4243
{
4344
context.Draw(Content, width, lines);
4445
return;
@@ -49,11 +50,11 @@ public override void Draw(LayoutContext context, int width, IList<MarkupText> li
4950
var used = drawn.Count == 0 ? width : Math.Max(1, drawn.Max(line => line.Trim(TrimType.TrimEnd).DisplayWidth));
5051
if (Target == GradientTarget.All)
5152
{
52-
lines.AddRange(Gradient.ShadeLines(drawn, Flow, used));
53+
lines.AddRange(gradient.ShadeLines(drawn, Flow, used));
5354
return;
5455
}
5556
var borders = Target == GradientTarget.Borders;
56-
foreach (var line in Gradient.ShadeLines(drawn, Flow, used, character => LinePiece.Marks(character) == borders))
57+
foreach (var line in gradient.ShadeLines(drawn, Flow, used, character => LinePiece.Marks(character) == borders))
5758
lines.Add(LinePiece.Unmark(line));
5859
}
5960
}

‎MarkupString/PublicAPI.Unshipped.txt‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ override MarkupString.StandInMarkup.ToString() -> string!
2323
static MarkupString.StandInMarkup.operator !=(MarkupString.StandInMarkup? left, MarkupString.StandInMarkup? right) -> bool
2424
static MarkupString.StandInMarkup.operator ==(MarkupString.StandInMarkup? left, MarkupString.StandInMarkup? right) -> bool
2525
static MarkupString.MarkupText.StandIn(MarkupString.MarkupText! content, string! text) -> MarkupString.MarkupText!
26+
MarkupString.ColorGradient.HasRoles.get -> bool
27+
MarkupString.ColorGradient.Roles.get -> System.Collections.Immutable.ImmutableArray<MarkupString.ThemeRole?>
28+
MarkupString.ColorGradient.Roles.init -> void
29+
MarkupString.ColorGradient.Toned(System.Func<MarkupString.ThemeRole, MarkupString.IColorMarkup?>! tones) -> MarkupString.ColorGradient!
30+
MarkupString.Layout.LayoutContext.Tones.get -> System.Func<MarkupString.ThemeRole, MarkupString.IColorMarkup?>?
31+
MarkupString.Layout.LayoutContext.Tones.init -> void

0 commit comments

Comments
 (0)