Skip to content

Links preview: add CSS variables to customize its look and feel #490

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

Open
humitos opened this issue Jan 13, 2025 · 3 comments
Open

Links preview: add CSS variables to customize its look and feel #490

humitos opened this issue Jan 13, 2025 · 3 comments
Assignees

Comments

@humitos
Copy link
Member

humitos commented Jan 13, 2025

We've received a support request from a user wanting to change the background color of the links preview because their text is white, so it's not possible to read it when displayed on the popup.

This work is related to:

This issue could be a good opportunity to try the pattern we are building here.

Front logo Front conversations

@s-makin
Copy link

s-makin commented Mar 18, 2025

This would be a very welcome feature. I've recently come to learn about the link preview function, and while this is a great replacement for the hoverxref extension, the default styling provided could be better (especially from an accessibility pov re: the contrast and font size) and we are lacking an easy customisation path. If there is already a preferred way for us to customise the feature, it would be really helpful if that could be added to the documentation.

The things we are looking to customise are:

  • Font sizes (we want it to be the same scale as body text, not scaled down)
  • Font colours (we need higher contrast between text and bg)
  • Being able to specify dark mode settings (e.g. bg colour, user choice of dark mode is not respected in the default)

@AstroDule
Copy link

Is there any news about this idea?

@humitos
Copy link
Member Author

humitos commented Apr 28, 2025

@AstroDule We are working on standardizing the pattern at #545. Once that's done, we will work on this issue.

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

No branches or pull requests

4 participants