Modify dropdown list styles

You can customize dropdown list style

.example-dropdown-5 {
    .lib-dropdown(
        @_dropdown-list-pointer: false,
        @_dropdown-list-background: #eef1f3,
        @_dropdown-list-item-hover: #d8e3e3,
        @_dropdown-list-border: 2px solid #ced1d4,
        @_dropdown-list-item-padding: 10px,
        @_dropdown-list-item-border: 2px solid #e8eaed,
        @_dropdown-list-shadow: none,
        @_icon-font-line-height: 1
    );
}

Split button

Split button can be formed of two buttons or a link and a button. The first element (link or button) must have class="action split", the toggle element must have class="action toggle".

Split button: button+button

Split button: link+button

.example-dropdown-6 {
    .lib-dropdown-split(
        @_dropdown-split-button-border-radius-fix: true
    );
}

.split.example-dropdown-7 {
    .lib-dropdown-split();
}

Split button variables

    
Mixin variable Global variable Default value Allowed values Comment
@_toggle-selector - ~".action.toggle" selector Split button action toggle selector
@_options-selector - ~"ul.dropdown" selector Split button options selector
@_button-selector - ~".action.split" selector Split button selector
@_dropdown-split-actions-padding @dropdown-split-actions__padding 0 @indent__xs '' | false | value Split button toggle element padding
@_dropdown-split-button-actions-padding @dropdown-split-button__actions__padding false '' | false | value Split button actions padding
@_dropdown-split-toggle-actions-padding @dropdown-split-toggle__actions__padding 4px @indent__xs '' | false | value Split button toggle padding
@_dropdown-split-toggle-position @dropdown-split-toggle__position right '' | false | value Split button toggle element position
Drop-down list
@_dropdown-split-list-min-width @dropdown-split-list__min-width 100% '' | false | value Split button min width
@_dropdown-split-list-width @dropdown-split-list__width 100% '' | false | value Split button width
@_dropdown-split-list-height @dropdown-split-list__height false '' | false | value Split button height
@_dropdown-split-list-margin-top @dropdown-split-list__margin-top 4px '' | false | value Split button margin-top
@_dropdown-split-list-position-top @dropdown-split-list__position-top @dropdown-list__position-top '' | false | value Split button drop-down list position: top
@_dropdown-split-list-position-right @dropdown-split-list__position-right @dropdown-list__position-right '' | false | value Split button drop-down list position: right
@_dropdown-split-list-position-bottom @dropdown-split-list__position-bottom @dropdown-list__position-bottom '' | false | value Split button drop-down list position: bottom
@_dropdown-split-list-position-left @dropdown-split-list__position-left @dropdown-list__position-left '' | false | value Split button drop-down list position: left
@_dropdown-split-list-background @dropdown-split-list__background @dropdown-list__background '' | false | value Split button drop-down background
@_dropdown-split-list-border @dropdown-split-list__border @dropdown-list__border '' | false | value Split button drop-down border
@_dropdown-split-list-pointer @dropdown-split-list__pointer @dropdown-list__pointer '' | false | value Split button drop-down list pointer
@_dropdown-split-list-pointer-border @dropdown-split-list__pointer-border @dropdown-list-pointer__border '' | false | value Split button drop-down list pointer border
@_dropdown-split-button-border-radius-fix @dropdown-split-button__border-radius-fix false true | false Split button drop-down list item border
@_dropdown-split-list-item-border @dropdown-split-list__item-border @dropdown-list-item__border '' | false | value Split button drop-down list item border
@_dropdown-split-list-item-padding @dropdown-split-list__item-padding @dropdown-list-item__padding '' | false | value Split button drop-down list item padding
@_dropdown-split-list-item-margin @dropdown-split-list__item-margin @dropdown-list-item__margin '' | false | value Split button drop-down list item margin
@_dropdown-split-list-item-hover @dropdown-split-list__item-hover @dropdown-list-item__hover '' | false | value Split button drop-down list item hovered background
@_dropdown-split-list-pointer-position @dropdown-split-list__pointer-position right left | right Split button drop-down list pointer position
@_dropdown-split-list-pointer-position-top @dropdown-split-list__pointer-position-top -12px '' | false | value Split button drop-down list pointer position top
@_dropdown-split-list-pointer-position-left-right @dropdown-split-list__pointer-position-left-right 10px '' | false | value Split button drop-down list pointer left or right position
@_dropdown-split-list-shadow @dropdown-split-list__shadow @dropdown-list__shadow '' | false | value Split button drop-down list shadow
@_dropdown-split-list-z-index @dropdown-split-list__z-index @dropdown-list__z-index '' | false | value Split button drop-down list z-index
Dropdown icon
@_dropdown-split-toggle-icon-content @dropdown-split-toggle-icon__content @dropdown-toggle-icon__content '' | false | value Split button drop-down toggle icon - default state
@_dropdown-split-toggle-active-icon-content @dropdown-split-toggle-icon__active__content @dropdown-toggle-icon__active__content '' | false | value Split button drop-down toggle icon - active state
@_icon-font @dropdown-split-toggle-icon__font @button-icon__font '' | false | value Split button drop-down toggle icon font
@_icon-font-size @dropdown-split-toggle-icon__font-size @button-icon__font-size '' | false | value Split button drop-down toggle icon font size
@_icon-font-line-height @dropdown-split-toggle-icon__font-line-height @button-icon__line-height '' | false | value Split button drop-down toggle icon line height
@_icon-font-color @dropdown-split-toggle-icon__font-color @button-icon__color '' | false | value Split button drop-down toggle icon color
@_icon-font-color-hover @dropdown-split-toggle-icon__font-color-hover @button-icon__hover__font-color '' | false | value Split button drop-down toggle icon hovered color
@_icon-font-color-active @dropdown-split-toggle-icon__font-color-active @button-icon__active__font-color '' | false | value Split button drop-down toggle icon active color
@_icon-font-margin @dropdown-split-toggle-icon__font-margin @button-icon__margin '' | false | value Split button drop-down toggle icon margin
@_icon-font-position @dropdown-split-toggle-icon__position after before | after Split button drop-down toggle icon position
@_icon-font-vertical-align @dropdown-split-toggle-icon__font-vertical-align @button-icon__vertical-align '' | false | value Split button drop-down toggle icon vertical align
@_icon-font-text-hide @dropdown-split-toggle-icon__text-hide @button-icon__text-hide true | false The text in the toggle tag is hidden

Split button - button styling

Split buttons can be customized the same way as all types of buttons from Magento UI library.

Regular button:

Big button:

Small button:

.example-dropdown-8 {
    .lib-dropdown-split(@_dropdown-split-button-border-radius-fix: true);
}

.example-dropdown-9 {
    .action.split,
    .action.toggle {
        .lib-button-l();
    }
    .lib-dropdown-split(@_dropdown-split-button-border-radius-fix: true);
}

.example-dropdown-10 {
    .action.split,
    .action.toggle {
        .lib-button-s();
    }
    .lib-dropdown-split(@_dropdown-split-button-border-radius-fix: true);
}

Split button icon customization

Mixin .lib-dropdown-split() uses .icon-font() mixin to customize icon. More information about .icon-font() parameters you can find at Icons page

.example-dropdown-11 {
    .lib-dropdown-split(
        @_dropdown-split-toggle-position: left,
        @_dropdown-split-button-border-radius-fix: true,
        @_dropdown-split-toggle-icon-content: @icon-expand,
        @_dropdown-split-toggle-active-icon-content: @icon-collapse,
        @_icon-font-position: before,
        @_icon-font-color: #f00,
        @_icon-font-color-hover: #f00
    );
}

Split button drop-down list customization

You can customize drop-down list style

.example-dropdown-12 {
    .lib-dropdown-split(
        @_dropdown-split-list-pointer: false,
        @_dropdown-split-list-background: #eef1f3,
        @_dropdown-split-list-item-hover: #d8e3e3,
        @_dropdown-split-list-border: 2px solid #ced1d4,
        @_dropdown-split-list-item-padding: 10px,
        @_dropdown-split-list-item-border: 2px solid #e8eaed,
        @_dropdown-split-list-shadow: none,
        @_dropdown-split-button-border-radius-fix: true
    );
}