-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix(calcite-button): Make shadow dom button 100% width #9145
fix(calcite-button): Make shadow dom button 100% width #9145
Conversation
:host([scale="l"][width="full"]) button:not(.content--slotted), | ||
:host([scale="l"][width="full"]) a:not(.content--slotted) { | ||
@apply w-full; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alternative approach
:host(:is([scale="s"], [scale="m"], [scale="l"])[width="full"]) {
a, button {
&:not(.content--slotted) {
inline-size: var(--calcite-container-size-content-fluid);
}
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another alternative approach would be to apply a class here using JS since the CSS logic is getting a little complex here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good! @josercarcamo is this fix captured in a screenshot test? If not can we add one?
…com:Esri/calcite-design-system into josercarcamo/8490-calcite-button-shadow-dom
Related Issue: #8490
Summary
When the host element button is set to "full" the shadow dom button is set to 100% width to span the entire space.