Glance is an all-in-one macOS Quick Look plugin (source code, markdown, JSON, archives, Jupyter, etc.) with dark-mode support. It has no settings UI — the fonts/sizes are hardcoded in CSS inside the app bundle. You can edit them, but on Apple Silicon any edit invalidates the extension's code signature, so it must be re-signed correctly or macOS will silently stop loading the Quick Look extension.
/Applications/Glance.app/Contents/PlugIns/QLPlugin.appex/Contents/Resources/
shared-main.css # base body font-size + font-family vars + code/pre rule
shared-chroma.css # syntax-highlight (chroma) token colors
markdown-main.css # markdown-specific rules
Key rules in shared-main.css:
:root {
--font-family-monospace: "Menlo", monospace; /* code font face */
--font-family-sans-serif: -apple-system, ...; /* body font face */
}
body { font-size: 14px; ... } /* base text size */
code, pre { font-size: 0.9em; font-family: var(--font-family-monospace); }- Body text size → the
body { font-size }rule. - Code preview size → the
code, pre { font-size }rule (relativeemtracks the body size; use an explicitpxto pin it).
The critical detail: the original Glance signature is itself ad-hoc with
app-sandbox entitlements and the runtime flag. A naive
codesign --force --deep --sign - strips the entitlements/flags, and PluginKit
then refuses to register the extension. Preserve them:
APP=/Applications/Glance.app
APX="$APP/Contents/PlugIns/QLPlugin.appex"
# 1. edit the CSS in $APX/Contents/Resources/ ...
# 2. re-sign appex FIRST, then the app — NOT --deep — preserving metadata
codesign --force --sign - --preserve-metadata=entitlements,flags --timestamp=none "$APX"
codesign --force --sign - --preserve-metadata=entitlements,flags --timestamp=none "$APP"
# 3. re-register the extension and relaunch the app once
pluginkit -a "$APX"
open -a Glance
# 4. reset Quick Look caches
qlmanage -r ; qlmanage -r cacheVerify it stuck:
# flags must still show (adhoc,runtime); entitlement must still be present
codesign -dvvv "$APX" 2>&1 | grep -i flags
codesign -d --entitlements - --xml "$APX" 2>/dev/null | grep -o app-sandbox
# extension must be registered with Quick Look
pluginkit -mAv -p com.apple.quicklook.preview | grep QLPlugin- Per-file render cache: macOS caches a rendered preview per file. After a
change, test on a fresh file you haven't previewed yet, or the old render
shows again even after
qlmanage -r. - Updates overwrite edits: reinstalling/upgrading Glance reverts the CSS to stock (and re-signs cleanly). Re-apply the edit afterward.
- If you break loading:
brew reinstall --cask glance-chamburrrestores a clean, registerable bundle; thenxattr -dr com.apple.quarantine /Applications/Glance.appandopen -a Glanceonce. - Glance fails Gatekeeper (
spctlrejects it) and the Homebrew cask is deprecated — stripping quarantine is what lets it run locally.