about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/styles/components/search.scss
blob: 91861ea19b2c973cacf78726a7da1fcc31b9889d (plain) (blame)
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
.search {
  position: relative;
}

.search__input {
  outline: 0;
  box-sizing: border-box;
  display: block;
  width: 100%;
  border: none;
  padding: 10px;
  padding-right: 30px;
  font-family: inherit;
  background: $ui-base-color;
  color: $darker-text-color;
  font-size: 14px;
  margin: 0;

  &::-moz-focus-inner {
    border: 0;
  }

  &::-moz-focus-inner,
  &:focus,
  &:active {
    outline: 0 !important;
  }

  &:focus {
    background: lighten($ui-base-color, 4%);
  }

  @media screen and (max-width: 600px) {
    font-size: 16px;
  }
}

.search__icon {
  .fa {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-block;
    opacity: 0;
    transition: all 100ms linear;
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: $secondary-text-color;
    cursor: default;
    pointer-events: none;

    &.active {
      pointer-events: auto;
      opacity: 0.3;
    }
  }

  .fa-search {
    transform: rotate(90deg);

    &.active {
      pointer-events: none;
      transform: rotate(0deg);
    }
  }

  .fa-times-circle {
    top: 11px;
    transform: rotate(0deg);
    cursor: pointer;

    &.active {
      transform: rotate(90deg);
    }

    &:hover {
      color: $primary-text-color;
    }
  }
}

.search-results__header {
  color: $dark-text-color;
  background: lighten($ui-base-color, 2%);
  border-bottom: 1px solid darken($ui-base-color, 4%);
  padding: 15px 10px;
  font-size: 14px;
  font-weight: 500;
}

.search-results__hashtag {
  display: block;
  padding: 10px;
  color: $secondary-text-color;
  text-decoration: none;

  &:hover,
  &:active,
  &:focus {
    color: lighten($secondary-text-color, 4%);
    text-decoration: underline;
  }
}