feat: add tag support for card shortcode (#427)

* styles: accept tags on cards with default and custom colors

* styles: compile css
This commit is contained in:
Julia March
2024-08-11 18:30:19 +02:00
committed by GitHub
parent 9c0ba06db4
commit f439e6bb87
7 changed files with 78 additions and 7 deletions

View File

@ -1214,6 +1214,9 @@ video {
.hx-text-xs {
font-size: .75rem;
}
.hx-text-xxs {
font-size: .65rem;
}
.hx-font-bold {
font-weight: 700;
}
@ -2258,6 +2261,9 @@ article details > summary::before {
.hextra-cards {
grid-template-columns: repeat(auto-fill, minmax(max(250px, calc((100% - 1rem * 2) / var(--hextra-cards-grid-cols))), 1fr));
}
.hextra-card {
position: relative;
}
.hextra-card img {
-webkit-user-select: none;
-moz-user-select: none;
@ -2273,6 +2279,7 @@ article details > summary::before {
}
.hextra-card p {
margin-top: 0.5rem;
position: relative;
}
.dark .hextra-card svg {
color: #ffffff66;
@ -2280,6 +2287,13 @@ article details > summary::before {
.dark .hextra-card:hover svg {
color: currentColor;
}
/* If tag, position upright on the card */
.hx-tag {
position: absolute;
top: 5px;
right: 5px;
z-index: 10;
}
.steps h3 {
counter-increment: step;
}

View File

@ -2,6 +2,10 @@
grid-template-columns: repeat(auto-fill, minmax(max(250px, calc((100% - 1rem * 2) / var(--hextra-cards-grid-cols))), 1fr));
}
.hextra-card {
position: relative;
}
.hextra-card img {
user-select: none;
}
@ -18,6 +22,7 @@
.hextra-card p {
margin-top: 0.5rem;
position: relative;
}
.dark .hextra-card svg {
@ -27,3 +32,11 @@
.dark .hextra-card:hover svg {
color: currentColor;
}
/* If tag, position upright on the card */
.hx-tag {
position: absolute;
top: 5px;
right: 5px;
z-index: 10;
}