Skip to content

Commit 567ebbd

Browse files
committed
ux: tweak styles to reduce layout shifts during load
1 parent f106494 commit 567ebbd

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

webzebra/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
</style>
2020
</head>
2121
<body>
22-
<div class="m-1.5 mb-2" style="width: 70px">
23-
<a href="https://github.com/panstromek/zebra-rs" class="text-gray-200 text-xs" style="display: flex; align-items: center;" target="_blank">
22+
<div class="gh-link">
23+
<a href="https://github.com/panstromek/zebra-rs" class="text-gray-200 flex" style="align-items: center;" target="_blank">
2424
<img src="/GitHub-Mark-Light-32px.png" alt="Github Icon" width="16" height="16" class="mr-2">
2525
Source
2626
</a>

webzebra/src/critical.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,28 @@ body {
44
-webkit-font-smoothing: antialiased;
55
-moz-osx-font-smoothing: grayscale;
66
}
7+
#board {
8+
background-color: #3a7f46;
9+
border: 1vw brown solid;
10+
}
11+
12+
.gh-link {
13+
margin: 6px 6px 8px;
14+
width: 70px;
15+
font-size: 12px;
16+
line-height: 16px;
17+
}
18+
19+
.w-full {
20+
width: 100%;
21+
}
22+
.flex {
23+
display: flex
24+
}
25+
.justify-center {
26+
justify-content: center;
27+
}
28+
29+
.max-w-sm {
30+
max-width: 24rem /* 384px */;
31+
}

webzebra/src/index.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ svg text::selection {
1818
background: none;
1919
}
2020

21-
#board {
22-
background-color: #3a7f46;
23-
border: 1vw brown solid;
24-
}
25-
2621
.circle-black, .circle-white {
2722
width: 1em;
2823
height: 1em;

0 commit comments

Comments
 (0)