Sha256: 2aadb76e519047cf2bf3cb9a2b7f8bb27599c02da52a002c0481e8ad79136370

Contents?: true

Size: 1.64 KB

Versions: 2

Compression:

Stored size: 1.64 KB

Contents

/*------------------------------------*\
    #SELECT-MENU
\*------------------------------------*/

$select-menu-color: $black !default;
$select-menu-bg-color: $background-color !default;
$select-menu-border-color: $black !default;
$select-menu-border-radius: 5px !default;

$select-menu-arrow-size: 10px !default;
$select-menu-arrow-width: $spacing-unit * 5 !default;
$select-menu-arrow-color: $black !default;
$select-menu-arrow-bg-color: $background-color !default;


/**
 * 1. Positioning context for before pseudo element
 */
.styled-select {
    position: relative; /* [1] */

    &:before {
        @include center($to: vertical);
        right: 1px;
        bottom: 0;
        padding-top: $spacing-unit / 2;
        width: $select-menu-arrow-width;
        color: $select-menu-arrow-color;
        font-size: $select-menu-arrow-size;
        text-align: center;
        background-color: $select-menu-arrow-bg-color;
        border-left: 1px solid $select-menu-border-color;
        content: '▼';
        pointer-events: none;
    }

    /**
     * 1. Prevent chrome applying yellow background on autofill.
     */
    select:-webkit-autofill {
        box-shadow: 0 0 0 30px $select-menu-arrow-bg-color inset; /* [1] */
    }

    select {
        padding: $spacing-unit ($spacing-unit * 2);
        padding-right: ($spacing-unit * 2) + $select-menu-arrow-width;
        width: 100%;
        color: $select-menu-color;
        background-color: $select-menu-bg-color;
        border: 1px solid $select-menu-border-color;
        border-radius: $select-menu-border-radius;
        appearance: none;

        &::-ms-expand {
            display: none;
        }
    }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
workarea-styled_selects-1.1.2 app/assets/stylesheets/workarea/styled_selects/components/_styled_select.scss
workarea-styled_selects-1.1.1 app/assets/stylesheets/workarea/styled_selects/components/_styled_select.scss