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

Provide unit option for range and numeric control types #50

Open
JamesIves opened this issue Apr 25, 2024 · 0 comments
Open

Provide unit option for range and numeric control types #50

JamesIves opened this issue Apr 25, 2024 · 0 comments

Comments

@JamesIves
Copy link

JamesIves commented Apr 25, 2024

When using the range or number control, it applies a numeric value directly as the CSS variable, however in most cases this isn't going to be applicable in most CSS variables.

'section-spacing-sm': {
   control: 'range',
 },

Using the range sets: --section-spacing-sm: 5;. It would be fantastic if a unit value could be provided, for example:

'section-spacing-sm': {
   control: 'range',
   unit: 'px'
 },

This way when the CSS variable is set, it appropriately appends the unit type: --section-spacing-sm: 5px;

@JamesIves JamesIves changed the title Provide unit for range slider Provide unit for range and numeric control types Apr 25, 2024
@JamesIves JamesIves changed the title Provide unit for range and numeric control types Provide unit option for range and numeric control types Apr 25, 2024
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

1 participant