Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

Field primitive: fix tiled chevron on <select> + .field combo — the global 'select { background-image: chevron; background-repeat: no-repeat }' rule in styles.css combined with '.field { background: var(--bg-input) }' produces a tiled chevron strip inside select.field elements because .field's background shorthand resets background-color but the inherited background-image + reset-to-default background-repeat (repeat) on the same property bag end up rendering the chevron as a horizontal tile across the whole control — visible in the Identify Speakers modal's 'Navigate to speaker' dropdown; explicit select.field rule that re-establishes the chevron with background-repeat: no-repeat, the same SVG and position the global select rule uses, plus an html.dark variant for the light-grey chevron colour; SW cache bumped to v8 so users pick up the new primitives.css

Murtaza Nasir13058fe23fed
diff --git a/static/css/primitives.css b/static/css/primitives.css
index ac967ba0..1ae3a247 100644
--- a/static/css/primitives.css
+++ b/static/css/primitives.css
@@ -632,6 +632,25 @@ html.dark {
min-height: 28px;
}
+/* When .field is applied to a <select>, the global `select` rule in
+ styles.css sets a chevron background-image with background-repeat:
+ no-repeat — but `.field`'s `background:` shorthand resets only
+ `background-color` reliably across browsers; in practice the chevron
+ ends up tiled horizontally inside the select. Re-establish the
+ chevron explicitly here so select.field renders a single chevron at
+ the right edge like the global select rule intends. */
+select.field {
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M4.5 5.5L8 9l3.5-3.5L10.75 4.75 8 7.5 5.25 4.75z'/%3E%3C/svg%3E");
+ background-repeat: no-repeat;
+ background-position: right 0.5rem center;
+ background-size: 1em 1em;
+ padding-right: 2rem;
+ cursor: pointer;
+}
+html.dark select.field {
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23cbd5e1' d='M4.5 5.5L8 9l3.5-3.5L10.75 4.75 8 7.5 5.25 4.75z'/%3E%3C/svg%3E");
+}
+
/* ---- Spinner ------------------------------------------------------------ */
diff --git a/static/sw.js b/static/sw.js
index 01ec5ad2..39413448 100644
--- a/static/sw.js
+++ b/static/sw.js
@@ -4,7 +4,7 @@
// stale code even after a hard refresh. Forgetting to bump this was what
// made the speaker-modal scroll fixes appear to do nothing: the SW kept
// serving the broken pre-fix app.modular.js.
-const CACHE_NAME = 'Speakr-cache-v7';
+const CACHE_NAME = 'Speakr-cache-v8';
const ASSETS_TO_CACHE = [
'/',
'/static/offline.html',