1

We have a borderless button menu with a specified button icon set up in a custom lightning component. Since the Winter 20 release the icon is displaying with a border and padding/margins seem to be different.

Styles before and after Winter 20 release

We are using variant="container" and setting a standard utility icon.

The border only appears when specifying a button icon, otherwise the variant attribute behaves as expected:

<lightning:buttonMenu aura:id="menu"  
                      variant="container" 
                      iconName="utility:add" 
                      iconSize="small">
    <lightning:menuItem value="MenuItemOne" label="Menu Item One" />
    <lightning:menuItem value="MenuItemTwo" label="Menu Item Two" />
</lightning:buttonMenu>
<br/><br/>
<lightning:buttonMenu aura:id="menu"
                      variant="container">
    <lightning:menuItem value="MenuItemOne" label="Menu Item One" />
    <lightning:menuItem value="MenuItemTwo" label="Menu Item Two" />
</lightning:buttonMenu>

Sample button menus with and without specified button icon

Has anyone come across this and figured out how to work around it? I don't want to apply compensating styles only for it to change again in the next release!

1
  • Since the Spring 20 release a few days ago the problem has disappeared in our sandbox (without making any changes).Great.
    – sstjohn
    Commented Jan 6, 2020 at 13:26

1 Answer 1

0

in your case issue with variant/ iconSize, container variant takes 32PX by 32 PX button space, i would recommended to go through button variant. in winter 20 release notes also they didn't mention about variant changes. so at this point workaround for this issue. you can change either iconSize to large or variant to bare

enter image description here

Tested CMP

<lightning:layout>
    <lightning:layoutItem  padding="around-small">
        <lightning:buttonMenu aura:id="menu"  
                              variant="bare" 
                              iconName="utility:add" 
                              iconSize="small">
            <lightning:menuItem value="BareItemOne" label="Bare Item One" />
            <lightning:menuItem value="BareItemTwo" label="Bare Item Two" />
        </lightning:buttonMenu>
    </lightning:layoutItem>
    <lightning:layoutItem  padding="around-small">
        <lightning:buttonMenu aura:id="menu1"
                              variant="container"
                              iconName="utility:add"
                              iconSize="large">
            <lightning:menuItem value="ContainerItemOne" label="Container Item One" />
            <lightning:menuItem value="ContainerItemTwo" label="Container Item Two" />
        </lightning:buttonMenu>
    </lightning:layoutItem>
    <lightning:layoutItem  padding="around-small">
        <lightning:buttonMenu aura:id="menu2"
                              variant="container"
                              iconName="utility:add"
                              iconSize="small">
            <lightning:menuItem value="ContainersmallItemOne" label="Container small Item One" />
            <lightning:menuItem value="ContainersmallItemTwo" label="Container small Item Two" />
        </lightning:buttonMenu>
    </lightning:layoutItem>
</lightning:layout>
3
  • Thanks very much for your reply. Unfortunately changing the variant type doesn't remove the border for me (nor does updating/removing the icon size).
    – sstjohn
    Commented Dec 16, 2019 at 13:47
  • may i know, which parent base component you used for lightning:buttonMenu ?
    – sdandamud1
    Commented Dec 16, 2019 at 14:00
  • While testing I just created a new Lightning Application (Lightning Bundle) and previewed the markup. <aura:application extends="force:slds">. In production the menu is in a Lightning Component (aura:component) - an older version, 44, but I have tried updating the version and it doesn't help.
    – sstjohn
    Commented Dec 17, 2019 at 9:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .