_keyboard.scss
ASCII text
1/* On-screen Keyboard */ 2 3@use "../../../../theme"; 4@use "../../../../theme-color"; 5@use "../../gnome-shell"; 6@use "../../drawing"; 7 8// draw keys using button function 9#keyboard { 10background-color: theme-color.$scrim-alt; 11box-shadow: none; 12 13.page-indicator { 14padding: 4px; 15 16.page-indicator-icon { 17width: 8px; 18height: 8px; 19} 20} 21} 22 23// the container for individual keys 24@if gnome-shell.$version >= 3.28 { 25.key-container { 26padding: 4px; 27spacing: 4px; 28} 29} @else { 30.keyboard-layout { 31spacing: 10px; 32padding: 10px; 33} 34 35.keyboard-row { 36spacing: 15px; 37} 38} 39 40// the keys 41.keyboard-key { 42min-height: 1.2em; 43min-width: 1.2em; 44font-size: 2em; 45font-weight: 500; 46border: 0; 47border-width: 0; 48border-style: none; 49border-radius: theme.$corner-radius; 50 51&, 52// non-character keys 53&.default-key { 54@include drawing.button(normal); 55 56&:focus { 57@include drawing.button(focus); 58} 59 60&:hover, 61&:checked { 62@include drawing.button(hover); 63} 64 65&:active { 66@include drawing.button(active); 67} 68} 69 70&:grayed { //FIXMEy 71border-color: transparent; 72background-color: theme-color.$scrim-alt; 73color: theme-color.$on-scrim-alt; 74} 75 76// enter key is suggested-action 77&.enter-key { 78@include drawing.button(normal, $c: theme-color.$primary, $tc: theme-color.$on-primary); 79 80&:hover, 81&:checked { 82@include drawing.button(hover, $c: theme-color.$primary, $tc: theme-color.$on-primary); 83} 84 85&:active { 86@include drawing.button(active, $c: theme-color.$primary, $tc: theme-color.$on-primary); 87} 88} 89 90@if gnome-shell.$version >= 3.36 { 91&.shift-key-uppercase { 92color: theme-color.$primary; 93} 94 95StIcon { 96icon-size: 32px; 97} 98} @else { 99// size of the icon asset 100&.default-key { 101background-size: 24px; 102} 103 104// key assets 105&.enter-key { 106background-image: url("assets/key-enter.svg"); 107} 108 109&.shift-key-lowercase { 110background-image: url("assets/key-shift.svg"); 111} 112 113&.shift-key-uppercase { 114background-image: url("assets/key-shift-uppercase.svg"); 115} 116 117&.shift-key-uppercase:latched { 118background-image: url("assets/key-shift-latched-uppercase.svg"); 119} 120 121&.hide-key { 122background-image: url("assets/key-hide.svg"); 123} 124 125&.layout-key { 126background-image: url("assets/key-layout.svg"); 127} 128} 129} 130 131// long press on a key popup 132.keyboard-subkeys { 133-boxpointer-gap: 5px; 134-arrow-base: 0; 135-arrow-rise: 0; 136-arrow-border-width: 0; 137-arrow-border-color: transparent; 138-arrow-border-radius: 0; 139-arrow-background-color: transparent; 140padding: 5px; 141border-radius: theme.$corner-radius; 142box-shadow: theme.$shadow-z4; 143background-color: theme-color.$surface-z8; 144color: theme-color.$on-surface; 145 146.keyboard-key { 147border-radius: theme.$corner-radius; 148 149@include drawing.button(flat-normal); 150 151&:focus { 152@include drawing.button(flat-focus); 153} 154 155&:hover, 156&:checked { 157@include drawing.button(flat-hover); 158} 159 160&:active { 161@include drawing.button(flat-active); 162} 163} 164} 165 166// emoji 167.emoji-page { 168.keyboard-key { 169border: 0; 170@include drawing.button(flat-normal, $tc: theme-color.$on-scrim-alt); 171 172&:focus { 173@include drawing.button(flat-focus, $tc: theme-color.$on-scrim-alt); 174} 175 176&:hover { 177@include drawing.button(flat-hover, $tc: theme-color.$on-scrim-alt); 178} 179 180&:active { 181@include drawing.button(flat-active, $tc: theme-color.$on-scrim-alt); 182} 183} 184} 185 186.emoji-panel { 187.keyboard-key:latched { 188border-color: transparent; 189background-color: theme-color.$primary; 190color: theme-color.$on-primary; 191} 192} 193 194// suggestions 195.word-suggestions { 196@include drawing.type(subtitle1); 197spacing: 12px; 198min-height: 20pt; 199} 200