Skip to content

Commit fd05e41

Browse files
committed
Merge pull request #285 from bluss/optional
Show which dependencies are optional on the crate page
2 parents 8e60347 + 1337136 commit fd05e41

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

app/styles/app.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ span.small {
146146
}
147147
}
148148

149+
.optional {
150+
font-size: 80%;
151+
}
152+
149153
.yanked {
150154
font-size: 80%;
151155
color: rgb(166, 0, 0)

app/templates/components/link-to-dep.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
{{#link-to 'crate' dep.crate_id}}
33
{{ dep.crate_id }} {{ format-req dep.req }}
44
{{/link-to}}
5+
{{#if dep.optional}}
6+
<span class='optional'>optional</span>
7+
{{/if}}
58
</li>

0 commit comments

Comments
 (0)