From 3530d893a357bfcdae5d016c00f208b261910ec7 Mon Sep 17 00:00:00 2001 From: Philip Jackson Date: Wed, 23 Jan 2019 01:07:56 +1300 Subject: [PATCH 1/2] Align crate icon with crate name in heading The crate heading text (with name and version) are being aligned by baseline using flex, however the icon doesn't line up because it doesn't have baseline information. Manually pushing the icon down so aligns "correctly" with the crate name. --- app/styles/crate.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/styles/crate.scss b/app/styles/crate.scss index 89304908f3..d8c3505a18 100644 --- a/app/styles/crate.scss +++ b/app/styles/crate.scss @@ -26,6 +26,12 @@ @include flex-direction(column); } } + .crate-icon { + // Icon doesn't align nicely with text (which is being + // aligned by their baselines) so manual adjustment needed. + position: relative; + top: 4px; + } h1 { padding-left: 10px; padding-right: 10px; From 073c5ac590db352d864e10b104b0d5e150e8d3c4 Mon Sep 17 00:00:00 2001 From: Philip Jackson Date: Wed, 23 Jan 2019 22:20:05 +1300 Subject: [PATCH 2/2] Add class to align crate icon with crate name in heading --- app/templates/crate/version.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/crate/version.hbs b/app/templates/crate/version.hbs index 6b6d5e7c41..410a80bdeb 100644 --- a/app/templates/crate/version.hbs +++ b/app/templates/crate/version.hbs @@ -3,7 +3,7 @@
- {{svg-jar "crate"}} + {{svg-jar "crate" class='crate-icon'}}

{{ crate.name }}

{{ currentVersion.num }}