I'm submitting a:
Current behavior:
mwc-button needs width set to width: 100% to occupy the entire space
Expected behavior:
mwc-textfield has a fullwidth property to handle this behavior, does it make sense to add something like this to mwc-button?
Comparison mwc-button vs mwc-textfield:
<style>
mwc-button {
width: 100%;
}
</style>
<mwc-textfield fullwidth label="Standard"></mwc-textfield>
<mwc-button label="Sign up via Email"></mwc-button>
Is this fullwidth property something you'd need in a dialog or form?
Certainly very common in dialogs/forms, yes.
Another use case might be e. g. on a login form or any form that requires full-width expansion (basically any form on mobile).
So I guess the question is rather if it makes sense to do it via property or CSS. I think fullwidth property is the quick fix that works for most cases but sometimes a developer might want to do responsive custom CSS styles instead.
Tbh I would have just done width: 100% but since I knew textfield already had it, I expected the button component to have it as well.
Most helpful comment
Certainly very common in dialogs/forms, yes.
Another use case might be e. g. on a login form or any form that requires full-width expansion (basically any form on mobile).
So I guess the question is rather if it makes sense to do it via property or CSS. I think fullwidth property is the quick fix that works for most cases but sometimes a developer might want to do responsive custom CSS styles instead.
Tbh I would have just done width: 100% but since I knew textfield already had it, I expected the button component to have it as well.