|
41 | 41 | text-shadow: none; |
42 | 42 |
|
43 | 43 | vertical-align: middle; |
44 | | -} |
45 | | - |
46 | | -.code-input_special-char::before, .code-input_special-char::after { |
47 | | - white-space: pre; |
48 | | - color: inherit; |
49 | | - background-color: inherit; |
50 | | - |
51 | | - font-size: calc(100% - 2px); |
52 | | - position: absolute; |
53 | | - line-height: 1; |
54 | | - |
55 | | - height: 2em; |
56 | | - width: calc(100% - 2px); |
57 | | - text-align: center; |
| 44 | + |
| 45 | + outline: 1px solid currentColor; |
58 | 46 | } |
59 | 47 |
|
60 | 48 | /* Default - Two bytes - 4 hex chars */ |
|
65 | 53 | background-color: currentColor; |
66 | 54 | image-rendering: pixelated; |
67 | 55 | display: inline-block; |
68 | | - width: 100%; |
| 56 | + width: calc(100%-2px); |
69 | 57 | height: 100%; |
70 | 58 |
|
71 | 59 | --char-0: var(--code-input_special-chars_0); |
|
75 | 63 |
|
76 | 64 | mask-image: var(--char-0), var(--char-1), var(--char-2), var(--char-3); |
77 | 65 | mask-repeat: no-repeat, no-repeat, no-repeat, no-repeat; |
78 | | - mask-size: 45%, 45%, 45%, 45%; |
79 | | - mask-position: 2% 2%, 100% 2%, 2% 100%, 100% 100%; |
| 66 | + mask-size: 40%, 40%, 40%, 40%; |
| 67 | + mask-position: 10% 10%, 90% 10%, 10% 90%, 90% 90%; |
80 | 68 |
|
81 | 69 | -webkit-mask-image: var(--char-0), var(--char-1), var(--char-2), var(--char-3); |
82 | 70 | -webkit-mask-repeat: no-repeat, no-repeat, no-repeat, no-repeat; |
83 | | - -webkit-mask-size: 40%, 40%, 40%, 40%; |
84 | | - -webkit-mask-position: 10% 10%, 90% 10%, 10% 90%, 90% 90%; |
| 71 | + -webkit-mask-size: min(40%, 0.25em), min(40%, 0.25em), min(40%, 0.25em), min(40%, 0.25em); |
| 72 | + -webkit-mask-position: 10% 10%, min(90%, 0.5em) 10%, 10% 90%, min(90%, 0.5em) 90%; |
85 | 73 | } |
86 | 74 |
|
87 | | -/* Zero-width - style so takes up no space */ |
88 | | - |
89 | 75 | .code-input_special-char_zero-width { |
90 | 76 | z-index: 1; |
91 | 77 | width: 1em; |
|
0 commit comments