askrobots / dbbasic-web-native
Public
100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.
danq9
Add canonical.html v1.0 - The single source of truth for usability standards
fb6e650
1 year ago
History
standards-overlay.css · 5.8 KB · 290 lines
| 1 | /** |
| 2 | * DBBasic Usability Standards Overlay CSS |
| 3 | * |
| 4 | * Styles for visual overlay system. |
| 5 | * Version: 1.0 |
| 6 | * Author: Dan Quellhorst / dbbasic.com |
| 7 | */ |
| 8 | |
| 9 | /* ========== OVERLAY CONTAINER ========== */ |
| 10 | .standards-overlay-container { |
| 11 | position: absolute; |
| 12 | top: 0; |
| 13 | left: 0; |
| 14 | width: 100%; |
| 15 | pointer-events: none; |
| 16 | z-index: 10000; |
| 17 | } |
| 18 | |
| 19 | .standards-overlay { |
| 20 | position: absolute; |
| 21 | top: 0; |
| 22 | left: 0; |
| 23 | width: 100%; |
| 24 | pointer-events: none; |
| 25 | } |
| 26 | |
| 27 | /* ========== ANNOTATIONS ========== */ |
| 28 | .standards-annotation { |
| 29 | font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; |
| 30 | -webkit-font-smoothing: antialiased; |
| 31 | -moz-osx-font-smoothing: grayscale; |
| 32 | } |
| 33 | |
| 34 | .annotation-title { |
| 35 | font-size: 14px; |
| 36 | font-weight: 700; |
| 37 | margin-bottom: 4px; |
| 38 | letter-spacing: 0.3px; |
| 39 | } |
| 40 | |
| 41 | .annotation-description { |
| 42 | font-size: 12px; |
| 43 | font-weight: 500; |
| 44 | opacity: 0.9; |
| 45 | line-height: 1.4; |
| 46 | } |
| 47 | |
| 48 | /* ========== GRID OVERLAY ========== */ |
| 49 | .grid-overlay .grid-container { |
| 50 | animation: fadeIn 0.3s ease-out; |
| 51 | } |
| 52 | |
| 53 | .grid-column { |
| 54 | transition: background 0.3s ease; |
| 55 | } |
| 56 | |
| 57 | /* ========== TOUCH ZONES OVERLAY ========== */ |
| 58 | .touch-zones-overlay .touch-zone { |
| 59 | animation: fadeIn 0.3s ease-out; |
| 60 | } |
| 61 | |
| 62 | .touch-zone.green-zone { |
| 63 | background: rgba(34, 197, 94, 0.1); |
| 64 | border-top: 2px dashed rgba(34, 197, 94, 0.5); |
| 65 | } |
| 66 | |
| 67 | .touch-zone.yellow-zone { |
| 68 | background: rgba(245, 158, 11, 0.1); |
| 69 | border-top: 2px dashed rgba(245, 158, 11, 0.5); |
| 70 | border-bottom: 2px dashed rgba(245, 158, 11, 0.5); |
| 71 | } |
| 72 | |
| 73 | .touch-zone.red-zone { |
| 74 | background: rgba(239, 68, 68, 0.1); |
| 75 | border-bottom: 2px dashed rgba(239, 68, 68, 0.5); |
| 76 | } |
| 77 | |
| 78 | /* ========== SPACING OVERLAY ========== */ |
| 79 | .spacing-overlay .spacing-indicator { |
| 80 | animation: fadeIn 0.3s ease-out; |
| 81 | } |
| 82 | |
| 83 | .spacing-label { |
| 84 | animation: pulse 2s ease-in-out infinite; |
| 85 | } |
| 86 | |
| 87 | /* ========== TOUCH TARGETS OVERLAY ========== */ |
| 88 | .touch-targets-overlay .touch-target-highlighter { |
| 89 | animation: fadeIn 0.3s ease-out; |
| 90 | transition: all 0.2s ease; |
| 91 | } |
| 92 | |
| 93 | .touch-target-highlighter:hover { |
| 94 | transform: scale(1.05); |
| 95 | } |
| 96 | |
| 97 | /* ========== CONTENT BOUNDARIES OVERLAY ========== */ |
| 98 | .content-boundaries-overlay .content-boundary { |
| 99 | animation: fadeIn 0.3s ease-out; |
| 100 | } |
| 101 | |
| 102 | /* ========== ANIMATIONS ========== */ |
| 103 | @keyframes fadeIn { |
| 104 | from { |
| 105 | opacity: 0; |
| 106 | } |
| 107 | to { |
| 108 | opacity: 1; |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | @keyframes pulse { |
| 113 | 0%, 100% { |
| 114 | opacity: 0.9; |
| 115 | } |
| 116 | 50% { |
| 117 | opacity: 1; |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | /* ========== TOOLBAR ========== */ |
| 122 | .standards-toolbar { |
| 123 | position: fixed; |
| 124 | bottom: 24px; |
| 125 | right: 24px; |
| 126 | background: rgba(17, 24, 39, 0.95); |
| 127 | backdrop-filter: blur(10px); |
| 128 | border-radius: 12px; |
| 129 | padding: 16px; |
| 130 | box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); |
| 131 | z-index: 10002; |
| 132 | pointer-events: all; |
| 133 | font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; |
| 134 | } |
| 135 | |
| 136 | .standards-toolbar.collapsed { |
| 137 | padding: 12px; |
| 138 | } |
| 139 | |
| 140 | .toolbar-header { |
| 141 | display: flex; |
| 142 | align-items: center; |
| 143 | justify-content: space-between; |
| 144 | margin-bottom: 16px; |
| 145 | } |
| 146 | |
| 147 | .toolbar-title { |
| 148 | font-size: 14px; |
| 149 | font-weight: 700; |
| 150 | color: white; |
| 151 | letter-spacing: 0.3px; |
| 152 | } |
| 153 | |
| 154 | .toolbar-collapse-btn { |
| 155 | background: transparent; |
| 156 | border: none; |
| 157 | color: white; |
| 158 | font-size: 18px; |
| 159 | cursor: pointer; |
| 160 | padding: 4px; |
| 161 | transition: opacity 0.2s; |
| 162 | } |
| 163 | |
| 164 | .toolbar-collapse-btn:hover { |
| 165 | opacity: 0.7; |
| 166 | } |
| 167 | |
| 168 | .toolbar-buttons { |
| 169 | display: grid; |
| 170 | grid-template-columns: 1fr 1fr; |
| 171 | gap: 8px; |
| 172 | } |
| 173 | |
| 174 | .standards-toolbar.collapsed .toolbar-buttons { |
| 175 | display: none; |
| 176 | } |
| 177 | |
| 178 | .toolbar-btn { |
| 179 | background: rgba(255, 255, 255, 0.1); |
| 180 | border: 1px solid rgba(255, 255, 255, 0.2); |
| 181 | border-radius: 8px; |
| 182 | padding: 10px 14px; |
| 183 | color: white; |
| 184 | font-size: 13px; |
| 185 | font-weight: 600; |
| 186 | cursor: pointer; |
| 187 | transition: all 0.2s; |
| 188 | white-space: nowrap; |
| 189 | } |
| 190 | |
| 191 | .toolbar-btn:hover { |
| 192 | background: rgba(255, 255, 255, 0.2); |
| 193 | border-color: rgba(255, 255, 255, 0.4); |
| 194 | transform: translateY(-1px); |
| 195 | } |
| 196 | |
| 197 | .toolbar-btn.active { |
| 198 | background: rgba(124, 58, 237, 0.5); |
| 199 | border-color: rgba(124, 58, 237, 0.7); |
| 200 | } |
| 201 | |
| 202 | .toolbar-btn-icon { |
| 203 | margin-right: 6px; |
| 204 | } |
| 205 | |
| 206 | .toolbar-actions { |
| 207 | display: flex; |
| 208 | gap: 8px; |
| 209 | margin-top: 12px; |
| 210 | padding-top: 12px; |
| 211 | border-top: 1px solid rgba(255, 255, 255, 0.1); |
| 212 | } |
| 213 | |
| 214 | .toolbar-action-btn { |
| 215 | flex: 1; |
| 216 | background: transparent; |
| 217 | border: 1px solid rgba(255, 255, 255, 0.2); |
| 218 | border-radius: 6px; |
| 219 | padding: 8px 12px; |
| 220 | color: white; |
| 221 | font-size: 12px; |
| 222 | font-weight: 600; |
| 223 | cursor: pointer; |
| 224 | transition: all 0.2s; |
| 225 | } |
| 226 | |
| 227 | .toolbar-action-btn:hover { |
| 228 | background: rgba(255, 255, 255, 0.1); |
| 229 | border-color: rgba(255, 255, 255, 0.3); |
| 230 | } |
| 231 | |
| 232 | /* ========== MOBILE TOOLBAR ========== */ |
| 233 | @media (max-width: 768px) { |
| 234 | .standards-toolbar { |
| 235 | bottom: 80px; /* Above bottom nav */ |
| 236 | right: 16px; |
| 237 | left: 16px; |
| 238 | max-width: none; |
| 239 | } |
| 240 | |
| 241 | .toolbar-buttons { |
| 242 | grid-template-columns: 1fr; |
| 243 | } |
| 244 | |
| 245 | .toolbar-btn { |
| 246 | padding: 12px 16px; |
| 247 | font-size: 14px; |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | /* ========== KEYBOARD SHORTCUT HINT ========== */ |
| 252 | .standards-keyboard-hint { |
| 253 | position: fixed; |
| 254 | bottom: 24px; |
| 255 | left: 24px; |
| 256 | background: rgba(17, 24, 39, 0.95); |
| 257 | backdrop-filter: blur(10px); |
| 258 | color: white; |
| 259 | padding: 8px 12px; |
| 260 | border-radius: 6px; |
| 261 | font-size: 11px; |
| 262 | font-weight: 600; |
| 263 | font-family: 'Inter', -apple-system, sans-serif; |
| 264 | z-index: 10002; |
| 265 | pointer-events: none; |
| 266 | opacity: 0; |
| 267 | transition: opacity 0.3s; |
| 268 | } |
| 269 | |
| 270 | .standards-keyboard-hint.show { |
| 271 | opacity: 1; |
| 272 | } |
| 273 | |
| 274 | .standards-keyboard-hint kbd { |
| 275 | display: inline-block; |
| 276 | padding: 2px 6px; |
| 277 | background: rgba(255, 255, 255, 0.2); |
| 278 | border-radius: 4px; |
| 279 | font-family: monospace; |
| 280 | margin: 0 2px; |
| 281 | } |
| 282 | |
| 283 | /* ========== PRINT STYLES ========== */ |
| 284 | @media print { |
| 285 | .standards-overlay-container, |
| 286 | .standards-toolbar, |
| 287 | .standards-keyboard-hint { |
| 288 | display: none !important; |
| 289 | } |
| 290 | } |