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

Allow property values to be arrays to represent multiple declarations of the same property #177

Open
andycoles opened this issue Dec 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@andycoles
Copy link

andycoles commented Dec 19, 2024

Problem Statement

Rainbow Sprinkles currently doesn't accept values as an array when declaring CSS properties.

This could be useful when using the graceful degradation technique for legacy browser fallbacks, similar to what vanilla-extract has outlined here: https://vanilla-extract.style/documentation/styling/#fallback-styles.

Proposed Solution

const { className, style, otherProps } = rainbowSprinkles({ overflow: ['auto', 'overlay'], });

Additional Context

Other instances where it is useful to have this supported:
https://stackoverflow.com/questions/44793453/how-do-i-add-a-top-and-bottom-shadow-while-scrolling-but-only-when-needed. This is where I landed in my investigation and this is the actual particular use case that I am solving for. Please suggest alternatives if any are known as a possible stop gap. Thank you.

@roginfarrer
Copy link
Collaborator

I think this is reasonable! PRs welcome.

@roginfarrer roginfarrer added the enhancement New feature or request label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants