aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/awesomplete.css
blob: 76f903f7d57fff429f32ebf1974f266109604805 (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
[hidden] { display: none; }

.visually-hidden {
    position: absolute;
    clip: rect(0, 0, 0, 0);
}

div.awesomplete {
    display: inline-block;
    position: relative;
    width: 100%;
}

div.awesomplete > input {
    display: block;
}

div.awesomplete > ul {
    position: absolute;
    left: 0;
    z-index: 1;
    min-width: 100%;
    box-sizing: border-box;
    list-style: none;
    padding: 0;
    border-radius: .3em;
    margin: .2em 0 0;
    background: #FFF;
    border: 1px solid rgba(0,0,0,.3);
    box-shadow: .05em .2em .6em rgba(0,0,0,.2);
    text-shadow: none;
}

div.awesomplete > ul[hidden],
div.awesomplete > ul:empty {
    display: none;
}

@supports (transform: scale(0)) {
    div.awesomplete > ul {
        transition: .3s cubic-bezier(.4,.2,.5,1.4);
        transform-origin: 1.43em -.43em;
    }

    div.awesomplete > ul[hidden],
    div.awesomplete > ul:empty {
        opacity: 0;
        transform: scale(0);
        display: block;
        transition-timing-function: ease;
    }
}

/* Pointer */
div.awesomplete > ul:before {
    content: "";
    position: absolute;
    top: -.43em;
    left: 1em;
    width: 0; height: 0;
    padding: .4em;
    background: white;
    border: inherit;
    border-right: 0;
    border-bottom: 0;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
}

div.awesomplete > ul > li {
    position: relative;
    padding: .2em .5em;
    cursor: pointer;
}

div.awesomplete > ul > li:hover {
    background: hsl(200, 40%, 80%);
    color: black;
}

div.awesomplete > ul > li[aria-selected="true"] {
    background: hsl(205, 40%, 40%);
    color: white;
}

div.awesomplete mark {
    background: hsl(65, 100%, 50%);
}

div.awesomplete li:hover mark {
    background: hsl(68, 101%, 41%);
}

div.awesomplete li[aria-selected="true"] mark {
    background: hsl(86, 102%, 21%);
    color: inherit;
}