Skip to content

Commit 630d2b0

Browse files
docs: mark deprecated items in module template (#7027)
1 parent 67c3141 commit 630d2b0

File tree

2 files changed

+78
-73
lines changed

2 files changed

+78
-73
lines changed
Lines changed: 77 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,93 @@
11
.api-section {
2-
position: relative;
3-
4-
pre {
5-
white-space: pre-wrap;
2+
position: relative;
3+
4+
pre {
5+
white-space: pre-wrap;
6+
}
7+
8+
table.api-table {
9+
min-width: 680px;
10+
11+
thead th {
12+
color: white;
13+
font-size: 16px;
14+
background-color: $pink;
15+
border-radius: 4px 4px 0 0;
16+
text-transform: none;
17+
padding: 8px 24px;
618
}
719

8-
table.api-table {
9-
min-width: 680px;
10-
11-
thead th {
12-
color: white;
13-
font-size: 16px;
14-
background-color: $pink;
15-
border-radius: 4px 4px 0 0;
16-
text-transform: none;
17-
padding: 8px 24px;
18-
}
19-
20-
tbody {
21-
pre {
22-
white-space: normal;
23-
margin: 4px;
24-
padding: 4px 16px;
25-
}
26-
27-
td, th {
28-
padding: 0;
29-
}
30-
31-
th {
32-
max-width: 150px;
33-
}
34-
}
35-
20+
tbody {
21+
pre {
22+
white-space: normal;
23+
margin: 4px;
24+
padding: 4px 16px;
25+
}
26+
27+
td,
28+
th {
29+
padding: 0;
30+
}
31+
32+
th {
33+
max-width: 150px;
34+
}
3635
}
36+
}
3737
}
3838

3939
.api-body {
40+
max-width: 1200px;
4041

41-
max-width: 1200px;
42-
43-
table {
44-
45-
th {
46-
text-transform: none;
47-
font-size: 16px;
48-
font-weight: bold;
49-
}
50-
51-
tr {
52-
border-bottom: 1px solid $lightgray;
53-
}
54-
55-
td {
56-
vertical-align: middle;
57-
}
42+
table {
43+
th {
44+
text-transform: none;
45+
font-size: 16px;
46+
font-weight: bold;
47+
}
5848

59-
hr {
60-
margin: 16px 0;
61-
}
49+
tr {
50+
border-bottom: 1px solid $lightgray;
51+
}
6252

63-
tr:last-child {
64-
border-bottom: none;
65-
}
53+
td {
54+
vertical-align: middle;
55+
}
6656

67-
&.item-table {
68-
td {
69-
padding: 32px;
70-
}
71-
}
57+
hr {
58+
margin: 16px 0;
59+
}
7260

73-
&.list-table {
74-
td {
75-
padding: 16px 24px;
76-
}
77-
}
61+
tr:last-child {
62+
border-bottom: none;
7863
}
7964

80-
/* used to target the short description */
81-
> p:nth-child(2) {
82-
border-left: 5px solid $pink;
83-
font-size: 1rem;
84-
line-height: 1.25;
85-
padding-left: .5rem;
65+
&.item-table {
66+
td {
67+
padding: 32px;
68+
}
69+
}
8670

71+
&.list-table {
72+
td {
73+
padding: 16px 24px;
74+
}
75+
}
76+
}
77+
78+
/* used to target the short description */
79+
> p:nth-child(2) {
80+
border-left: 5px solid $pink;
81+
font-size: 1rem;
82+
line-height: 1.25;
83+
padding-left: 0.5rem;
84+
}
85+
86+
.export-list {
87+
a {
88+
&.deprecated {
89+
text-decoration: line-through;
90+
}
8791
}
88-
}
92+
}
93+
}

docs_app/tools/transforms/templates/api/module.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ul>
1010
{% for export in doc.exports -%}
1111
{% if not export.duplicateOf %}
12-
<li><a href="{$ export.path $}">{$ export.name $}</a></li>
12+
<li><a{% if export.deprecated %} class="deprecated"{% endif %} href="{$ export.path $}">{$ export.name $}</a></li>
1313
{% endif %}
1414
{%- endfor %}
1515
</ul>

0 commit comments

Comments
 (0)