diff --git a/docs/src/styles/_api.scss b/docs/src/styles/_api.scss
index a6a4cebbaa6a..edac76cc0f79 100644
--- a/docs/src/styles/_api.scss
+++ b/docs/src/styles/_api.scss
@@ -98,6 +98,7 @@
.docs-api-method-parameters-header-cell,
.docs-api-method-returns-header-cell {
font-size: 14px;
+ padding-bottom: 0;
}
.docs-api-input-marker,
diff --git a/docs/src/styles/_tables.scss b/docs/src/styles/_tables.scss
index c9084474be8b..aee301ef45e1 100644
--- a/docs/src/styles/_tables.scss
+++ b/docs/src/styles/_tables.scss
@@ -52,6 +52,38 @@
height: 56px;
}
+ .docs-api-method-card,
+ .docs-api-properties-card {
+ background-color: var(--mat-sys-surface-container-lowest);
+ border: solid 1px var(--mat-sys-outline-variant);
+ border-radius: 12px;
+ margin: 0 0 32px;
+ }
+
+ .docs-api-method-table,
+ .docs-api-properties-table {
+ margin: 0 !important;
+ }
+
+ .docs-api-method-table tr {
+ border-bottom: 0;
+
+ th.docs-api-method-name-cell .docs-api-method-parameter-name {
+ color: var(--mat-sys-on-surface);
+ }
+ }
+
+ .docs-api-properties-table {
+ .docs-api-properties-row:last-of-type {
+ border-bottom: 0;
+ }
+
+ .docs-api-property-type {
+ color: var(--mat-sys-primary);
+ }
+ }
+
+
@media (max-width: constants.$small-breakpoint-width) {
.docs-api table,
.docs-markdown > table {
diff --git a/tools/dgeni/templates/method.template.html b/tools/dgeni/templates/method.template.html
index 392f544861b5..771953ef73ca 100644
--- a/tools/dgeni/templates/method.template.html
+++ b/tools/dgeni/templates/method.template.html
@@ -1,77 +1,85 @@
{% import "macros.html" as macros %}
-
-
-
-
- {%- if method.isDeprecated -%}
-
- Deprecated
+
+
+
+
+ |
+ {%- if method.isDeprecated -%}
+
+ Deprecated
+
+ {%- endif -%}
+ {%- if method.isStatic -%}
+
+ static
- {%- endif -%}
- {%- if method.isStatic -%}
-
- static
-
- {%- endif -%}
- {%- if method.isAsync -%}
-
- async
-
- {%- endif -%}
- {$ method.name $}
- |
+ {%- endif -%}
+ {%- if method.isAsync -%}
+
+ async
+
+ {%- endif -%}
+ {$ method.name $}
+ ({%- for param in method.params -%}
+ {$ param.name $}{% if param.isOptional %}?{% endif %}:
+
+ {$ param.type $}{% if not loop.last %}, {% endif %}
+ {%- endfor -%}
+ ): {$ method.type $}
+
+
+
+ {%- if method.description -%}
+
+ |
+ {$ method.description | marked | safe $}
+ |
-
- {%- if method.description -%}
-
- |
- {$ method.description | marked | safe $}
- |
-
- {%- endif -%}
+ {%- endif -%}
- {%- if method.params.length -%}
-
-
+ |
+
+ {$ parameter.name $}
+ {%- if parameter.isOptional -%}
+ ?
+ {%- endif -%}
+
+ {$ parameter.type $}
+ |
+
+
+ {$ parameter.description | marked | safe $}
+
+ |
-
- {% for parameter in method.params %}
-
- |
-
- {$ parameter.name $}
- {%- if parameter.isOptional -%}
- ?
- {%- endif -%}
-
- {$ parameter.type $}
- |
-
-
- {$ parameter.description | marked | safe $}
-
- |
-
- {% endfor %}
- {%- endif -%}
+ {% endfor %}
+ {%- endif -%}
- {%- if method.type and method.type !== "void" -%}
-
-
+
+ {$ method.type $}
+ |
+
+
+ {$ method.returns.description | marked | safe $}
+
+ |
-
-
-
- {$ method.type $}
- |
-
-
- {$ method.returns.description | marked | safe $}
-
- |
-
- {%- endif -%}
-
+ {%- endif -%}
+ |
+
diff --git a/tools/dgeni/templates/property-list.template.html b/tools/dgeni/templates/property-list.template.html
index 0a54b03a629d..874c2cc91c96 100644
--- a/tools/dgeni/templates/property-list.template.html
+++ b/tools/dgeni/templates/property-list.template.html
@@ -1,12 +1,14 @@
{%- if propertyList.length -%}
-
-
- {% for p in propertyList %}
- {$ property(p) $}
- {% endfor %}
-
+
+
+
+ {% for p in propertyList %}
+ {$ property(p) $}
+ {% endfor %}
+
+
{%- endif -%}
diff --git a/tools/dgeni/templates/property.template.html b/tools/dgeni/templates/property.template.html
index c9e94d06a564..155bb6348330 100644
--- a/tools/dgeni/templates/property.template.html
+++ b/tools/dgeni/templates/property.template.html
@@ -27,7 +27,7 @@
{%- endif -%}
- {%- if property.isStatic -%}static {%- endif -%}{$ property.name $}: {$ property.type $}
+ {%- if property.isStatic -%}static {%- endif -%}{$ property.name $}: {$ property.type $}
{$ property.description | marked | safe $} |