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

Use parts to allow customizing styles #192

Open
maloua opened this issue Mar 26, 2024 · 3 comments
Open

Use parts to allow customizing styles #192

maloua opened this issue Mar 26, 2024 · 3 comments
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@maloua
Copy link

maloua commented Mar 26, 2024

I would like to be able to control the styling of web components better, so that they are more in line with the rest of the design when necessary. For example: I'm using the gmpx-place-picker in a bigger form, and there's currently no way to change the input border.

A solution would be to use the part selector to target inner element when necessary.

An alternative would be to use more variables and less hardcoded values in the css and overwrite them. But I'm afraid that will either not be sufficiently detailed enough or bloat the code too much.

image

@maloua maloua added triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Mar 26, 2024
@wangela
Copy link
Member

wangela commented Mar 26, 2024

If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 so we can see what is popular when we triage.

@maloua Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

@awmack awmack removed the triage me I really want to be triaged. label Mar 26, 2024
@awmack
Copy link
Collaborator

awmack commented Mar 26, 2024

Hey! Thanks for raising this. As you mention, we could make more aspects of the styling customizable with CSS variables, but this could end up reinventing the wheel. Exposing CSS ::part() could be a good approach for targeted elements like the input which are unlikely to change as part of the internal implementation.

@harisvsulaiman
Copy link

@awmack as @maloua Mentioned there is currently no way to style the border, the easiest solution would be to expose CSS variables until a more robust styling API is in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants