-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
WIP: Support dynamic CSS values in the UI #38096
base: trunk
Are you sure you want to change the base?
Conversation
Size Change: +374 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
This will be completely rewritten to add the (optional) functionality to the existing Before this gets too far into the weeds, though, I'd love to get some design feedback. The button I'm using to toggle between the normal dropdown and the custom text input leaves a lot to be desired -- it takes up a lot of space and I had trouble coming up with a label to toggle off:
We could also use a smaller toggle like this one that's used by the Font Size picker: Or even make a "custom unit" and adding it to the dropdown as @shaunandrews @jasmussen Do you have any ideas about how this should look? Especially in the context of the BoxControl, where the design could easily get very cluttered. |
Description
🚧 Extremely early WIP 🚧
At the moment I'm just using this branch to play around with various approaches for a CustomUnitControl, using the Spacer block to test it out. The purpose is to add support in the UI for complex use cases like the one described here:
Values that accept custom units (like
padding
,margin
, and the Spacer block'sheight
as referenced in that example) can technically support dynamic values, but the UI doesn't provide a way to see or edit those values. (You can manually edit the attribute in the Code editor, for example).ToDo:
100px
custom-unit-control.mov
How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).