blob: 8716258abf618cc46378622ffc9f2f6cdb60cbc4 [file] [log] [blame]
Nils Diewalda944fab2015-04-08 21:02:04 +00001@charset "utf-8";
Akron7636edf2025-11-04 12:44:53 +01002@use "../util";
3@use "../base/choose";
4@use "../base/colors";
5@use "../base/lengths";
Nils Diewalda944fab2015-04-08 21:02:04 +00006
Nils Diewald652e5f42015-05-10 18:11:45 +00007/**
8 * Rules for the Kalamar hint helper.
9 */
Uyen-Nhu Tran243fe732024-04-10 01:17:24 +020010
Nils Diewalda944fab2015-04-08 21:02:04 +000011ul.menu.hint {
Akron7e5afce2020-08-25 15:50:19 +020012 display: inline-block;
Nils Diewald2488d052015-04-09 21:46:02 +000013 white-space: normal;
Akron7e5afce2020-08-25 15:50:19 +020014 text-align: left;
15 max-width: 23em !important;
16 top: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +000017
18 > li:first-of-type {
19 border-top: {
Akron7e5afce2020-08-25 15:50:19 +020020 width: 1px;
21 left-radius: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +000022 right-radius: 0;
23 }
24 }
Nils Diewalda944fab2015-04-08 21:02:04 +000025}
26
Akron7e5afce2020-08-25 15:50:19 +020027// Alert bubble
Akron308db382016-05-30 22:34:07 +020028div.alert.hint {
Akron7e5afce2020-08-25 15:50:19 +020029 position: absolute;
Akron7636edf2025-11-04 12:44:53 +010030 background-color: colors.$alert-red;
31 color: colors.$nearly-white;
32 padding: lengths.$item-padding;
Akron7e5afce2020-08-25 15:50:19 +020033 margin-top: 8px;
Akron7636edf2025-11-04 12:44:53 +010034 box-shadow: choose.$choose-box-shadow;
Akron7e5afce2020-08-25 15:50:19 +020035 width: auto;
Akronbe2f9a02025-01-14 09:36:55 +010036 min-width: 20em;
Akron7e5afce2020-08-25 15:50:19 +020037 max-width: 23em !important;
38 transition: opacity 0.2s ease 0s;
39
Akron308db382016-05-30 22:34:07 +020040 border: {
Akron7636edf2025-11-04 12:44:53 +010041 radius: lengths.$standard-border-radius;
Akron308db382016-05-30 22:34:07 +020042 top-left-radius: 0;
43 }
Akron308db382016-05-30 22:34:07 +020044
Akron7e5afce2020-08-25 15:50:19 +020045 &::before {
46 position: absolute;
47 content: "";
48 display: block;
49 top: -12px;
50 left: 0;
51 width: 0;
52 white-space: normal;
53 border: {
54 width: 0 8px 12px 0;
55 style: solid;
Akron7636edf2025-11-04 12:44:53 +010056 color: colors.$alert-red transparent;
Akron7e5afce2020-08-25 15:50:19 +020057 }
Akron308db382016-05-30 22:34:07 +020058 }
59}
60
Akron7e5afce2020-08-25 15:50:19 +020061// Mirror element for the hint helper
Akron00cd4d12016-05-31 21:01:11 +020062.hint.mirror {
Akron7e5afce2020-08-25 15:50:19 +020063 position: absolute;
64 display: block;
65 left: 0;
66 top: 0;
67 z-index: 90;
Nils Diewalda944fab2015-04-08 21:02:04 +000068 white-space: pre-wrap;
Akron7e5afce2020-08-25 15:50:19 +020069 height: 0;
70
Nils Diewalda944fab2015-04-08 21:02:04 +000071 > span {
Akron7e5afce2020-08-25 15:50:19 +020072 opacity: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +000073 white-space: pre-wrap;
Akron7e5afce2020-08-25 15:50:19 +020074 overflow: hidden;
Akrondf2c97a2021-11-20 01:45:31 +010075 display: inline-block;
76 height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +000077 }
Akron7e5afce2020-08-25 15:50:19 +020078
Akron00cd4d12016-05-31 21:01:11 +020079 // TODO: Only in focus
Nils Diewalda944fab2015-04-08 21:02:04 +000080 > div {
Akron7e5afce2020-08-25 15:50:19 +020081 position: absolute;
82 display: block;
83 cursor: pointer;
Nils Diewald2488d052015-04-09 21:46:02 +000084 transition: left 0.2s ease 0s;
Akron7e5afce2020-08-25 15:50:19 +020085 top: 0;
86 left: 0;
Nils Diewald2488d052015-04-09 21:46:02 +000087 text-align: left;
Akron7e5afce2020-08-25 15:50:19 +020088 padding: 0;
Akron7636edf2025-11-04 12:44:53 +010089 border-top: 5px solid colors.$dark-orange;
Akron7e5afce2020-08-25 15:50:19 +020090 height: 10px;
91 width: 1.2em;
92
Nils Diewald2488d052015-04-09 21:46:02 +000093 &:hover:not(.active) {
Akron7636edf2025-11-04 12:44:53 +010094 border-top: 10px solid colors.$dark-orange;
Nils Diewalda944fab2015-04-08 21:02:04 +000095 }
Akron7e5afce2020-08-25 15:50:19 +020096
Nils Diewald2488d052015-04-09 21:46:02 +000097 &.active {
98 border-top-width: 0;
Akron7e5afce2020-08-25 15:50:19 +020099 height: 0;
100 width: 23em;
Nils Diewald2488d052015-04-09 21:46:02 +0000101 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000102 }
Akrondadd1d12021-11-12 16:20:28 +0100103}