This repository was archived by the owner on Jun 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathindex.scss
More file actions
117 lines (94 loc) · 2.53 KB
/
index.scss
File metadata and controls
117 lines (94 loc) · 2.53 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
111
112
113
114
115
116
117
$reactTagColorGray: #e1e1e1 !default;
$reactTagColorText: #333 !default;
$reactTagHeight: 2.375em !default;
$reactTagFontSize: 1em !default;
$reactTagBorderRadius: 3px !default;
$reactTagMarginPadding: 0.1875em !default;
.react-tag-input {
box-sizing: border-box;
position: relative;
width: 100%;
height: auto;
min-height: $reactTagHeight;
padding: $reactTagMarginPadding $reactTagMarginPadding * 2;
overflow-y: auto;
display: flex;
flex-wrap: wrap;
align-items: center;
font-size: 1rem;
background: white;
color: $reactTagColorText;
border: 1px solid $reactTagColorGray;
border-radius: $reactTagBorderRadius;
* { box-sizing: border-box; }
> * { margin: $reactTagMarginPadding; }
@at-root #{&}__input {
width: auto;
flex-grow: 1;
height: $reactTagHeight - 0.5;
padding: 0 0 0 $reactTagMarginPadding;
margin: 0 $reactTagMarginPadding;
font-size: $reactTagFontSize;
line-height: 1;
background: transparent;
color: $reactTagColorText;
border: none;
border-radius: $reactTagBorderRadius;
outline: 0;
box-shadow: none;
-webkit-appearance: none;
&::placeholder, &:-moz-placeholder, &:-ms-input-placeholder, &::-moz-placeholder, &::-webkit-input-placeholder {
color: $reactTagColorText;
}
&:focus {
border: none;
}
}
@at-root #{&}__tag {
position: relative;
display: flex;
align-items: center;
font-size: $reactTagFontSize - 0.15;
line-height: 1;
background: $reactTagColorGray;
border-radius: $reactTagBorderRadius;
}
@at-root #{&}__tag__content {
outline: 0;
border: none;
white-space: nowrap;
padding: 0 $reactTagMarginPadding * 2.5;
}
@at-root #{&}__tag__remove {
position: relative;
height: $reactTagFontSize * 2;
width: $reactTagFontSize * 2;
font-size: $reactTagFontSize - 0.15;
cursor: pointer;
background: darken($reactTagColorGray, 5%);
border-top-right-radius: $reactTagBorderRadius;
border-bottom-right-radius: $reactTagBorderRadius;
&:before, &:after {
position: absolute;
top: 50%;
left: 50%;
content: ' ';
height: $reactTagFontSize - 0.1;
width: 0.15em;
background-color: $reactTagColorText;
}
&:before {
transform: translateX(-50%) translateY(-50%) rotate(45deg);
}
&:after {
transform: translateX(-50%) translateY(-50%) rotate(-45deg);
}
@at-root #{&}-readonly {
width: 0;
&:before, &:after {
content: '';
width: 0;
}
}
}
}