-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Shape] Text Field and Select's outline-shape-radius functions don't support separate corner values #4140
Comments
I have WIP for this on fix/outlined-shape-radius (which should probably be split into 2 feature branches to PR, actually). I'm waiting on the outcome of #4171 to continue, though, as it might affect this, and I also realized we probably need to account for ensuring width on the trailing side as well (currently the code in master only accounts for this on the leading side). |
One of our design advocates has pointed out that it's rather disruptive to encounter this when setting values for entire shape categories at once, so in the nearer term, we should probably handle this with a warning and a graceful fallback to applying just one of the radius values. Meanwhile, I've moved my branch to |
Unfortunately, my shorter-term fix in #4547 has now been further set back by #4548, which causes another error due to a value being expanded earlier, resulting in an unexpected nested list. This has, however, caused me to step back and seek to confirm whether assigning multiple radius values to a single shape category is intended/valid. If so, there are probably some things our shape mixins/functions are currently doing (or, more particularly, the order they're being done in) that should be amended. |
I just updated the |
This has been fixed in #6163. Outlined textfield/select components now support setting individual corner radii values. Note that filled variants still only support top-left and top-right corners per spec. |
(This is true in 0.41.x and will still be true after #4035.)
The
mdc-text-field-outline-shape-radius
andmdc-select-outline-shape-radius
mixins perform checks which assume that the given radius is a single value. However, most*-shape-radius
mixins support multiple values to assign different sizes to different corners.If you try to pass multiple radius values to one of these mixins, you'll get an error. For example, passing
8px 4px
:On 0.41.x:
Error: 12px-8px 4px-1.2 is not a number.
On the #4035 branch:
Error: Undefined operation "8px 4px > 12px".
We should investigate whether we can support separate corner values in these mixins, or in the worst case, document that they only support one.
The text was updated successfully, but these errors were encountered: