cactimurray
3/5/2020 - 10:15 AM

Pure CSS Select Dropdown

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  appearance: none;
  outline: 0;
  box-shadow: none;
  border: 0 !important;
  background: transparent;
  background-image: none;
  margin:0px!important;
}
/* Remove IE arrow */
select::-ms-expand {
  display: none;
}
/* Custom Select */
.select {
  position: relative;
  display: flex;
  width: 100%;
  height: 3em;
  line-height: 3;
  background: transparent;
  overflow: hidden;
  border-radius: .25em;
  border: 1px solid @black;
  
  // Optional! This is mainly for Squarespace applications
  label {
    display: none!important;
  }
  
  select {
    flex: 1;
    padding: 0 1em;
    color: @black;
    cursor: pointer;
  }

  /* Arrow */
  &::after {
    content: '\25BC';
    position: absolute;
    top: 0;
    right: 0;
    padding: 0 1em;
    cursor: pointer;
    pointer-events: none;
    -webkit-transition: .25s all ease;
    -o-transition: .25s all ease;
    transition: .25s all ease;
    color: @black;
    font-size: 80%;
    line-height:4em;
  }
  /* Transition */
  &:hover::after {
    opacity: 0.5;
  }
}