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