@jait/gateway 0.1.256 → 0.1.258
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/routes/preview.d.ts.map +1 -1
- package/dist/routes/preview.js +41 -2
- package/dist/routes/preview.js.map +1 -1
- package/dist/security/sandbox-manager.d.ts +8 -0
- package/dist/security/sandbox-manager.d.ts.map +1 -1
- package/dist/security/sandbox-manager.js +131 -2
- package/dist/security/sandbox-manager.js.map +1 -1
- package/dist/services/live-view-manager.d.ts +25 -0
- package/dist/services/live-view-manager.d.ts.map +1 -0
- package/dist/services/live-view-manager.js +178 -0
- package/dist/services/live-view-manager.js.map +1 -0
- package/dist/services/preview.d.ts +21 -2
- package/dist/services/preview.d.ts.map +1 -1
- package/dist/services/preview.js +140 -2
- package/dist/services/preview.js.map +1 -1
- package/dist/surfaces/browser.d.ts +51 -1
- package/dist/surfaces/browser.d.ts.map +1 -1
- package/dist/surfaces/browser.js +238 -20
- package/dist/surfaces/browser.js.map +1 -1
- package/dist/tools/preview-tools.d.ts.map +1 -1
- package/dist/tools/preview-tools.js +6 -3
- package/dist/tools/preview-tools.js.map +1 -1
- package/package.json +1 -1
- package/web-dist/assets/{_basePickBy-B5ojxQyY.js → _basePickBy-B1Q85huU.js} +1 -1
- package/web-dist/assets/{_baseUniq-BVcMC3e3.js → _baseUniq-xbSl0CM3.js} +1 -1
- package/web-dist/assets/{arc-B8rKyks5.js → arc-BPQiaftr.js} +1 -1
- package/web-dist/assets/{architectureDiagram-2XIMDMQ5-D5Rn0_M_.js → architectureDiagram-2XIMDMQ5-DAG0yXkD.js} +1 -1
- package/web-dist/assets/{blockDiagram-WCTKOSBZ-Dn0EedHT.js → blockDiagram-WCTKOSBZ-BHwTxFpO.js} +1 -1
- package/web-dist/assets/{c4Diagram-IC4MRINW-BYTFS9YT.js → c4Diagram-IC4MRINW-DSo8jOax.js} +1 -1
- package/web-dist/assets/channel-D0UG72Sd.js +1 -0
- package/web-dist/assets/{chunk-4BX2VUAB-c51Qw6zZ.js → chunk-4BX2VUAB-BvHzmUEU.js} +1 -1
- package/web-dist/assets/{chunk-55IACEB6-BLJEbYZY.js → chunk-55IACEB6-DRwUUfw9.js} +1 -1
- package/web-dist/assets/{chunk-FMBD7UC4-BTQRsQCz.js → chunk-FMBD7UC4-C-og1AV4.js} +1 -1
- package/web-dist/assets/{chunk-JSJVCQXG-BCQCgV3v.js → chunk-JSJVCQXG-DQ_Nx-12.js} +1 -1
- package/web-dist/assets/{chunk-KX2RTZJC-BdxNziNu.js → chunk-KX2RTZJC-DJt22pKX.js} +1 -1
- package/web-dist/assets/{chunk-NQ4KR5QH-DvtJCn0C.js → chunk-NQ4KR5QH-DwqccJna.js} +1 -1
- package/web-dist/assets/{chunk-QZHKN3VN-Bv5UUhJr.js → chunk-QZHKN3VN-t2Z5FHem.js} +1 -1
- package/web-dist/assets/{chunk-WL4C6EOR-DgCZzsOT.js → chunk-WL4C6EOR-DhnNywRj.js} +1 -1
- package/web-dist/assets/classDiagram-VBA2DB6C-Dnib5gxK.js +1 -0
- package/web-dist/assets/classDiagram-v2-RAHNMMFH-Dnib5gxK.js +1 -0
- package/web-dist/assets/clone-jMsfbHCu.js +1 -0
- package/web-dist/assets/{cose-bilkent-S5V4N54A-CmDdGIef.js → cose-bilkent-S5V4N54A-CLw8R8jY.js} +1 -1
- package/web-dist/assets/{dagre-KLK3FWXG-BzeF6p1D.js → dagre-KLK3FWXG-DG-8BOX_.js} +1 -1
- package/web-dist/assets/{diagram-E7M64L7V-lDeWArgl.js → diagram-E7M64L7V-I6Ok2sG0.js} +1 -1
- package/web-dist/assets/{diagram-IFDJBPK2-BguEZbUg.js → diagram-IFDJBPK2-ertAk1QG.js} +1 -1
- package/web-dist/assets/{diagram-P4PSJMXO-CnTxg2wa.js → diagram-P4PSJMXO-B9Yr9iab.js} +1 -1
- package/web-dist/assets/{erDiagram-INFDFZHY-D2aGee-H.js → erDiagram-INFDFZHY-BMva8gYu.js} +1 -1
- package/web-dist/assets/{flowDiagram-PKNHOUZH-DYPu_lOt.js → flowDiagram-PKNHOUZH-D1dJMWaL.js} +1 -1
- package/web-dist/assets/{ganttDiagram-A5KZAMGK-D-9aApiK.js → ganttDiagram-A5KZAMGK-qRDi6l_-.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-K3NZZRJ6-CGHZTbqZ.js → gitGraphDiagram-K3NZZRJ6-X8idci3H.js} +1 -1
- package/web-dist/assets/{graph-xl1n4wd4.js → graph-6RqPLKMD.js} +1 -1
- package/web-dist/assets/{index-CNdW3yYd.js → index-B0GgFn4l.js} +306 -306
- package/web-dist/assets/{index-qWyAYgAD.css → index-DFW3_r8A.css} +1 -1
- package/web-dist/assets/{infoDiagram-LFFYTUFH-JQ1DhuIN.js → infoDiagram-LFFYTUFH-CMk_Yj9c.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-PHBUUO56-BiQo9puY.js → ishikawaDiagram-PHBUUO56-CwBIr6E2.js} +1 -1
- package/web-dist/assets/{journeyDiagram-4ABVD52K-BWvVCFKb.js → journeyDiagram-4ABVD52K-BgD5iS1h.js} +1 -1
- package/web-dist/assets/{kanban-definition-K7BYSVSG-B1pZvgm7.js → kanban-definition-K7BYSVSG-CzjxHzou.js} +1 -1
- package/web-dist/assets/{layout-C_VnOnT4.js → layout-b5fe_UxD.js} +1 -1
- package/web-dist/assets/{linear-BeBoVpvX.js → linear-ChI_4a9O.js} +1 -1
- package/web-dist/assets/{mindmap-definition-YRQLILUH-B3U5ZJAw.js → mindmap-definition-YRQLILUH-e_vvWWg8.js} +1 -1
- package/web-dist/assets/{pieDiagram-SKSYHLDU-B9JMxGDx.js → pieDiagram-SKSYHLDU-CJtQ5J0D.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-337W2JSQ-DNAEOevf.js → quadrantDiagram-337W2JSQ-Cf_x_2ej.js} +1 -1
- package/web-dist/assets/{requirementDiagram-Z7DCOOCP-Dcgzabvl.js → requirementDiagram-Z7DCOOCP-DCQvoqk_.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-WA2Y5GQK-BDcQVCtL.js → sankeyDiagram-WA2Y5GQK-D2eB9_Im.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-2WXFIKYE-5kY7GmoR.js → sequenceDiagram-2WXFIKYE-Ccyyepsb.js} +1 -1
- package/web-dist/assets/{stateDiagram-RAJIS63D-BwQlMlEC.js → stateDiagram-RAJIS63D-DPMGShy8.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-FVOUBMTO-BmvKM7hT.js +1 -0
- package/web-dist/assets/{timeline-definition-YZTLITO2-BE0IDpJe.js → timeline-definition-YZTLITO2-CHBPr8N4.js} +1 -1
- package/web-dist/assets/{treemap-KZPCXAKY-CHwtWAgO.js → treemap-KZPCXAKY-DnqeIQgk.js} +1 -1
- package/web-dist/assets/{vennDiagram-LZ73GAT5-ByqFK92_.js → vennDiagram-LZ73GAT5-BRIzanhU.js} +1 -1
- package/web-dist/assets/{xychartDiagram-JWTSCODW-BdCa1f3c.js → xychartDiagram-JWTSCODW-qjjqxrk2.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/noVNC/LICENSE.txt +62 -0
- package/web-dist/noVNC/app/error-handler.js +79 -0
- package/web-dist/noVNC/app/images/alt.svg +92 -0
- package/web-dist/noVNC/app/images/clipboard.svg +106 -0
- package/web-dist/noVNC/app/images/connect.svg +96 -0
- package/web-dist/noVNC/app/images/ctrl.svg +96 -0
- package/web-dist/noVNC/app/images/ctrlaltdel.svg +100 -0
- package/web-dist/noVNC/app/images/disconnect.svg +94 -0
- package/web-dist/noVNC/app/images/drag.svg +76 -0
- package/web-dist/noVNC/app/images/error.svg +81 -0
- package/web-dist/noVNC/app/images/esc.svg +92 -0
- package/web-dist/noVNC/app/images/expander.svg +69 -0
- package/web-dist/noVNC/app/images/fullscreen.svg +93 -0
- package/web-dist/noVNC/app/images/handle.svg +82 -0
- package/web-dist/noVNC/app/images/handle_bg.svg +172 -0
- package/web-dist/noVNC/app/images/icons/Makefile +42 -0
- package/web-dist/noVNC/app/images/icons/novnc-icon-sm.svg +163 -0
- package/web-dist/noVNC/app/images/icons/novnc-icon.svg +163 -0
- package/web-dist/noVNC/app/images/icons/novnc-ios-120.png +0 -0
- package/web-dist/noVNC/app/images/icons/novnc-ios-152.png +0 -0
- package/web-dist/noVNC/app/images/icons/novnc-ios-167.png +0 -0
- package/web-dist/noVNC/app/images/icons/novnc-ios-180.png +0 -0
- package/web-dist/noVNC/app/images/icons/novnc-ios-40.png +0 -0
- package/web-dist/noVNC/app/images/icons/novnc-ios-58.png +0 -0
- package/web-dist/noVNC/app/images/icons/novnc-ios-60.png +0 -0
- package/web-dist/noVNC/app/images/icons/novnc-ios-80.png +0 -0
- package/web-dist/noVNC/app/images/icons/novnc-ios-87.png +0 -0
- package/web-dist/noVNC/app/images/icons/novnc-ios-icon.svg +183 -0
- package/web-dist/noVNC/app/images/icons/novnc.ico +0 -0
- package/web-dist/noVNC/app/images/info.svg +81 -0
- package/web-dist/noVNC/app/images/keyboard.svg +88 -0
- package/web-dist/noVNC/app/images/power.svg +87 -0
- package/web-dist/noVNC/app/images/settings.svg +76 -0
- package/web-dist/noVNC/app/images/tab.svg +86 -0
- package/web-dist/noVNC/app/images/toggleextrakeys.svg +90 -0
- package/web-dist/noVNC/app/images/warning.svg +81 -0
- package/web-dist/noVNC/app/images/windows.svg +65 -0
- package/web-dist/noVNC/app/locale/README +1 -0
- package/web-dist/noVNC/app/locale/cs.json +71 -0
- package/web-dist/noVNC/app/locale/de.json +74 -0
- package/web-dist/noVNC/app/locale/el.json +100 -0
- package/web-dist/noVNC/app/locale/es.json +68 -0
- package/web-dist/noVNC/app/locale/fr.json +82 -0
- package/web-dist/noVNC/app/locale/hu.json +80 -0
- package/web-dist/noVNC/app/locale/it.json +68 -0
- package/web-dist/noVNC/app/locale/ja.json +81 -0
- package/web-dist/noVNC/app/locale/ko.json +70 -0
- package/web-dist/noVNC/app/locale/nl.json +95 -0
- package/web-dist/noVNC/app/locale/pl.json +80 -0
- package/web-dist/noVNC/app/locale/pt_BR.json +72 -0
- package/web-dist/noVNC/app/locale/ru.json +72 -0
- package/web-dist/noVNC/app/locale/sv.json +83 -0
- package/web-dist/noVNC/app/locale/tr.json +69 -0
- package/web-dist/noVNC/app/locale/uk.json +81 -0
- package/web-dist/noVNC/app/locale/zh_CN.json +93 -0
- package/web-dist/noVNC/app/locale/zh_TW.json +69 -0
- package/web-dist/noVNC/app/localization.js +206 -0
- package/web-dist/noVNC/app/sounds/CREDITS +4 -0
- package/web-dist/noVNC/app/sounds/bell.mp3 +0 -0
- package/web-dist/noVNC/app/sounds/bell.oga +0 -0
- package/web-dist/noVNC/app/styles/Orbitron700.ttf +0 -0
- package/web-dist/noVNC/app/styles/Orbitron700.woff +0 -0
- package/web-dist/noVNC/app/styles/base.css +927 -0
- package/web-dist/noVNC/app/styles/constants.css +30 -0
- package/web-dist/noVNC/app/styles/input.css +628 -0
- package/web-dist/noVNC/app/ui.js +1873 -0
- package/web-dist/noVNC/app/wakelock.js +199 -0
- package/web-dist/noVNC/app/webutil.js +250 -0
- package/web-dist/noVNC/core/base64.js +104 -0
- package/web-dist/noVNC/core/clipboard.js +72 -0
- package/web-dist/noVNC/core/crypto/aes.js +178 -0
- package/web-dist/noVNC/core/crypto/bigint.js +34 -0
- package/web-dist/noVNC/core/crypto/crypto.js +90 -0
- package/web-dist/noVNC/core/crypto/des.js +330 -0
- package/web-dist/noVNC/core/crypto/dh.js +55 -0
- package/web-dist/noVNC/core/crypto/md5.js +82 -0
- package/web-dist/noVNC/core/crypto/rsa.js +132 -0
- package/web-dist/noVNC/core/decoders/copyrect.js +27 -0
- package/web-dist/noVNC/core/decoders/h264.js +321 -0
- package/web-dist/noVNC/core/decoders/hextile.js +181 -0
- package/web-dist/noVNC/core/decoders/jpeg.js +161 -0
- package/web-dist/noVNC/core/decoders/raw.js +59 -0
- package/web-dist/noVNC/core/decoders/rre.js +44 -0
- package/web-dist/noVNC/core/decoders/tight.js +393 -0
- package/web-dist/noVNC/core/decoders/tightpng.js +27 -0
- package/web-dist/noVNC/core/decoders/zlib.js +51 -0
- package/web-dist/noVNC/core/decoders/zrle.js +185 -0
- package/web-dist/noVNC/core/deflator.js +84 -0
- package/web-dist/noVNC/core/display.js +578 -0
- package/web-dist/noVNC/core/encodings.js +54 -0
- package/web-dist/noVNC/core/inflator.js +65 -0
- package/web-dist/noVNC/core/input/domkeytable.js +311 -0
- package/web-dist/noVNC/core/input/fixedkeys.js +129 -0
- package/web-dist/noVNC/core/input/gesturehandler.js +567 -0
- package/web-dist/noVNC/core/input/keyboard.js +294 -0
- package/web-dist/noVNC/core/input/keysym.js +616 -0
- package/web-dist/noVNC/core/input/keysymdef.js +688 -0
- package/web-dist/noVNC/core/input/util.js +191 -0
- package/web-dist/noVNC/core/input/vkeys.js +116 -0
- package/web-dist/noVNC/core/input/xtscancodes.js +173 -0
- package/web-dist/noVNC/core/ra2.js +312 -0
- package/web-dist/noVNC/core/rfb.js +3426 -0
- package/web-dist/noVNC/core/util/browser.js +266 -0
- package/web-dist/noVNC/core/util/cursor.js +249 -0
- package/web-dist/noVNC/core/util/element.js +32 -0
- package/web-dist/noVNC/core/util/events.js +138 -0
- package/web-dist/noVNC/core/util/eventtarget.js +35 -0
- package/web-dist/noVNC/core/util/int.js +15 -0
- package/web-dist/noVNC/core/util/logging.js +56 -0
- package/web-dist/noVNC/core/util/strings.js +28 -0
- package/web-dist/noVNC/core/websock.js +369 -0
- package/web-dist/noVNC/defaults.json +1 -0
- package/web-dist/noVNC/mandatory.json +1 -0
- package/web-dist/noVNC/vendor/pako/LICENSE +21 -0
- package/web-dist/noVNC/vendor/pako/README.md +6 -0
- package/web-dist/noVNC/vendor/pako/lib/utils/common.js +45 -0
- package/web-dist/noVNC/vendor/pako/lib/zlib/adler32.js +27 -0
- package/web-dist/noVNC/vendor/pako/lib/zlib/constants.js +47 -0
- package/web-dist/noVNC/vendor/pako/lib/zlib/crc32.js +36 -0
- package/web-dist/noVNC/vendor/pako/lib/zlib/deflate.js +1846 -0
- package/web-dist/noVNC/vendor/pako/lib/zlib/gzheader.js +35 -0
- package/web-dist/noVNC/vendor/pako/lib/zlib/inffast.js +324 -0
- package/web-dist/noVNC/vendor/pako/lib/zlib/inflate.js +1527 -0
- package/web-dist/noVNC/vendor/pako/lib/zlib/inftrees.js +322 -0
- package/web-dist/noVNC/vendor/pako/lib/zlib/messages.js +11 -0
- package/web-dist/noVNC/vendor/pako/lib/zlib/trees.js +1195 -0
- package/web-dist/noVNC/vendor/pako/lib/zlib/zstream.js +24 -0
- package/web-dist/noVNC/vnc_lite.html +180 -0
- package/web-dist/assets/channel-DlBBaM6I.js +0 -1
- package/web-dist/assets/classDiagram-VBA2DB6C-DixDm16f.js +0 -1
- package/web-dist/assets/classDiagram-v2-RAHNMMFH-DixDm16f.js +0 -1
- package/web-dist/assets/clone-DEDCKaxV.js +0 -1
- package/web-dist/assets/stateDiagram-v2-FVOUBMTO-Bdpt0e9f.js +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* noVNC general CSS constant variables
|
|
3
|
+
* Copyright (C) 2025 The noVNC authors
|
|
4
|
+
* noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
|
|
5
|
+
* This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* ---------- COLORS ----------- */
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
--novnc-grey: rgb(128, 128, 128);
|
|
12
|
+
--novnc-lightgrey: rgb(192, 192, 192);
|
|
13
|
+
--novnc-darkgrey: rgb(92, 92, 92);
|
|
14
|
+
|
|
15
|
+
/* Transparent to make button colors adapt to the background */
|
|
16
|
+
--novnc-buttongrey: rgba(192, 192, 192, 0.5);
|
|
17
|
+
|
|
18
|
+
--novnc-blue: rgb(110, 132, 163);
|
|
19
|
+
--novnc-lightblue: rgb(74, 144, 217);
|
|
20
|
+
--novnc-darkblue: rgb(83, 99, 122);
|
|
21
|
+
|
|
22
|
+
--novnc-green: rgb(0, 128, 0);
|
|
23
|
+
--novnc-yellow: rgb(255, 255, 0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* ------ MISC PROPERTIES ------ */
|
|
27
|
+
|
|
28
|
+
:root {
|
|
29
|
+
--input-xpadding: 1em;
|
|
30
|
+
}
|
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* noVNC general input element CSS
|
|
3
|
+
* Copyright (C) 2025 The noVNC authors
|
|
4
|
+
* noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
|
|
5
|
+
* This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* ------- SHARED BETWEEN INPUT ELEMENTS -------- */
|
|
9
|
+
|
|
10
|
+
input,
|
|
11
|
+
textarea,
|
|
12
|
+
button,
|
|
13
|
+
select,
|
|
14
|
+
input::file-selector-button {
|
|
15
|
+
padding: 0.5em var(--input-xpadding);
|
|
16
|
+
border-radius: 6px;
|
|
17
|
+
appearance: none;
|
|
18
|
+
text-overflow: ellipsis;
|
|
19
|
+
|
|
20
|
+
/* Respect standard font settings */
|
|
21
|
+
font: inherit;
|
|
22
|
+
line-height: 1.6;
|
|
23
|
+
}
|
|
24
|
+
input:disabled,
|
|
25
|
+
textarea:disabled,
|
|
26
|
+
button:disabled,
|
|
27
|
+
select:disabled,
|
|
28
|
+
label[disabled] {
|
|
29
|
+
opacity: 0.4;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
input:focus-visible,
|
|
33
|
+
textarea:focus-visible,
|
|
34
|
+
button:focus-visible,
|
|
35
|
+
select:focus-visible,
|
|
36
|
+
input:focus-visible::file-selector-button {
|
|
37
|
+
outline: 2px solid var(--novnc-lightblue);
|
|
38
|
+
outline-offset: 1px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* ------- TEXT INPUT -------- */
|
|
42
|
+
|
|
43
|
+
input:not([type]),
|
|
44
|
+
input[type=date],
|
|
45
|
+
input[type=datetime-local],
|
|
46
|
+
input[type=email],
|
|
47
|
+
input[type=month],
|
|
48
|
+
input[type=number],
|
|
49
|
+
input[type=password],
|
|
50
|
+
input[type=search],
|
|
51
|
+
input[type=tel],
|
|
52
|
+
input[type=text],
|
|
53
|
+
input[type=time],
|
|
54
|
+
input[type=url],
|
|
55
|
+
input[type=week],
|
|
56
|
+
textarea {
|
|
57
|
+
border: 1px solid var(--novnc-lightgrey);
|
|
58
|
+
/* Account for borders on text inputs, buttons dont have borders */
|
|
59
|
+
padding: calc(0.5em - 1px) var(--input-xpadding);
|
|
60
|
+
}
|
|
61
|
+
input:not([type]):focus-visible,
|
|
62
|
+
input[type=date]:focus-visible,
|
|
63
|
+
input[type=datetime-local]:focus-visible,
|
|
64
|
+
input[type=email]:focus-visible,
|
|
65
|
+
input[type=month]:focus-visible,
|
|
66
|
+
input[type=number]:focus-visible,
|
|
67
|
+
input[type=password]:focus-visible,
|
|
68
|
+
input[type=search]:focus-visible,
|
|
69
|
+
input[type=tel]:focus-visible,
|
|
70
|
+
input[type=text]:focus-visible,
|
|
71
|
+
input[type=time]:focus-visible,
|
|
72
|
+
input[type=url]:focus-visible,
|
|
73
|
+
input[type=week]:focus-visible,
|
|
74
|
+
textarea:focus-visible {
|
|
75
|
+
outline-offset: -1px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
textarea {
|
|
79
|
+
margin: unset; /* Remove Firefox's built in margin */
|
|
80
|
+
/* Prevent layout from shifting when scrollbars show */
|
|
81
|
+
scrollbar-gutter: stable;
|
|
82
|
+
/* Make textareas show at minimum one line. This does not work when
|
|
83
|
+
using box-sizing border-box, in which case, vertical padding and
|
|
84
|
+
border width needs to be taken into account. */
|
|
85
|
+
min-height: 1lh;
|
|
86
|
+
vertical-align: baseline; /* Firefox gives "text-bottom" by default */
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* ------- NUMBER PICKERS ------- */
|
|
90
|
+
|
|
91
|
+
/* We can't style the number spinner buttons:
|
|
92
|
+
https://github.com/w3c/csswg-drafts/issues/8777 */
|
|
93
|
+
input[type=number]::-webkit-inner-spin-button,
|
|
94
|
+
input[type=number]::-webkit-outer-spin-button {
|
|
95
|
+
/* Get rid of increase/decrease buttons in WebKit */
|
|
96
|
+
appearance: none;
|
|
97
|
+
}
|
|
98
|
+
input[type=number] {
|
|
99
|
+
/* Get rid of increase/decrease buttons in Firefox */
|
|
100
|
+
appearance: textfield;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* ------- BUTTON ACTIVATIONS -------- */
|
|
104
|
+
|
|
105
|
+
/* A color overlay that depends on the activation level. The level can then be
|
|
106
|
+
set for different states on an element, for example hover and click on a
|
|
107
|
+
<button>. */
|
|
108
|
+
input, button, select, option,
|
|
109
|
+
input::file-selector-button,
|
|
110
|
+
.button-activations {
|
|
111
|
+
--button-activation-level: 0;
|
|
112
|
+
/* Note that CSS variables aren't functions, beware when inheriting */
|
|
113
|
+
--button-activation-alpha: calc(0.08 * var(--button-activation-level));
|
|
114
|
+
/* FIXME: We want the image() function instead of the linear-gradient()
|
|
115
|
+
function below. But it's not supported in the browsers yet. */
|
|
116
|
+
--button-activation-overlay:
|
|
117
|
+
linear-gradient(rgba(0, 0, 0, var(--button-activation-alpha))
|
|
118
|
+
100%, transparent);
|
|
119
|
+
--button-activation-overlay-light:
|
|
120
|
+
linear-gradient(rgba(255, 255, 255, calc(0.23 * var(--button-activation-level)))
|
|
121
|
+
100%, transparent);
|
|
122
|
+
}
|
|
123
|
+
.button-activations {
|
|
124
|
+
background-image: var(--button-activation-overlay);
|
|
125
|
+
|
|
126
|
+
/* Disable Chrome's touch tap highlight to avoid conflicts with overlay */
|
|
127
|
+
-webkit-tap-highlight-color: transparent;
|
|
128
|
+
}
|
|
129
|
+
/* When we want the light overlay on activations instead.
|
|
130
|
+
This is best used on elements with darker backgrounds. */
|
|
131
|
+
.button-activations.light-overlay {
|
|
132
|
+
background-image: var(--button-activation-overlay-light);
|
|
133
|
+
/* Can't use the normal blend mode since that gives washed out colors. */
|
|
134
|
+
/* FIXME: For elements with these activation overlays we'd like only
|
|
135
|
+
the luminosity to change. The proprty "background-blend-mode" set
|
|
136
|
+
to "luminosity" sounds good, but it doesn't work as intended,
|
|
137
|
+
see: https://bugzilla.mozilla.org/show_bug.cgi?id=1806417 */
|
|
138
|
+
background-blend-mode: overlay;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
input:hover, button:hover, select:hover, option:hover,
|
|
142
|
+
input::file-selector-button:hover,
|
|
143
|
+
.button-activations:hover {
|
|
144
|
+
--button-activation-level: 1;
|
|
145
|
+
}
|
|
146
|
+
/* Unfortunately we have to disable the :hover effect on touch devices,
|
|
147
|
+
otherwise the style lingers after tapping the button. */
|
|
148
|
+
@media (any-pointer: coarse) {
|
|
149
|
+
input:hover, button:hover, select:hover, option:hover,
|
|
150
|
+
input::file-selector-button:hover,
|
|
151
|
+
.button-activations:hover {
|
|
152
|
+
--button-activation-level: 0;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
input:active, button:active, select:active, option:active,
|
|
156
|
+
input::file-selector-button:active,
|
|
157
|
+
.button-activations:active {
|
|
158
|
+
--button-activation-level: 2;
|
|
159
|
+
}
|
|
160
|
+
input:disabled, button:disabled, select:disabled, select:disabled option,
|
|
161
|
+
input:disabled::file-selector-button,
|
|
162
|
+
.button-activations:disabled {
|
|
163
|
+
--button-activation-level: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* ------- BUTTONS -------- */
|
|
167
|
+
|
|
168
|
+
input[type=button],
|
|
169
|
+
input[type=color],
|
|
170
|
+
input[type=image],
|
|
171
|
+
input[type=reset],
|
|
172
|
+
input[type=submit],
|
|
173
|
+
input::file-selector-button,
|
|
174
|
+
button,
|
|
175
|
+
select {
|
|
176
|
+
min-width: 8em;
|
|
177
|
+
border: none;
|
|
178
|
+
color: black;
|
|
179
|
+
font-weight: bold;
|
|
180
|
+
background-color: var(--novnc-buttongrey);
|
|
181
|
+
background-image: var(--button-activation-overlay);
|
|
182
|
+
cursor: pointer;
|
|
183
|
+
/* Disable Chrome's touch tap highlight */
|
|
184
|
+
-webkit-tap-highlight-color: transparent;
|
|
185
|
+
}
|
|
186
|
+
input[type=button]:disabled,
|
|
187
|
+
input[type=color]:disabled,
|
|
188
|
+
input[type=image]:disabled,
|
|
189
|
+
input[type=reset]:disabled,
|
|
190
|
+
input[type=submit]:disabled,
|
|
191
|
+
input:disabled::file-selector-button,
|
|
192
|
+
button:disabled,
|
|
193
|
+
select:disabled {
|
|
194
|
+
/* See Firefox bug:
|
|
195
|
+
https://bugzilla.mozilla.org/show_bug.cgi?id=1798304 */
|
|
196
|
+
cursor: default;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
input[type=button],
|
|
200
|
+
input[type=color],
|
|
201
|
+
input[type=reset],
|
|
202
|
+
input[type=submit] {
|
|
203
|
+
/* Workaround for text-overflow bugs in Firefox and Chromium:
|
|
204
|
+
https://bugzilla.mozilla.org/show_bug.cgi?id=1800077
|
|
205
|
+
https://bugs.chromium.org/p/chromium/issues/detail?id=1383144 */
|
|
206
|
+
overflow: clip;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* ------- COLOR PICKERS ------- */
|
|
210
|
+
|
|
211
|
+
input[type=color] {
|
|
212
|
+
min-width: unset;
|
|
213
|
+
box-sizing: content-box;
|
|
214
|
+
width: 1.4em;
|
|
215
|
+
height: 1.4em;
|
|
216
|
+
}
|
|
217
|
+
input[type=color]::-webkit-color-swatch-wrapper {
|
|
218
|
+
padding: 0;
|
|
219
|
+
}
|
|
220
|
+
/* -webkit-color-swatch & -moz-color-swatch cant be in a selector list:
|
|
221
|
+
https://bugs.chromium.org/p/chromium/issues/detail?id=1154623 */
|
|
222
|
+
input[type=color]::-webkit-color-swatch {
|
|
223
|
+
border: none;
|
|
224
|
+
border-radius: 6px;
|
|
225
|
+
}
|
|
226
|
+
input[type=color]::-moz-color-swatch {
|
|
227
|
+
border: none;
|
|
228
|
+
border-radius: 6px;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* -- SHARED BETWEEN CHECKBOXES, RADIOBUTTONS AND THE TOGGLE CLASS -- */
|
|
232
|
+
|
|
233
|
+
input[type=radio],
|
|
234
|
+
input[type=checkbox] {
|
|
235
|
+
display: inline-flex;
|
|
236
|
+
justify-content: center;
|
|
237
|
+
align-items: center;
|
|
238
|
+
background-color: var(--novnc-buttongrey);
|
|
239
|
+
background-image: var(--button-activation-overlay);
|
|
240
|
+
/* Disable Chrome's touch tap highlight to avoid conflicts with overlay */
|
|
241
|
+
-webkit-tap-highlight-color: transparent;
|
|
242
|
+
width: 16px;
|
|
243
|
+
--checkradio-height: 16px;
|
|
244
|
+
height: var(--checkradio-height);
|
|
245
|
+
padding: 0;
|
|
246
|
+
margin: 0 6px 0 0;
|
|
247
|
+
/* Don't have transitions for outline in order to be consistent
|
|
248
|
+
with other elements */
|
|
249
|
+
transition: all 0.2s, outline-color 0s, outline-offset 0s;
|
|
250
|
+
|
|
251
|
+
/* A transparent outline in order to work around a graphical clipping issue
|
|
252
|
+
in WebKit. See bug: https://bugs.webkit.org/show_bug.cgi?id=256003 */
|
|
253
|
+
outline: 1px solid transparent;
|
|
254
|
+
position: relative; /* Since ::before & ::after are absolute positioned */
|
|
255
|
+
|
|
256
|
+
/* We want to align with the middle of capital letters, this requires
|
|
257
|
+
a workaround. The default behavior is to align the bottom of the element
|
|
258
|
+
on top of the text baseline, this is too far up.
|
|
259
|
+
We want to push the element down half the difference in height between
|
|
260
|
+
it and a capital X. In our font, the height of a capital "X" is 0.698em.
|
|
261
|
+
*/
|
|
262
|
+
vertical-align: calc(0px - (var(--checkradio-height) - 0.698em) / 2);
|
|
263
|
+
/* FIXME: Could write 1cap instead of 0.698em, but it's only supported in
|
|
264
|
+
Firefox as of 2023 */
|
|
265
|
+
/* FIXME: We probably want to use round() here, see bug 8148 */
|
|
266
|
+
}
|
|
267
|
+
input[type=radio]:focus-visible,
|
|
268
|
+
input[type=checkbox]:focus-visible {
|
|
269
|
+
outline-color: var(--novnc-lightblue);
|
|
270
|
+
}
|
|
271
|
+
input[type=checkbox]::before,
|
|
272
|
+
input[type=checkbox]:not(.toggle)::after,
|
|
273
|
+
input[type=radio]::before,
|
|
274
|
+
input[type=radio]::after {
|
|
275
|
+
content: "";
|
|
276
|
+
display: block; /* width & height doesn't work on inline elements */
|
|
277
|
+
transition: inherit;
|
|
278
|
+
/* Let's prevent the pseudo-elements from taking up layout space so that
|
|
279
|
+
the ::before and ::after pseudo-elements can be in the same place. This
|
|
280
|
+
is also required for vertical-align: baseline to work like we want it to
|
|
281
|
+
on radio/checkboxes. If the pseudo-elements take up layout space, the
|
|
282
|
+
baseline of text inside them will be used instead. */
|
|
283
|
+
position: absolute;
|
|
284
|
+
}
|
|
285
|
+
input[type=checkbox]:not(.toggle)::after,
|
|
286
|
+
input[type=radio]::after {
|
|
287
|
+
width: 10px;
|
|
288
|
+
height: 2px;
|
|
289
|
+
background-color: transparent;
|
|
290
|
+
border-radius: 2px;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* ------- CHECKBOXES ------- */
|
|
294
|
+
|
|
295
|
+
input[type=checkbox]:not(.toggle) {
|
|
296
|
+
border-radius: 4px;
|
|
297
|
+
}
|
|
298
|
+
input[type=checkbox]:not(.toggle):checked,
|
|
299
|
+
input[type=checkbox]:not(.toggle):indeterminate {
|
|
300
|
+
background-color: var(--novnc-blue);
|
|
301
|
+
background-image: var(--button-activation-overlay-light);
|
|
302
|
+
background-blend-mode: overlay;
|
|
303
|
+
}
|
|
304
|
+
input[type=checkbox]:not(.toggle)::before {
|
|
305
|
+
width: 25%;
|
|
306
|
+
height: 55%;
|
|
307
|
+
border-style: solid;
|
|
308
|
+
border-color: transparent;
|
|
309
|
+
border-width: 0 2px 2px 0;
|
|
310
|
+
border-radius: 1px;
|
|
311
|
+
transform: translateY(-1px) rotate(35deg);
|
|
312
|
+
}
|
|
313
|
+
input[type=checkbox]:not(.toggle):checked::before {
|
|
314
|
+
border-color: white;
|
|
315
|
+
}
|
|
316
|
+
input[type=checkbox]:not(.toggle):indeterminate::after {
|
|
317
|
+
background-color: white;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* ------- RADIO BUTTONS ------- */
|
|
321
|
+
|
|
322
|
+
input[type=radio] {
|
|
323
|
+
border-radius: 50%;
|
|
324
|
+
border: 1px solid transparent; /* To ensure a smooth transition */
|
|
325
|
+
}
|
|
326
|
+
input[type=radio]:checked {
|
|
327
|
+
border: 4px solid var(--novnc-blue);
|
|
328
|
+
background-color: white;
|
|
329
|
+
/* button-activation-overlay should be removed from the radio
|
|
330
|
+
element to not interfere with button-activation-overlay-light
|
|
331
|
+
that is set on the ::before element. */
|
|
332
|
+
background-image: none;
|
|
333
|
+
}
|
|
334
|
+
input[type=radio]::before {
|
|
335
|
+
width: inherit;
|
|
336
|
+
height: inherit;
|
|
337
|
+
border-radius: inherit;
|
|
338
|
+
/* We can achieve the highlight overlay effect on border colors by
|
|
339
|
+
setting button-activation-overlay-light on an element that stays
|
|
340
|
+
on top (z-axis) of the element with a border. */
|
|
341
|
+
background-image: var(--button-activation-overlay-light);
|
|
342
|
+
mix-blend-mode: overlay;
|
|
343
|
+
opacity: 0;
|
|
344
|
+
}
|
|
345
|
+
input[type=radio]:checked::before {
|
|
346
|
+
opacity: 1;
|
|
347
|
+
}
|
|
348
|
+
input[type=radio]:indeterminate::after {
|
|
349
|
+
background-color: black;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/* ------- TOGGLE SWITCHES ------- */
|
|
353
|
+
|
|
354
|
+
/* These are meant to be used instead of checkboxes in some cases. If all of
|
|
355
|
+
the following critera are true you should use a toggle switch:
|
|
356
|
+
|
|
357
|
+
* The choice is a simple ON/OFF or ENABLE/DISABLE
|
|
358
|
+
* The choice doesn't give the feeling of "I agree" or "I confirm"
|
|
359
|
+
* There are not multiple related & grouped options
|
|
360
|
+
*/
|
|
361
|
+
|
|
362
|
+
input[type=checkbox].toggle {
|
|
363
|
+
display: inline-block;
|
|
364
|
+
--checkradio-height: 18px; /* Height value used in calc, see above */
|
|
365
|
+
width: 31px;
|
|
366
|
+
cursor: pointer;
|
|
367
|
+
user-select: none;
|
|
368
|
+
-webkit-user-select: none;
|
|
369
|
+
border-radius: 9px;
|
|
370
|
+
}
|
|
371
|
+
input[type=checkbox].toggle:disabled {
|
|
372
|
+
cursor: default;
|
|
373
|
+
}
|
|
374
|
+
input[type=checkbox].toggle:indeterminate {
|
|
375
|
+
background-color: var(--novnc-buttongrey);
|
|
376
|
+
background-image: var(--button-activation-overlay);
|
|
377
|
+
}
|
|
378
|
+
input[type=checkbox].toggle:checked {
|
|
379
|
+
background-color: var(--novnc-blue);
|
|
380
|
+
background-image: var(--button-activation-overlay-light);
|
|
381
|
+
background-blend-mode: overlay;
|
|
382
|
+
}
|
|
383
|
+
input[type=checkbox].toggle::before {
|
|
384
|
+
--circle-diameter: 10px;
|
|
385
|
+
--circle-offset: 4px;
|
|
386
|
+
width: var(--circle-diameter);
|
|
387
|
+
height: var(--circle-diameter);
|
|
388
|
+
top: var(--circle-offset);
|
|
389
|
+
left: var(--circle-offset);
|
|
390
|
+
background: white;
|
|
391
|
+
border-radius: 6px;
|
|
392
|
+
}
|
|
393
|
+
input[type=checkbox].toggle:checked::before {
|
|
394
|
+
left: calc(100% - var(--circle-offset) - var(--circle-diameter));
|
|
395
|
+
}
|
|
396
|
+
input[type=checkbox].toggle:indeterminate::before {
|
|
397
|
+
left: calc(50% - var(--circle-diameter) / 2);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/* ------- RANGE SLIDERS ------- */
|
|
401
|
+
|
|
402
|
+
input[type=range] {
|
|
403
|
+
border: unset;
|
|
404
|
+
border-radius: 8px;
|
|
405
|
+
height: 15px;
|
|
406
|
+
padding: 0;
|
|
407
|
+
background: transparent;
|
|
408
|
+
/* Needed to get properly rounded corners on -moz-range-progress
|
|
409
|
+
when the thumb is all the way to the right. Without overflow
|
|
410
|
+
hidden, the pointy edges of the progress track shows to the
|
|
411
|
+
right of the thumb. */
|
|
412
|
+
overflow: hidden;
|
|
413
|
+
}
|
|
414
|
+
@supports selector(::-webkit-slider-thumb) {
|
|
415
|
+
input[type=range] {
|
|
416
|
+
/* Needs a fixed width to match clip-path */
|
|
417
|
+
width: 125px;
|
|
418
|
+
/* overflow: hidden is not ideal for hiding the left part of the box
|
|
419
|
+
shadow of -webkit-slider-thumb since it doesn't match the smaller
|
|
420
|
+
border-radius of the progress track. The below clip-path has two
|
|
421
|
+
circular sides to make the ends of the track have correctly rounded
|
|
422
|
+
corners. The clip path shape looks something like this:
|
|
423
|
+
|
|
424
|
+
+-------------------------------+
|
|
425
|
+
/---| |---\
|
|
426
|
+
| |
|
|
427
|
+
\---| |---/
|
|
428
|
+
+-------------------------------+
|
|
429
|
+
|
|
430
|
+
The larger middle part of the clip path is made to have room for the
|
|
431
|
+
thumb. By using margins on the track, we prevent the thumb from
|
|
432
|
+
touching the ends of the track.
|
|
433
|
+
*/
|
|
434
|
+
clip-path: path(' \
|
|
435
|
+
M 4.5 3 \
|
|
436
|
+
L 4.5 0 \
|
|
437
|
+
L 120.5 0 \
|
|
438
|
+
L 120.5 3 \
|
|
439
|
+
A 1 1 0 0 1 120.5 12 \
|
|
440
|
+
L 120.5 15 \
|
|
441
|
+
L 4.5 15 \
|
|
442
|
+
L 4.5 12 \
|
|
443
|
+
A 1 1 0 0 1 4.5 3 \
|
|
444
|
+
');
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
input[type=range]:hover {
|
|
448
|
+
cursor: grab;
|
|
449
|
+
}
|
|
450
|
+
input[type=range]:active {
|
|
451
|
+
cursor: grabbing;
|
|
452
|
+
}
|
|
453
|
+
input[type=range]:disabled {
|
|
454
|
+
cursor: default;
|
|
455
|
+
}
|
|
456
|
+
input[type=range]:focus-visible {
|
|
457
|
+
clip-path: none; /* Otherwise it hides the outline */
|
|
458
|
+
}
|
|
459
|
+
/* -webkit-slider.. & -moz-range.. cant be in selector lists:
|
|
460
|
+
https://bugs.chromium.org/p/chromium/issues/detail?id=1154623 */
|
|
461
|
+
input[type=range]::-webkit-slider-runnable-track {
|
|
462
|
+
background-color: var(--novnc-buttongrey);
|
|
463
|
+
height: 7px;
|
|
464
|
+
border-radius: 4px;
|
|
465
|
+
margin: 0 3px;
|
|
466
|
+
}
|
|
467
|
+
input[type=range]::-moz-range-track {
|
|
468
|
+
background-color: var(--novnc-buttongrey);
|
|
469
|
+
height: 7px;
|
|
470
|
+
border-radius: 4px;
|
|
471
|
+
}
|
|
472
|
+
input[type=range]::-moz-range-progress {
|
|
473
|
+
background-color: var(--novnc-blue);
|
|
474
|
+
height: 9px;
|
|
475
|
+
/* Needs rounded corners only on the left side. Otherwise the rounding of
|
|
476
|
+
the progress track starts before the thumb, when the thumb is close to
|
|
477
|
+
the left edge. */
|
|
478
|
+
border-radius: 5px 0 0 5px;
|
|
479
|
+
}
|
|
480
|
+
input[type=range]::-webkit-slider-thumb {
|
|
481
|
+
appearance: none;
|
|
482
|
+
width: 15px;
|
|
483
|
+
height: 15px;
|
|
484
|
+
border-radius: 50%;
|
|
485
|
+
background-color: white;
|
|
486
|
+
background-image: var(--button-activation-overlay);
|
|
487
|
+
/* Disable Chrome's touch tap highlight to avoid conflicts with overlay */
|
|
488
|
+
-webkit-tap-highlight-color: transparent;
|
|
489
|
+
border: 3px solid var(--novnc-blue);
|
|
490
|
+
margin-top: -4px; /* (track height / 2) - (thumb height /2) */
|
|
491
|
+
|
|
492
|
+
/* Since there is no way to style the left part of the range track in
|
|
493
|
+
webkit, we add a large shadow (1000px wide) to the left of the thumb and
|
|
494
|
+
then crop it with a clip-path shaped like this:
|
|
495
|
+
___
|
|
496
|
+
+-------------------/ \
|
|
497
|
+
| progress |Thumb|
|
|
498
|
+
+-------------------\ ___ /
|
|
499
|
+
|
|
500
|
+
The large left part of the shadow is clipped by another clip-path on on
|
|
501
|
+
the main range input element. */
|
|
502
|
+
/* FIXME: We can remove the box shadow workaround when this is standardized:
|
|
503
|
+
https://github.com/w3c/csswg-drafts/issues/4410 */
|
|
504
|
+
|
|
505
|
+
box-shadow: calc(-100vw - 8px) 0 0 100vw var(--novnc-blue);
|
|
506
|
+
clip-path: path(' \
|
|
507
|
+
M -1000 3 \
|
|
508
|
+
L 3 3 \
|
|
509
|
+
L 15 7.5 \
|
|
510
|
+
A 1 1 0 0 1 0 7.5 \
|
|
511
|
+
A 1 1 0 0 1 15 7.5 \
|
|
512
|
+
L 3 12 \
|
|
513
|
+
L -1000 12 Z \
|
|
514
|
+
');
|
|
515
|
+
}
|
|
516
|
+
input[type=range]::-moz-range-thumb {
|
|
517
|
+
appearance: none;
|
|
518
|
+
width: 15px;
|
|
519
|
+
height: 15px;
|
|
520
|
+
border-radius: 50%;
|
|
521
|
+
box-sizing: border-box;
|
|
522
|
+
background-color: white;
|
|
523
|
+
background-image: var(--button-activation-overlay);
|
|
524
|
+
border: 3px solid var(--novnc-blue);
|
|
525
|
+
margin-top: -7px;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/* ------- FILE CHOOSERS ------- */
|
|
529
|
+
|
|
530
|
+
input[type=file] {
|
|
531
|
+
background-image: none;
|
|
532
|
+
border: none;
|
|
533
|
+
}
|
|
534
|
+
input::file-selector-button {
|
|
535
|
+
margin-right: 6px;
|
|
536
|
+
}
|
|
537
|
+
input[type=file]:focus-visible {
|
|
538
|
+
outline: none; /* We outline the button instead of the entire element */
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/* ------- SELECT BUTTONS ------- */
|
|
542
|
+
|
|
543
|
+
select {
|
|
544
|
+
--select-arrow: url('data:image/svg+xml;utf8, \
|
|
545
|
+
<svg width="11" height="6" version="1.1" viewBox="0 0 11 6" \
|
|
546
|
+
xmlns="http://www.w3.org/2000/svg"> \
|
|
547
|
+
<path d="m10.5.5-5 5-5-5" fill="none" \
|
|
548
|
+
stroke="black" stroke-width="1.5" \
|
|
549
|
+
stroke-linecap="round" stroke-linejoin="round"/> \
|
|
550
|
+
</svg>');
|
|
551
|
+
|
|
552
|
+
/* FIXME: A bug in Firefox, requires a workaround for the background:
|
|
553
|
+
https://bugzilla.mozilla.org/show_bug.cgi?id=1810958 */
|
|
554
|
+
/* The dropdown list will show the select element's background above and
|
|
555
|
+
below the options in Firefox. We want the entire dropdown to be white. */
|
|
556
|
+
background-color: white;
|
|
557
|
+
/* However, we don't want the select element to actually show a white
|
|
558
|
+
background, so let's place a gradient above it with the color we want. */
|
|
559
|
+
--grey-background: linear-gradient(var(--novnc-buttongrey) 100%,
|
|
560
|
+
transparent);
|
|
561
|
+
background-image:
|
|
562
|
+
var(--select-arrow),
|
|
563
|
+
var(--button-activation-overlay),
|
|
564
|
+
var(--grey-background);
|
|
565
|
+
background-position: calc(100% - var(--input-xpadding)), left top, left top;
|
|
566
|
+
background-repeat: no-repeat;
|
|
567
|
+
padding-right: calc(2*var(--input-xpadding) + 11px);
|
|
568
|
+
overflow: auto;
|
|
569
|
+
}
|
|
570
|
+
/* FIXME: :active isn't set when the <select> is opened in Firefox:
|
|
571
|
+
https://bugzilla.mozilla.org/show_bug.cgi?id=1805406 */
|
|
572
|
+
select:active {
|
|
573
|
+
/* Rotated arrow */
|
|
574
|
+
background-image: url('data:image/svg+xml;utf8, \
|
|
575
|
+
<svg width="11" height="6" version="1.1" viewBox="0 0 11 6" \
|
|
576
|
+
xmlns="http://www.w3.org/2000/svg" transform="rotate(180)"> \
|
|
577
|
+
<path d="m10.5.5-5 5-5-5" fill="none" \
|
|
578
|
+
stroke="black" stroke-width="1.5" \
|
|
579
|
+
stroke-linecap="round" stroke-linejoin="round"/> \
|
|
580
|
+
</svg>'),
|
|
581
|
+
var(--button-activation-overlay),
|
|
582
|
+
var(--grey-background);
|
|
583
|
+
}
|
|
584
|
+
select:disabled {
|
|
585
|
+
background-image:
|
|
586
|
+
var(--select-arrow),
|
|
587
|
+
var(--grey-background);
|
|
588
|
+
}
|
|
589
|
+
/* Note that styling for <option> doesn't work in all browsers
|
|
590
|
+
since its often drawn directly by the OS. We are generally very
|
|
591
|
+
limited in what we can change here. */
|
|
592
|
+
option {
|
|
593
|
+
/* Prevent Chrome from inheriting background-color from the <select> */
|
|
594
|
+
background-color: white;
|
|
595
|
+
color: black;
|
|
596
|
+
font-weight: normal;
|
|
597
|
+
background-image: var(--button-activation-overlay);
|
|
598
|
+
}
|
|
599
|
+
option:checked {
|
|
600
|
+
background-color: var(--novnc-lightgrey);
|
|
601
|
+
}
|
|
602
|
+
/* Change the look when the <select> isn't used as a dropdown. When "size"
|
|
603
|
+
or "multiple" are set, these elements behaves more like lists. */
|
|
604
|
+
select[size]:not([size="1"]), select[multiple] {
|
|
605
|
+
background-color: white;
|
|
606
|
+
background-image: unset; /* Don't show the arrow and other gradients */
|
|
607
|
+
border: 1px solid var(--novnc-lightgrey);
|
|
608
|
+
padding: 0;
|
|
609
|
+
font-weight: normal; /* Without this, options get bold font in WebKit. */
|
|
610
|
+
|
|
611
|
+
/* As an exception to the "list"-look, multi-selects in Chrome on Android,
|
|
612
|
+
and Safari on iOS, are unfortunately designed to be shown as a single
|
|
613
|
+
line. We can mitigate this inconsistency by at least fixing the height
|
|
614
|
+
here. By setting a min-height that matches other input elements, it
|
|
615
|
+
doesn't look too much out of place:
|
|
616
|
+
(1px border * 2) + (6.5px padding * 2) + 24px line-height = 39px */
|
|
617
|
+
min-height: 39px;
|
|
618
|
+
}
|
|
619
|
+
select[size]:not([size="1"]):focus-visible,
|
|
620
|
+
select[multiple]:focus-visible {
|
|
621
|
+
/* Text input style focus-visible highlight */
|
|
622
|
+
outline-offset: -1px;
|
|
623
|
+
}
|
|
624
|
+
select[size]:not([size="1"]) option, select[multiple] option {
|
|
625
|
+
overflow: hidden;
|
|
626
|
+
text-overflow: ellipsis;
|
|
627
|
+
padding: 4px var(--input-xpadding);
|
|
628
|
+
}
|