Skip to content

Commit 5d94230

Browse files
author
Raphaël Balet
committed
fix(css): editable css variable
1 parent 84dfcbe commit 5d94230

File tree

1 file changed

+17
-32
lines changed

1 file changed

+17
-32
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,50 @@
11
:host {
2-
--text-security-type: disc;
3-
--item-spacing: 4px;
4-
--item-height: 4.375em;
5-
--item-border: 1px solid #dddddd;
6-
--item-border-bottom: 1px solid #dddddd;
7-
--item-border-has-value: 1px solid #dddddd;
8-
--item-border-bottom-has-value: 1px solid #dddddd;
9-
--item-border-focused: 1px solid #dddddd;
10-
--item-border-bottom-focused: 1px solid #dddddd;
11-
--item-shadow-focused: 0px 1px 5px rgba(221, 221, 221, 1);
12-
--item-border-radius: 5px;
13-
--item-background: transparent;
14-
--item-font-weight: 300;
15-
--color: #171516;
16-
172
display: flex;
183
transform: translate3d(0, 0, 0);
194
font-size: inherit;
20-
color: var(--color);
5+
color: var(--color, #171516);
216

227
span {
238
display: block;
249
flex: 1;
25-
padding-right: var(--item-spacing);
10+
padding-right: var(--item-spacing, 4px);
2611

2712
&:first-child {
28-
padding-left: var(--item-spacing);
13+
padding-left: var(--item-spacing, 4px);
2914
}
3015

3116
&.code-hidden input {
32-
text-security: var(--text-security-type);
33-
-webkit-text-security: var(--text-security-type);
34-
-moz-text-security: var(--text-security-type);
17+
text-security: var(--text-security-type, disc);
18+
-webkit-text-security: var(--text-security-type, disc);
19+
-moz-text-security: var(--text-security-type, disc);
3520
}
3621
}
3722

3823
input {
3924
width: 100%;
40-
height: var(--item-height);
25+
height: var(--item-height, 4.375em);
4126
color: inherit;
42-
background: var(--item-background);
27+
background: var(--item-background, transparent);
4328
text-align: center;
4429
font-size: inherit;
45-
font-weight: var(--item-font-weight);
46-
border: var(--item-border);
47-
border-bottom: var(--item-border-bottom);
48-
border-radius: var(--item-border-radius);
30+
font-weight: var(--item-font-weight, 300);
31+
border: var(--item-border, 1px solid #dddddd);
32+
border-bottom: var(--item-border-bottom, 1px solid #dddddd);
33+
border-radius: var(--item-border-radius, 5px);
4934
-webkit-appearance: none;
5035
transform: translate3d(0, 0, 0);
5136
-webkit-transform: translate3d(0, 0, 0);
5237
outline: none;
5338

5439
&.has-value {
55-
border: var(--item-border-has-value);
56-
border-bottom: var(--item-border-bottom-has-value);
40+
border: var(--item-border-has-value, 1px solid #dddddd);
41+
border-bottom: var(--item-border-bottom-has-value, 1px solid #dddddd);
5742
}
5843

5944
&:focus {
60-
border: var(--item-border-focused);
61-
border-bottom: var(--item-border-bottom-focused);
62-
box-shadow: var(--item-shadow-focused);
45+
border: var(--item-border-focused, 1px solid #dddddd);
46+
border-bottom: var(--item-border-bottom-focused, 1px solid #dddddd);
47+
box-shadow: var(--item-shadow-focused, 0 1px 5px rgba(221, 221, 221, 1));
6348
}
6449
}
6550
}

0 commit comments

Comments
 (0)