|
| 1 | +/* Custom Renderer CSS */ |
| 2 | +.qti-item-body { |
| 3 | + font-family: 'Inter', system-ui, -apple-system, sans-serif; |
| 4 | + line-height: 1.6; |
| 5 | + color: #1a1a1a; |
| 6 | + max-width: 100%; |
| 7 | + margin: 0 auto; |
| 8 | +} |
| 9 | + |
| 10 | +.qti-choice-interaction { |
| 11 | + margin-top: 2rem; |
| 12 | + border: none; |
| 13 | + padding: 0; |
| 14 | +} |
| 15 | + |
| 16 | +.qti-prompt { |
| 17 | + font-size: 1.25rem; |
| 18 | + font-weight: 600; |
| 19 | + margin-bottom: 1.5rem; |
| 20 | + color: #111; |
| 21 | + line-height: 1.4; |
| 22 | +} |
| 23 | + |
| 24 | +ul.qti-choices-list { |
| 25 | + list-style-type: none; |
| 26 | + padding: 0; |
| 27 | + margin: 0; |
| 28 | + display: flex; |
| 29 | + flex-direction: column; |
| 30 | + gap: 12px; |
| 31 | +} |
| 32 | + |
| 33 | +li.qti-simple-choice { |
| 34 | + background-color: #fff; |
| 35 | + border: 1px solid #e1e4e8; |
| 36 | + padding: 16px 20px; |
| 37 | + border-radius: 12px; |
| 38 | + cursor: pointer; |
| 39 | + transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); |
| 40 | + display: flex; |
| 41 | + align-items: center; |
| 42 | + position: relative; |
| 43 | + font-size: 1rem; |
| 44 | +} |
| 45 | + |
| 46 | +li.qti-simple-choice:hover { |
| 47 | + background-color: #f8f9fa; |
| 48 | + border-color: #cbd5e1; |
| 49 | + transform: translateY(-1px); |
| 50 | + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); |
| 51 | +} |
| 52 | + |
| 53 | +li.qti-simple-choice:active { |
| 54 | + transform: translateY(0); |
| 55 | +} |
| 56 | + |
| 57 | +/* Hide the default radio/checkbox */ |
| 58 | +li.qti-simple-choice input { |
| 59 | + appearance: none; |
| 60 | + -webkit-appearance: none; |
| 61 | + width: 20px; |
| 62 | + height: 20px; |
| 63 | + border: 2px solid #cbd5e1; |
| 64 | + border-radius: 50%; /* Default to circle (radio style), JS/Renderer handles type */ |
| 65 | + margin-right: 16px; |
| 66 | + position: relative; |
| 67 | + flex-shrink: 0; |
| 68 | + transition: all 0.2s ease; |
| 69 | +} |
| 70 | + |
| 71 | +/* Checkbox specific style if distinguishable, usually controlled by attribute on interaction */ |
| 72 | +/* For now we style the input generically */ |
| 73 | + |
| 74 | +li.qti-simple-choice input:checked { |
| 75 | + border-color: #2563eb; |
| 76 | + background-color: #2563eb; |
| 77 | + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); |
| 78 | + background-size: 100% 100%; |
| 79 | + background-position: center; |
| 80 | + background-repeat: no-repeat; |
| 81 | +} |
| 82 | + |
| 83 | +/* Style the label inside */ |
| 84 | +label.qti-simple-choice { |
| 85 | + cursor: pointer; |
| 86 | + flex: 1; |
| 87 | + font-weight: 500; |
| 88 | + color: #374151; |
| 89 | +} |
| 90 | + |
| 91 | +/* Selected state for the row */ |
| 92 | +li.qti-simple-choice:has(input:checked) { |
| 93 | + background-color: #eff6ff; |
| 94 | + border-color: #bfdbfe; |
| 95 | + box-shadow: 0 0 0 1px #bfdbfe; |
| 96 | +} |
| 97 | + |
| 98 | +li.qti-simple-choice:has(input:checked) label.qti-simple-choice { |
| 99 | + color: #1e40af; |
| 100 | +} |
| 101 | + |
| 102 | +/* Custom styling for specific elements */ |
| 103 | +.qti-underline { |
| 104 | + text-decoration: underline; |
| 105 | + text-decoration-color: #2563eb; |
| 106 | + text-decoration-thickness: 2px; |
| 107 | + text-underline-offset: 4px; |
| 108 | +} |
| 109 | + |
| 110 | +.qti-visually-hidden { |
| 111 | + position: absolute; |
| 112 | + width: 1px; |
| 113 | + height: 1px; |
| 114 | + padding: 0; |
| 115 | + margin: -1px; |
| 116 | + overflow: hidden; |
| 117 | + clip: rect(0, 0, 0, 0); |
| 118 | + white-space: nowrap; |
| 119 | + border: 0; |
| 120 | +} |
| 121 | + |
| 122 | +/* Feedback Styles */ |
| 123 | +.qti-modal-feedback { |
| 124 | + margin-top: 1.5rem; |
| 125 | + padding: 1rem 1.25rem; |
| 126 | + background-color: #f8f9fa; |
| 127 | + border: 1px solid #e9ecef; |
| 128 | + border-radius: 8px; |
| 129 | + color: #495057; |
| 130 | + font-size: 0.95rem; |
| 131 | +} |
| 132 | + |
| 133 | +.qti-modal-feedback:empty { |
| 134 | + display: none; |
| 135 | + margin: 0; |
| 136 | + padding: 0; |
| 137 | + border: none; |
| 138 | +} |
| 139 | + |
| 140 | +.qti-feedback-inline { |
| 141 | + display: inline-block; |
| 142 | + margin-left: 0.5rem; |
| 143 | + padding: 0.2rem 0.5rem; |
| 144 | + background-color: #f1f3f5; |
| 145 | + border-radius: 4px; |
| 146 | + font-size: 0.9em; |
| 147 | + color: #495057; |
| 148 | + vertical-align: middle; |
| 149 | +} |
| 150 | + |
| 151 | +.qti-feedback-inline:empty { |
| 152 | + display: none; |
| 153 | + margin: 0; |
| 154 | + padding: 0; |
| 155 | +} |
0 commit comments