searchbar.less 6.12 KB
Newer Older
1
@searchbar-border-color: #a2a2a2;
Karl Hasselbring's avatar
Karl Hasselbring committed
2
@searchbar-background-color: white;
3
.searchbar {
4
5
    display: -webkit-box;
    display: -ms-flexbox;
6
    display: flex;
7
    -webkit-box-align: stretch;
8
9
    -ms-flex-align: stretch;
    align-items: stretch;
10
    -webkit-box-pack: center;
11
12
    -ms-flex-pack: center;
    justify-content: center;
13
    font-size: 16px;
14
    background-color: transparent;
15
    color: #333;
16
    .search-input-submit {
17
        background-color: @searchbar-background-color;
18
        -webkit-box-flex: 1;
19
20
        -ms-flex-positive: 1;
        flex-grow: 1;
21
22
        display: -webkit-box;
        display: -ms-flexbox;
23
        display: flex;
24
        max-width: 600px;
25
26
27
28
29
30
31
32
        #search-lang {
            #input-lang {
                background-color: transparent;
                border: none;
            }
        }
        #search-lang,
        #search-key {
Karl Hasselbring's avatar
Karl Hasselbring committed
33
34
            display: -webkit-box;
            display: -ms-flexbox;
35
            display: flex;
36
            z-index: 1;
37
            #input-lang,
38
39
40
41
            #input-key {
                margin: 0;
                padding: 0px;
                border: none;
Karl Hasselbring's avatar
Karl Hasselbring committed
42
                -webkit-box-shadow: none;
43
44
45
                box-shadow: none;
                height: 40px;
                width: 0px;
46
                outline-color: green;
Karl Hasselbring's avatar
Karl Hasselbring committed
47
48
                -webkit-transition: width 0.5s, padding 0.5s, outline-color 0s, border-color 0s, -webkit-box-shadow 0s;
                transition: width 0.5s, padding 0.5s, outline-color 0s, border-color 0s, -webkit-box-shadow 0s;
49
                transition: width 0.5s, padding 0.5s, outline-color 0s, border-color 0s, box-shadow 0s;
Karl Hasselbring's avatar
Karl Hasselbring committed
50
51
                transition: width 0.5s, padding 0.5s, outline-color 0s, border-color 0s, box-shadow 0s, -webkit-box-shadow 0s;
                -webkit-transition-delay: 0.3s;
52
                transition-delay: 0.3s;
53
54
55
56
57
58
59
60
                &:focus {
                    width: 200px;
                    padding: 6px 10px 6px 10px;
                    outline-color: @metager-orange;
                    -webkit-box-shadow: 0px 0px 2px 2px rgba(255, 128, 0, 1);
                    box-shadow: 0px 0px 2px 2px rgba(255, 128, 0, 1);
                    border-color: rgba(255, 128, 0, 1);
                    border-radius: 4px;
61
                    +#lang-label,
62
                    +#key-label {
63
64
                        visibility: hidden;
                        width: 0px;
65
66
67
                    }
                }
            }
68
            #lang-label,
69
70
71
72
73
            #key-label {
                cursor: pointer;
                height: 40px;
                width: 40px;
                margin: 0;
Karl Hasselbring's avatar
Karl Hasselbring committed
74
75
                display: -webkit-box;
                display: -ms-flexbox;
76
                display: flex;
Karl Hasselbring's avatar
Karl Hasselbring committed
77
78
                -webkit-box-align: center;
                -ms-flex-align: center;
79
                align-items: center;
Karl Hasselbring's avatar
Karl Hasselbring committed
80
81
                -webkit-box-pack: center;
                -ms-flex-pack: center;
82
                justify-content: center;
Karl Hasselbring's avatar
Karl Hasselbring committed
83
                -webkit-transition: width 0s, visibility 0s;
84
                transition: width 0s, visibility 0s;
Karl Hasselbring's avatar
Karl Hasselbring committed
85
                -webkit-transition-delay: 0.3s;
86
                transition-delay: 0.3s;
Karl Hasselbring's avatar
Karl Hasselbring committed
87
88
89
                #lang-label-code {
                    margin-left: 5px;
                }
90
91
            }
        }
92
        .search-input {
93
            position: relative;
94
95
96
97
98
99
100
101
            -webkit-box-flex: 1;
            -ms-flex-positive: 1;
            flex-grow: 1;
            input {
                border: none;
                height: 40px;
                -webkit-box-shadow: none;
                box-shadow: none;
102
                background-color: transparent;
103
104
105
106
107
108
109
110
                &:focus {
                    outline-color: @metager-orange;
                    -webkit-box-shadow: 0px 0px 2px 2px rgba(255, 128, 0, 1);
                    box-shadow: 0px 0px 2px 2px rgba(255, 128, 0, 1);
                    border-color: rgba(255, 128, 0, 1);
                    border-radius: 4px;
                }
            }
111
112
113
114
115
116
117
118
119
120
            #search-delete-btn {
                position: absolute;
                right: 2px;
                bottom: 1px;
                width: auto;
                border: none;
                background-color: white;
                font-size: 25px;
                font-weight: normal;
            }
121
122
123
124
125
126
127
128
129
130
        }
        .search-submit {
            button {
                width: 50px;
                line-height: 100%;
                border: 0;
                background-color: transparent;
                padding: 0;
                height: 100%;
            }
131
132
133
134
135
        }
    }
    .search-hidden {
        display: none;
    }
136
137
138
    .search-custom-hidden {
        display: none;
    }
139
    @media (max-width: @screen-mobile) {
140
141
        -webkit-box-orient: vertical;
        -webkit-box-direction: reverse;
142
143
        -ms-flex-direction: column-reverse;
        flex-direction: column-reverse;
144
145
146
    }
}

147
148
.startpage-searchbar {
    >* {
149
        border: 1px solid @searchbar-border-color;
150
151
152
153
154
        &:not(:first-child) {
            border-left: none;
        }
    }
    .search-input-submit {
155
        border-radius: 5px;
156
        @media (max-width: @screen-mobile) {
Karl Hasselbring's avatar
Karl Hasselbring committed
157
158
            max-width: initial;
        }
159
        >:not(:first-child) {
160
            border-left: 1px solid @searchbar-border-color;
161
        }
162
    }
163
    @media (max-width: @screen-mobile) {
164
165
166
167
168
169
170
171
172
        .search-focus-selector {
            border: 1px solid #aaa;
            border-top: none;
            border-radius: 5px;
        }
        .search-input-submit {
            border: 1px solid #aaa;
            border-radius: 5px;
        }
173
174
175
176
177
178
179
180
181
        >* {
            border: 1px solid #aaa;
            border-radius: 5px;
            min-height: 40px;
            &:not(:first-child) {
                border-left: 1px solid #aaa;
            }
        }
    }
182
183
}

184
185
186
187
.resultpage-searchbar {
    .search-input-submit {
        #search-lang,
        #search-key {
188
            @media (max-width: @screen-mobile) {
189
190
191
                display: none;
            }
        }
192
193
194
        .search-input input {
            padding-right: 35px; // Makes it so the overlayed delete button does not hide the text belowF
        }
195
196
197
    }
}

198
199
#research-bar-placeholder {
    width: 100%;
200
    max-width: 760px;
201
    height: 51px;
202
}