Socialify

Folder ..

Viewing _pm-header-searchbar.scss
110 lines (101 loc) • 2.3 KB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
.searchbox-container {
  width: $conversations-column-width;
}
.searchbox-container:empty {
  width: 0;

  // if there is no search bar, the next element (navigation) is pushed to the right (VPN/settings/etc.)

  // & + .topnav-container {

  //   & .topnav-list {
  //     justify-content: flex-end;

  //     & > li:last-child {
  //       margin-left: 0;
  //     }

  //   }

  // }
}
.searchbox-container input::placeholder {
  color: var(--color-standard-text, rgba(255, 255, 255, .6) );
}
.searchbox-field[type="search"] {
  height: 4rem;
  background-color: var(--bgcolor-searchbox-field, rgba($black, .3));
  background-image: none;
  border-color: var(--main-bg-color, $black);
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.05);
  background-size: 2rem;
  padding-left: calc(2em + 2rem);
  padding-right: 4rem;
  color: var(--color-standard-text, $white);
  border-width: 0;
}
.searchbox-search-button {
  position: absolute;
  left: 1em;
  top: 0;
  bottom: 0;
  & > .searchbox-search-button-icon {
    width: 2.2rem;
    height: 2.2rem;
    fill: var(--fillcolor-icons, $white);
  }
}
.searchbox-advanced-search-button {
  position: absolute;
  right: .25em;
  top: .5em;
  bottom: .5em;
  padding: 0 .5rem;
  border-radius: 50%;
  &:focus,
  &:hover,
  &:active {
    background-color: $pm-global-altgrey;
  }
  & > .searchbox-advanced-search-icon {
    fill: var(--fillcolor-icons, $white);
  }
}

.searchbox-container--reset-advanced {
  .searchbox-field[type="search"] {
    padding-right: 6.25rem;
  }
  [type="reset"].searchbox-advanced-search-button {
    right: 2.75rem;
  }
}

@include respond-to($breakpoint-small) {
  .searchbox-advanced-search-button {
    position: static;
  }
}

@if $rtl-option == true {
  [dir="rtl"] {
    .searchbox-field[type="search"] {
      padding-right: calc(2em + 2rem);
      padding-left: 4rem;
      background-image: none;
      background-size: 2rem;
    }
    .searchbox-search-button-icon {
      @extend .mirror;
    }
    .searchbox-search-button {
      right: 1em;
      left: auto;
    }
    .searchbox-advanced-search-button {
      right: auto;
      left: 0;
    }
    .searchbox-container--reset-advanced {
      .searchbox-field[type="search"] {
        padding-right: calc(2em + 2rem);
        padding-left: 6rem;
      }
      .searchbox-advanced-search-button {
        right: auto;
        left: 2.5rem;
      }
    }
  }
}