Skip to content

Commit e25a471

Browse files
committed
Better and better
1 parent 0d34b3a commit e25a471

22 files changed

+762
-210
lines changed

lib/resources/styles.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,21 @@ h1 .category {
591591
vertical-align: middle;
592592
}
593593

594+
/* Do not display "provided by X extension" text on extension pages. */
595+
.main-content.extension-page .from-extension {
596+
display: none;
597+
}
598+
599+
.muted {
600+
color: var(--main-sidebar-color);
601+
}
602+
603+
.from-extension > span {
604+
background-color: var(--alert-warning);
605+
font-style: italic;
606+
padding: 2px;
607+
}
608+
594609
/* The badge under a declaration for things like "const", "read-only", etc. and for the badges inline like sealed or interface */
595610
/* See https://github.com/dart-lang/dartdoc/blob/main/lib/src/model/feature.dart */
596611
.feature {

lib/src/element_type.dart

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@ abstract class ElementType with CommentReferable, Nameable {
4848

4949
String get linkedName;
5050

51-
/// Name with generics and nullability indication.
51+
/// Name with generics and nullability indication, in HTML tags.
5252
String get nameWithGenerics;
5353

54+
/// Name with generics and nullability indication, in plain text, with
55+
/// unescaped angle brackets.
56+
String get nameWithGenericsPlain;
57+
5458
@override
5559
String get displayName => throw UnimplementedError();
5660

@@ -103,11 +107,14 @@ class UndefinedElementType extends ElementType {
103107
return type.documentableElement!.name!;
104108
}
105109

110+
@override
111+
String get linkedName => name;
112+
106113
@override
107114
String get nameWithGenerics => '$name$nullabilitySuffix';
108115

109116
@override
110-
String get linkedName => name;
117+
String get nameWithGenericsPlain => '$name$nullabilitySuffix';
111118

112119
@override
113120
Iterable<ElementType> get typeArguments => const [];
@@ -241,6 +248,9 @@ class TypeParameterElementType extends DefinedElementType {
241248

242249
@override
243250
String get nameWithGenerics => '$name$nullabilitySuffix';
251+
252+
@override
253+
String get nameWithGenericsPlain => '$name$nullabilitySuffix';
244254
}
245255

246256
/// An [ElementType] associated with an [Element].
@@ -341,6 +351,10 @@ mixin Rendered implements ElementType {
341351
@override
342352
late final String nameWithGenerics = _renderer.renderNameWithGenerics(this);
343353

354+
@override
355+
late final String nameWithGenericsPlain =
356+
_renderer.renderNameWithGenerics(this, plain: true);
357+
344358
ElementTypeRenderer<ElementType> get _renderer;
345359
}
346360

0 commit comments

Comments
 (0)