I'm unable to stretch a <lightning-button>
to occupy the full width of its container. While applying a style of display: block
or a class of slds-size_12-of-12
, for example, those styles/classes are applied to the <lightning-button>
tag... however... when rendered, the tag appears to wrap an inner <button>
tag, and the styles are not transferred to that tag, and it's that inner tag that appears to have all the content.
EDIT: The above completely rewritten for clarity
<lightning-layout>
<lightning-layout-item flexibility="grow">
<lightning-button
label="click me"
onclick={action}
class="slds-size_12-of-12">
</lightning-button>
</lightning-layout-item>
<lightning-layout-item flexibility="no-flex">
...