File size: 1,460 Bytes
97420cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/* DO NOT EDIT
@todo This file is copied from GUI and should be pulled out into a shared library.
See https://github.com/LLK/scratch-paint/issues/13 */

/* NOTE:
Edited to add input-range-small
*/

@import "../../css/units.css";
@import "../../css/colors.css";

.input-form {
    height: 2rem;
    padding: 0 0.75rem;

    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    color: $text-primary;

    border-width: 1px;
    border-style: solid;
    border-color: $form-border;
    border-radius: 2rem;

    outline: none;
    cursor: text;
    transition: 0.25s ease-out; /* @todo: standardize with var */
    box-shadow: none;

    /*
        For truncating overflowing text gracefully
        Min-width is for a bug: https://css-tricks.com/flexbox-truncated-text
        @todo: move this out into a mixin or a helper component
    */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
[theme="dark"] .input-form {
    background: rgb(30, 30, 30);
    border-color: rgba(255, 255, 255, 0.15);
}

.input-form:focus {
    border-color: $motion-primary;
    box-shadow: 0 0 0 $grid-unit $motion-transparent;
}
[theme="dark"] .input-form:hover {
    border-color: #333;
}

.input-small {
    width: 3rem;
    text-align: center;
}
[theme="dark"] .input-form:focus {
    border-color: #333;
}

.input-small-range {
    width: 4rem;
    text-align: center;
}