Skip to content

Commit b64b5b3

Browse files
committed
docs: avoid layout shift due to badges
1 parent 1134a63 commit b64b5b3

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

crates/ferrosaur/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# ferrosaur
22

3+
<div class="badges">
4+
35
[![crates.io](https://img.shields.io/crates/v/ferrosaur?style=flat-square)](https://crates.io/crates/ferrosaur)
46
[![documentation](https://img.shields.io/github/actions/workflow/status/tonywu6/ferrosaur/docs.yml?event=release&style=flat-square&label=docs)](https://tonywu6.github.io/ferrosaur/)
57
[![MIT/Apache-2.0 licensed](https://img.shields.io/crates/l/ferrosaur?style=flat-square)](https://github.com/tonywu6/ferrosaur/tree/main/LICENSE-APACHE.md)
68

9+
</div>
10+
711
_ferrosaur_ derives statically-typed Rust code — à la [wasm-bindgen] — for
812
[`deno_core::JsRuntime`] to interface with your JavaScript code.
913

docs/app/main.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ body {
7171
}
7272
}
7373

74+
&:has(img) {
75+
display: inline-block;
76+
text-decoration: none;
77+
}
78+
7479
&:has(del:only-child) {
7580
text-decoration: none;
7681
}
@@ -317,6 +322,18 @@ body {
317322
white-space: nowrap;
318323
}
319324

325+
.badges {
326+
overflow: auto hidden;
327+
328+
> p {
329+
display: flex;
330+
gap: 6px;
331+
align-items: center;
332+
line-height: 1;
333+
white-space: nowrap;
334+
}
335+
}
336+
320337
figure.fig-text {
321338
display: block;
322339
padding: 0.6rem;
@@ -368,6 +385,15 @@ figure.fig-text {
368385
padding-inline: var(--blockquote-padding-inline);
369386
}
370387

388+
> .badges {
389+
padding-inline: 0;
390+
391+
> p {
392+
width: max-content;
393+
margin-inline: var(--blockquote-padding-inline);
394+
}
395+
}
396+
371397
> ul,
372398
> ol {
373399
padding-inline-start: 40px;

0 commit comments

Comments
 (0)