Skip to content

Commit c62d32b

Browse files
committed
RenderedHtml: Remove outer margins from rendered text
This makes it easier to properly align the component with other elements on the page
1 parent fc94a66 commit c62d32b

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

app/components/rendered-html.module.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
line-height: 1.5;
33
overflow-wrap: break-word;
44

5+
> :first-child {
6+
margin-top: 0;
7+
}
8+
9+
> :last-child {
10+
margin-bottom: 0;
11+
}
12+
513
img {
614
max-width: 100%;
715
}

app/styles/crate/version.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ div.header {
194194
margin-bottom: 40px;
195195
}
196196

197+
.readme {
198+
margin-top: 20px;
199+
margin-bottom: 20px;
200+
}
201+
197202
.crate-downloads {
198203
display: flex;
199204
flex-wrap: wrap;

app/templates/crate/version.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
</div>
6868
{{#if this.readme}}
6969
<section aria-label="Readme">
70-
<RenderedHtml @html={{this.readme}} />
70+
<RenderedHtml @html={{this.readme}} local-class="readme" />
7171
</section>
7272
{{else}}
7373
{{#if this.crate.description}}

0 commit comments

Comments
 (0)