Fix the figure styles in Firefox (#17)

This commit is contained in:
Alessandro Jean 2023-09-05 02:54:06 -03:00 committed by GitHub
parent af01a3cdd1
commit 20f818dec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,34 +132,39 @@ html:not(.dark) {
// Shitty method to give elevation to image - TO BE REPLACED // Shitty method to give elevation to image - TO BE REPLACED
main > div > div > figure:has(img) img { main figure {
box-shadow: 2px 2px 8px 4px var(--vp-c-bg-alt) margin: 2rem 0
transition: transform var(--vp-tt)
img {
margin: 0 auto
border-radius: 12px
box-shadow: 2px 2px 8px 4px var(--vp-c-bg-alt)
}
figcaption {
text-align: center
margin-top: 1.25rem
font-size: 0.875rem
color: var(--vp-c-text-2)
}
& > a .external-link-icon {
display: none
}
} }
figure { main :where(h1, h2, h3, h4, h5, h6) + figure {
&:has(img) { margin-top: 1.5rem
position: relative }
display: flex
flex-direction: column
width: auto
text-align: center
transition: transform var(--vp-tt)
img { .custom-block {
overflow: hidden figure figcaption {
margin: 0 auto color: inherit
border-radius: 8px }
}
figcaption { &.tip figure img {
display: inline-block --vp-c-bg-alt: var(--vp-custom-block-tip-bg)
margin: 6px auto
font-size: 0.8rem
}
& > a .external-link-icon {
display: none
}
} }
} }