Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Ability to use images in customer containers' custom title #4214

Open
4 tasks done
thdoan opened this issue Sep 18, 2024 · 1 comment
Open
4 tasks done

Comments

@thdoan
Copy link

thdoan commented Sep 18, 2024

Is your feature request related to a problem? Please describe.

Sometimes emojis don't cut it, so it would be awesome to have the ability to use images in customer containers' custom title.

Describe the solution you'd like

::: tip ![custom tip icon](/tip.svg) TIP
This is a tip.
:::

Describe alternatives you've considered

No response

Additional context

No response

Validations

@rvanhorn
Copy link

rvanhorn commented Oct 5, 2024

This is something I'd also like to see added.

In the meantime ,you can manually add an icon via CSS.

.tip > .custom-block-title::before {
    content: '';
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    background-color: var(--vp-c-text-1);
    -webkit-mask-image: url('/images/info.svg');
    mask-image: url('/images/info.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    margin-right: 0.5rem;
    vertical-align: middle;
}

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants