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

Change font size in pop up lists for components Select and Autocomplete #1112

Open
ustas4 opened this issue Nov 22, 2024 · 2 comments
Open

Comments

@ustas4
Copy link

ustas4 commented Nov 22, 2024

**Describe: **
Using style=me.Style(font-size=...) in components Select and Autocomplete does not affect the font height of pop-up list

**Solution: **
The style should be passed to the inner component

@richard-to
Copy link
Collaborator

Yes, this is one drawback of the current system of using the style property for the whole component. We probably need a better solution for the future.

But currently, I would suggest adding your own stylesheet and overriding the styles that way. I think it will be more effective.

We recently added a way to host static assets, you can add your own stylesheet: https://google.github.io/mesop/guides/static-assets/

If you need more targeted css, you can use something like:

with me.box(classes="your-classes"):
  me.select(...)

Then in your style stylesheet you can use a more targeted styling on that select component.

Mainly, you'll just need to use dev tools and play and around with which selectors to override.

@wwwillchen
Copy link
Collaborator

You can also look into overriding the CSS variable values that are set by Angular Material, for example: --mat-select-trigger-text-size (you would still add your own stylesheet).

I'd look at Angular Material docs for more info: https://material.angular.io/guide/theming

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

3 participants