Skip to content

Commit ccaed51

Browse files
committed
feat: kbd styles
1 parent 743caea commit ccaed51

File tree

3 files changed

+30
-7
lines changed

3 files changed

+30
-7
lines changed

.changeset/giant-items-trade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"r.obin.ch": patch
3+
---
4+
5+
Add <kbd> styles

src/layouts/DefaultLayout.css

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,6 @@ pre {
189189
border-radius: var(--border-radius);
190190
}
191191

192-
code {
193-
background-color: var(--white-color-140);
194-
border-radius: var(--border-radius);
195-
padding: 0.15rem;
196-
}
197-
198192
footer {
199193
display: flex;
200194
justify-content: space-between;
@@ -248,6 +242,30 @@ h6 {
248242
font-size: 1.1rem;
249243
}
250244

245+
code, kbd {
246+
background-color: var(--white-color-140);
247+
border-radius: var(--border-radius);
248+
padding: 0.15rem;
249+
}
250+
251+
kbd {
252+
border: 1px solid var(--primary-color);
253+
box-shadow: 0 2px 0 1px var(--primary-color);
254+
cursor: default;
255+
font-size: 0.75em;
256+
line-height: 1;
257+
min-width: 0.75rem;
258+
text-align: center;
259+
padding: 2px 5px;
260+
position: relative;
261+
top: -1px;
262+
}
263+
264+
kbd:hover {
265+
box-shadow: 0 1px 0 0.5px var(--kbd-color-border);
266+
top: 1px;
267+
}
268+
251269
.label {
252270
font-family: var(--font-headings);
253271
font-size: 1.3rem;

src/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,6 @@ h6,
120120
font-family: var(--font-headings);
121121
}
122122

123-
code {
123+
code, kbd {
124124
font-family: var(--font-listings);
125125
}

0 commit comments

Comments
 (0)