|
1 | 1 | export const STYLE_ID = "__FORCE_COPY_STYLE__"; |
2 | 2 |
|
3 | | -export const AUTO_USER_SELECT = |
4 | | - "*{user-select: auto !important;-webkit-user-select: auto !important;} "; |
5 | | - |
6 | | -export const ALLOW_PAINT = "@media print{body{display:block !important;}} "; |
7 | | - |
8 | 3 | export const COPY_BUTTON_STYLE = |
9 | 4 | ".__copy-button {width: 60px; height: 30px; background: #4C98F7;color: #fff;position: absolute;" + |
10 | 5 | "z-index: -1000;opacity: 0;display: flex;justify-content: center;align-items: center;border-radius: 3px;" + |
11 | 6 | "font-size: 13px;cursor: pointer;transition: opacity 0.3s;} "; |
12 | 7 |
|
| 8 | +// https://developer.mozilla.org/zh-CN/docs/Web/CSS/user-select |
| 9 | +export const AUTO_USER_SELECT = |
| 10 | + "*, html body * :not(input):not(textarea)" + |
| 11 | + "{user-select: auto !important;-webkit-user-select: auto !important;} "; |
| 12 | + |
| 13 | +// https://developer.mozilla.org/zh-CN/docs/Web/CSS/@media |
| 14 | +export const ALLOW_PAINT = "@media print{body{display:block !important;}} "; |
| 15 | + |
| 16 | +// https://developer.mozilla.org/en-US/docs/Web/CSS/unset |
| 17 | +// https://developer.mozilla.org/zh-CN/docs/Web/CSS/::selection |
| 18 | +// https://stackoverflow.com/questions/33448213/how-to-reset-background-color-of-selection |
13 | 19 | export const AUTO_SELECTION = |
14 | 20 | ":not(input):not(textarea)::selection {" + |
| 21 | + " color: inherit !important;" + |
15 | 22 | " background-color: #BEDAFF !important;" + |
16 | 23 | " background-color: highlight !important;" + |
17 | 24 | "} " + |
18 | 25 | ":not(input):not(textarea)::-moz-selection {" + |
| 26 | + " color: inherit !important;" + |
19 | 27 | " background-color: #BEDAFF !important;" + |
20 | 28 | " background-color: highlight !important;" + |
21 | 29 | "} "; |
0 commit comments