mirror of
https://github.com/playerofgames/obsidian-mia-theme.git
synced 2026-07-22 04:50:24 +00:00
1.0.0 initial release
This commit is contained in:
commit
c1b241b88d
10 changed files with 1148 additions and 0 deletions
10
.editorconfig
Normal file
10
.editorconfig
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
50
.github/workflows/release-version.yml
vendored
Normal file
50
.github/workflows/release-version.yml
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
name: Publish new theme version
|
||||
|
||||
on:
|
||||
push:
|
||||
# Sequence of patterns matched against refs/tags
|
||||
tags:
|
||||
- "*" # Push events to matching any tag format, i.e. 1.0, 20.15.10
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Bundle
|
||||
id: bundle
|
||||
run: |
|
||||
ls
|
||||
echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)"
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VERSION: ${{ github.ref }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: Upload manifest.json
|
||||
id: upload-manifest
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./manifest.json
|
||||
asset_name: manifest.json
|
||||
asset_content_type: application/json
|
||||
- name: Upload theme.css
|
||||
id: upload-css
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./theme.css
|
||||
asset_name: theme.css
|
||||
asset_content_type: text/css
|
||||
15
.gitignore
vendored
Normal file
15
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# vscode
|
||||
.vscode
|
||||
|
||||
# Intellij
|
||||
*.iml
|
||||
.idea
|
||||
|
||||
# npm
|
||||
node_modules
|
||||
|
||||
# Exclude sourcemaps
|
||||
*.map
|
||||
|
||||
# Exclude macOS Finder (System Explorer) View States
|
||||
.DS_Store
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2026 playerofgames
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
62
README.md
Normal file
62
README.md
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
Mia is a lightweight Obsidian theme for macOS and iOS that builds on the default theme, with an emphasis on a clean, distraction-free experience.
|
||||
|
||||
<p align="center"><img width="512" src="preview.png" /></p>
|
||||
|
||||
## Features
|
||||
|
||||
- Light mode and Dark mode
|
||||
- System fonts with spacing, headings, link styling designed for usability and readability[^1]
|
||||
- A true Source view for working with markdown:
|
||||
- monospace font
|
||||
- headings hang in margin
|
||||
- formatting noise (e.g., url in a link) is muted
|
||||
- Images are centered by default
|
||||
- Image alt tags:
|
||||
- Images `float-left` and `float-right`
|
||||
- Images `invert-dark` and `invert-light` depending on the theme
|
||||
- Constrain aspect ration to 16 / 10 with `screen`, `wallpaper`, `wp`
|
||||
- Images are slightly dimmed in dark mode (configurable)
|
||||
- Checkbox style for cancelled tasks `[-]`
|
||||
- CSS class `reader` for reading in serif (similar to Safari reader)
|
||||
- CSS class `math-left` for left-aligned math blocks
|
||||
- PDF export at 12pt with black text
|
||||
- Style Settings support for some of the more opinionated choices
|
||||
|
||||
[^1]: "SF Mono" font must be installed on desktop, otherwise default monospace font is "Menlo". See: [Fonts - Apple Developer](https://developer.apple.com/fonts/)
|
||||
|
||||
---
|
||||
|
||||
## Style settings
|
||||
|
||||
Install the [Style Settings](https://community.obsidian.md/plugins/obsidian-style-settings) plugin to fine-tune the Mia theme's settings.
|
||||
|
||||
---
|
||||
|
||||
## Reader view
|
||||
|
||||
Use `reader` in a `cssclasses` property to use a serif font for reading view.
|
||||
|
||||
```yaml
|
||||
cssclasses: reader
|
||||
```
|
||||
|
||||
<p align="center"><img width="512" src="mia-reader-preview.png" /></p>
|
||||
|
||||
---
|
||||
|
||||
## Image alt classes
|
||||
|
||||
Example:
|
||||
|
||||
```md
|
||||
I introduced Fern to FMHY this morning.![[Blackbeard.webp|float-right|150]]
|
||||
```
|
||||
|
||||
| alt tag | effect |
|
||||
| --------------------- | ------------------------------------------------------------------ |
|
||||
| float-left | image is left-aligned, and content wraps around it |
|
||||
| float-right | image is right-aligned, and content wraps around it<br> |
|
||||
| invert-dark | image will be inverted when using the dark theme |
|
||||
| invert-light | image will be inverted when using the light theme |
|
||||
| banner-top-250 | image is restricted to 250px tall, cropped to the top of the image |
|
||||
| screen, wp, wallpaper | image aspect ratio is constrained to 16 / 10 |
|
||||
7
manifest.json
Normal file
7
manifest.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "Mia",
|
||||
"version": "1.0.0",
|
||||
"minAppVersion": "1.0.0",
|
||||
"author": "playerofgames",
|
||||
"authorUrl": "https://github.com/playerofgames/obsidian-mia-theme"
|
||||
}
|
||||
BIN
mia-reader-preview.png
Normal file
BIN
mia-reader-preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 151 KiB |
BIN
preview.png
Normal file
BIN
preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 142 KiB |
982
theme.css
Normal file
982
theme.css
Normal file
|
|
@ -0,0 +1,982 @@
|
|||
/* @settings
|
||||
name: Mia theme
|
||||
id: mia-theme
|
||||
settings:
|
||||
-
|
||||
id: mia-mono-links
|
||||
title: Monochrome links
|
||||
description: When disabled, external links use the accent color
|
||||
type: class-toggle
|
||||
-
|
||||
id: mia-link-icon
|
||||
title: External link icon
|
||||
description: Icon shown after external links
|
||||
type: class-select
|
||||
allowEmpty: false
|
||||
default: mia-icon-none
|
||||
options:
|
||||
-
|
||||
label: No icon
|
||||
value: mia-icon-none
|
||||
-
|
||||
label: External Link
|
||||
value: mia-icon-extlink
|
||||
-
|
||||
label: Arrow Up Right
|
||||
value: mia-icon-upright
|
||||
-
|
||||
id: blockquote-border-thickness
|
||||
title: Blockquote border thickness
|
||||
description: Thickness of left border for blockquotes (px)
|
||||
type: variable-number-slider
|
||||
default: 0
|
||||
min: 0
|
||||
max: 5
|
||||
step: 0.5
|
||||
format: px
|
||||
-
|
||||
id: checklist-done-decoration
|
||||
title: Completed task decoration
|
||||
description: "Completed task text is muted; also apply this decoration"
|
||||
type: variable-select
|
||||
default: none
|
||||
options:
|
||||
- none
|
||||
- line-through
|
||||
-
|
||||
id: mia-line-width
|
||||
title: Readable line width
|
||||
description: "Settings → Editor → 'Readable line length' must also be enabled (px)"
|
||||
type: variable-number-slider
|
||||
default: 800
|
||||
min: 500
|
||||
max: 1000
|
||||
step: 1
|
||||
format: px
|
||||
-
|
||||
id: mia-hang-headings
|
||||
title: Hang heading characters in margin (source mode)
|
||||
description: "Heading characters ### hang in the margin (requires 'Readable line length')"
|
||||
type: class-toggle
|
||||
default: true
|
||||
-
|
||||
id: mia-inline-h1
|
||||
title: Show inline title with heading character (source mode)
|
||||
description: "Prefix Inline title with # and hang in the margin (requires 'Readable line length')"
|
||||
type: class-toggle
|
||||
default: true
|
||||
-
|
||||
id: mia-image-muted
|
||||
title: Opacity of images in dark mode
|
||||
type: variable-number-slider
|
||||
default: 0.85
|
||||
min: 0.5
|
||||
max: 1
|
||||
step: 0.01
|
||||
|
||||
*/
|
||||
|
||||
/*** COLOURS ***/
|
||||
|
||||
.theme-light {
|
||||
--accent-h: 199;
|
||||
--accent-s: 89%;
|
||||
--accent-l: 38%;
|
||||
--accent-color: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
|
||||
--accent-color-light: hsl(var(--accent-h), var(--accent-s), 65%);
|
||||
|
||||
--text-normal: #1a1a1a;
|
||||
--text-muted: #808080;
|
||||
--text-faint: #a8a8a8;
|
||||
|
||||
--background-primary: #f7f7f7;
|
||||
--background-secondary: #f4f4f4;
|
||||
--background-secondary-alt: #ffffff;
|
||||
--code-background: #ededed;
|
||||
|
||||
--text-selection: #b6eefca6;
|
||||
--caret-color: var(--accent-color);
|
||||
|
||||
--text-highlight-bg-rgb: 255, 208, 0;
|
||||
--text-highlight-bg: #ffd00066;
|
||||
|
||||
--background-modifier-border: #d9d9d9;
|
||||
--table-border-color: var(--text-faint);
|
||||
|
||||
--hr-color: oklch(0 0 0 / 25%);
|
||||
|
||||
--code-normal: var(--text-normal);
|
||||
--code-comment: #808080;
|
||||
--code-function: #947231;
|
||||
--code-important: #f26669;
|
||||
--code-keyword: #4d92ab;
|
||||
--code-operator: var(--code-normal);
|
||||
--code-property: #862753;
|
||||
--code-punctuation: var(--code-normal);
|
||||
--code-string: #526e2a;
|
||||
--code-tag: var(--code-normal);
|
||||
--code-value: #683a91;
|
||||
}
|
||||
|
||||
.theme-dark {
|
||||
--accent-h: 193;
|
||||
--accent-s: 85%;
|
||||
--accent-l: 45%;
|
||||
--accent-color: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
|
||||
--accent-color-light: hsl(var(--accent-h), var(--accent-s), 70%);
|
||||
|
||||
--text-normal: #cccccc;
|
||||
--text-muted: #909090;
|
||||
--text-faint: #707070;
|
||||
|
||||
--background-primary: #1a1a1a;
|
||||
--background-secondary: #262626;
|
||||
--background-secondary-alt: #000000;
|
||||
--code-background: #282828;
|
||||
|
||||
/* alternative */
|
||||
--text-normal: #c0c0c0;
|
||||
--background-primary: #171717;
|
||||
|
||||
--text-selection: #217591a6;
|
||||
--text-highlight-bg: rgba(173, 131, 1, 0.65);
|
||||
--caret-color: var(--accent-color-light);
|
||||
|
||||
--background-modifier-active-hover: #90909060;
|
||||
--table-border-color: var(--text-faint);
|
||||
|
||||
--hr-color: oklch(1 0 0 / 20%);
|
||||
|
||||
--code-normal: var(--text-normal);
|
||||
--code-comment: #808080;
|
||||
--code-function: #d4a046;
|
||||
--code-important: #f26669;
|
||||
--code-keyword: #4d92ab;
|
||||
--code-operator: var(--code-normal);
|
||||
--code-property: #c76090;
|
||||
--code-punctuation: var(--code-normal);
|
||||
--code-string: #90ad65;
|
||||
--code-tag: var(--code-normal);
|
||||
--code-value: #a97dd1;
|
||||
}
|
||||
|
||||
/*** STYLING ***/
|
||||
|
||||
body {
|
||||
--font-ui-small: 13px;
|
||||
--font-ui-smaller: 12px;
|
||||
--font-adaptive-smaller: 12px;
|
||||
|
||||
--tag-background: transparent;
|
||||
--tag-background-hover: transparent;
|
||||
--tag-size: 90%;
|
||||
--tag-padding-x: 3px;
|
||||
--tag-radius: 3px;
|
||||
--tag-color: var(--text-muted);
|
||||
--tag-color-hover: var(--tag-color);
|
||||
--tag-decoration-hover: underline;
|
||||
|
||||
--checklist-done-decoration: none;
|
||||
--checklist-done-color: var(--text-muted);
|
||||
|
||||
--search-result-background: var(--background-secondary);
|
||||
--callout-title-weight: var(--font-weight);
|
||||
|
||||
--text-accent: var(--accent-color);
|
||||
|
||||
--blockquote-style: italic;
|
||||
--blockquote-font-style: italic;
|
||||
--blockquote-border-color: var(--text-faint);
|
||||
--blockquote-border-thickness: 0px;
|
||||
|
||||
--list-marker-color: var(--text-normal);
|
||||
--list-marker-color-hover: var(--text-normal);
|
||||
--list-marker-color-collapsed: var(--text-muted);
|
||||
--collapse-icon-color-collapsed: var(--text-faint);
|
||||
|
||||
.markdown-preview-view {
|
||||
--list-marker-color: var(--text-normal);
|
||||
}
|
||||
|
||||
--tab-text-color-focused-active: var(--text-normal);
|
||||
--tab-text-color-focused: var(--text-muted);
|
||||
|
||||
--hr-thickness: 1px;
|
||||
|
||||
--embed-border-start: 1pt solid var(--text-faint);
|
||||
|
||||
/** slightly wider readable line width */
|
||||
--file-line-width: var(--mia-line-width, 800px);
|
||||
}
|
||||
|
||||
/** spacing */
|
||||
body {
|
||||
--file-margins: var(--size-4-4) var(--size-4-12);
|
||||
--inline-title-margin-bottom: 0.5em;
|
||||
--p-spacing: 1rem;
|
||||
|
||||
--list-spacing: 0.2rem;
|
||||
--p-spacing-empty: 0.2rem;
|
||||
}
|
||||
.inline-title,
|
||||
.iconic-title-wrapper .iconic-icon {
|
||||
padding-top: 16px;
|
||||
}
|
||||
.inline-title {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.markdown-reading-view .inline-title {
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
.markdown-preview-view .metadata-container {
|
||||
margin-bottom: 1.2em;
|
||||
}
|
||||
|
||||
/** math block extra space elimination (shows between bullets and displaymath */
|
||||
.math.math-block + img.cm-widgetBuffer {
|
||||
width: 100px;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/** get rid of extra top space if first element is a bullet or checklist */
|
||||
div.cm-contentContainer
|
||||
> div
|
||||
> div:not(.cm-line)
|
||||
+ div.cm-line.HyperMD-list-line:nth-child(2):not(.HyperMD-task-line),
|
||||
div.cm-contentContainer
|
||||
> div
|
||||
> div.cm-line.HyperMD-list-line:first-child:not(.HyperMD-task-line) {
|
||||
padding-top: 0;
|
||||
}
|
||||
/* in reading view too */
|
||||
div.mod-header + div.el-ul > :is(ul, ol):first-child > li:first-child,
|
||||
div.mod-header
|
||||
+ div.mod-frontmatter
|
||||
+ div.el-ul
|
||||
> :is(ul, ol):first-child
|
||||
> li:first-child {
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
/** blockquotes: use same indent as first list level */
|
||||
.markdown-rendered blockquote {
|
||||
padding-left: 3ch;
|
||||
margin-left: 0ch;
|
||||
border-left-style: var(--mia-blockquote-reading-style, solid);
|
||||
}
|
||||
.markdown-source-view.is-live-preview .cm-quote {
|
||||
margin-left: calc(var(--list-indent) - 1.9rem) !important;
|
||||
}
|
||||
|
||||
/** preformatted: shade entire line, and hide indentation width */
|
||||
.cm-line:has(> .cm-hmd-indented-code.cm-inline-code) {
|
||||
--indentation-guide-width: 0px;
|
||||
background: var(--code-background);
|
||||
}
|
||||
.markdown-source-view.mod-cm6 .cm-active-indent::before {
|
||||
border-right-width: 0px;
|
||||
}
|
||||
|
||||
/** tag styling: bug? */
|
||||
a.tag,
|
||||
.tag,
|
||||
a.tag:hover,
|
||||
.tag:hover,
|
||||
.cm-hashtag {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/** highlighting */
|
||||
.cm-highlight,
|
||||
mark {
|
||||
padding: 1px 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/** strikethrough */
|
||||
del,
|
||||
.cm-strikethrough {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/*** UI ELEMENTS ***/
|
||||
|
||||
/** tab close and pin */
|
||||
.mod-root .workspace-tab-header-inner-close-button,
|
||||
.mod-root .workspace-tab-header-status-icon {
|
||||
color: var(--text-muted);
|
||||
transform: scale(0.9) translate(2px, 1px);
|
||||
transform-origin: center;
|
||||
}
|
||||
|
||||
/** status bar */
|
||||
.status-bar {
|
||||
--status-bar-background: var(--background-primary);
|
||||
--status-bar-border-color: var(--divider-color);
|
||||
--status-bar-text-color: var(--text-normal);
|
||||
--status-bar-border-width: 0;
|
||||
--status-bar-radius: 0;
|
||||
opacity: 0.7;
|
||||
}
|
||||
.status-bar {
|
||||
padding-top: 0;
|
||||
padding-right: var(--size-4-2);
|
||||
}
|
||||
|
||||
/** search views: make files easier to identify */
|
||||
.search-result-file-title {
|
||||
--nav-item-weight: bold;
|
||||
--nav-item-weight-hover: bold;
|
||||
}
|
||||
|
||||
/*** IMAGES ***/
|
||||
|
||||
/** Center images */
|
||||
.markdown-source-view .internal-embed.media-embed:has(img) {
|
||||
width: auto;
|
||||
justify-content: center;
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
}
|
||||
span.internal-embed.media-embed:has(> img) {
|
||||
display: block;
|
||||
text-align: center;
|
||||
|
||||
+ br {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/** images have rounded corners */
|
||||
.markdown-rendered img:not(.emoji),
|
||||
.markdown-rendered video,
|
||||
.markdown-source-view img:not(.emoji),
|
||||
.markdown-source-view video {
|
||||
border-radius: var(--radius-s);
|
||||
}
|
||||
|
||||
/** Mute images a little in dark mode */
|
||||
body {
|
||||
--mia-image-muted: 0.85;
|
||||
}
|
||||
.theme-dark .markdown-source-view img,
|
||||
.theme-dark .markdown-preview-view img {
|
||||
opacity: var(--mia-image-muted);
|
||||
transition: opacity 0.1s linear;
|
||||
}
|
||||
.theme-dark .markdown-source-view img:hover,
|
||||
.theme-dark .markdown-preview-view img:hover {
|
||||
--mia-image-muted: 1;
|
||||
}
|
||||
@media print {
|
||||
body {
|
||||
--mia-image-muted: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/** image spacing */
|
||||
.markdown-preview-view.is-readable-line-width
|
||||
.markdown-preview-sizer
|
||||
> .image-embed,
|
||||
.markdown-source-view.mod-cm6.is-readable-line-width
|
||||
.cm-contentContainer.cm-contentContainer
|
||||
> .cm-content
|
||||
> .image-embed {
|
||||
padding-top: 0.2rem;
|
||||
padding-bottom: 0.2rem;
|
||||
}
|
||||
|
||||
/*** CALLOUTS ***/
|
||||
|
||||
/* === Reflection === */
|
||||
.callout[data-callout^="reflection"] {
|
||||
--callout-color: rgb(187, 161, 44);
|
||||
--callout-icon: lucide-eye-closed;
|
||||
background-color: rgba(247, 217, 57, 0.2);
|
||||
}
|
||||
|
||||
/*** LISTS AND CHECKBOXES ***/
|
||||
|
||||
/** right-justify numbered list */
|
||||
.cm-formatting-list {
|
||||
display: inline-block;
|
||||
width: 4ch;
|
||||
text-align: right;
|
||||
margin-left: -1ch;
|
||||
}
|
||||
|
||||
/** Checkbox style for cancelled [-] */
|
||||
input[data-task="-"]:checked::after,
|
||||
li[data-task="-"] > input:checked::after,
|
||||
li[data-task="-"] > p > input:checked::after {
|
||||
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --%3E%3Cpath d='M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z'/%3E%3C/svg%3E");
|
||||
mask-size: 50%;
|
||||
}
|
||||
div[data-task="-"],
|
||||
li[data-task="-"] > span {
|
||||
text-decoration: line-through;
|
||||
color: var(--checklist-done-color);
|
||||
}
|
||||
input[data-task="-"]:checked {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/** make completed tasks muted, not strikethrough */
|
||||
body {
|
||||
--checklist-done-decoration: none;
|
||||
--checklist-done-color: var(--text-muted);
|
||||
}
|
||||
|
||||
/** minimal theme accommodations */
|
||||
.checkbox-square {
|
||||
--checkbox-size: var(--font-text-size);
|
||||
}
|
||||
a.tag,
|
||||
.cm-hashtag {
|
||||
--tag-size: 90%;
|
||||
}
|
||||
|
||||
/** Fix Outliner plugin styling */
|
||||
.cm-formatting-list-ul {
|
||||
margin-right: 0em !important;
|
||||
}
|
||||
.list-bullet {
|
||||
padding-right: 0.3em;
|
||||
}
|
||||
.list-bullet::after {
|
||||
width: 0.4em;
|
||||
height: 0.4em;
|
||||
background-color: var(--text-muted);
|
||||
}
|
||||
|
||||
/*** PDF EXPORT **/
|
||||
|
||||
@media print {
|
||||
body,
|
||||
.theme-light,
|
||||
.markdown-preview-view {
|
||||
--font-text-size: 12pt !important;
|
||||
--text-normal: black;
|
||||
--list-marker-color: black;
|
||||
|
||||
color: black !important;
|
||||
}
|
||||
}
|
||||
|
||||
/*** TYPOGRAPHY **/
|
||||
|
||||
/** make LaTeX symbols the 'correct' size */
|
||||
mjx-container {
|
||||
line-height: 0px;
|
||||
font-size: 120%;
|
||||
}
|
||||
.cm-s-obsidian span.cm-math {
|
||||
--code-size: var(--font-text-size);
|
||||
}
|
||||
/** Don't italicise math source text */
|
||||
.cm-s-obsidian span.cm-math,
|
||||
.cm-s-obsidian span.hmd-fold-math-placeholder {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/** Typography: SF Pro or system-ui */
|
||||
body {
|
||||
--font-text-theme: "SF Pro", system-ui;
|
||||
--font-editor-override: var(--font-text-theme);
|
||||
--line-height-normal: 1.5;
|
||||
--bold-modifier: 300;
|
||||
|
||||
--font-monospace-theme: "SF Mono", ui-monospace, monospace;
|
||||
--code-size: 94%;
|
||||
mjx-math {
|
||||
font-size: 94%;
|
||||
}
|
||||
|
||||
/** font feature settings */
|
||||
.markdown-rendered,
|
||||
.view-content {
|
||||
font-weight: var(--font-weight); /* bug in base product? */
|
||||
}
|
||||
.markdown-preview-view pre,
|
||||
.cm-inline-code:not(.cm-formatting-code),
|
||||
.HyperMD-codeblock:not(.HyperMD-codeblock-begin, .HyperMD-codeblock-end) {
|
||||
font-weight: var(--font-normal);
|
||||
}
|
||||
}
|
||||
|
||||
/** Typography: more distinct heading sizes */
|
||||
/*
|
||||
H1 → page identity
|
||||
H2 → section structure
|
||||
H3 → subsection structure
|
||||
H4 → minor subsection / paragraph lead
|
||||
H5–H6 → semantic labels, not hierarchy
|
||||
*/
|
||||
body {
|
||||
--h1-size: calc(var(--font-text-size) * 1.55);
|
||||
--h2-size: calc(var(--font-text-size) * 1.35);
|
||||
--h3-size: calc(var(--font-text-size) * 1.2);
|
||||
--h4-size: calc(var(--font-text-size) * 1.1);
|
||||
--h5-size: calc(var(--font-text-size) * 1.05);
|
||||
--h6-size: calc(var(--font-text-size) * 1);
|
||||
|
||||
--h1-color: var(--text-normal);
|
||||
--h1-style: normal;
|
||||
--h1-weight: 700;
|
||||
--h1-line-height: var(--line-height-normal);
|
||||
--inline-title-line-height: 1.2;
|
||||
|
||||
--h2-style: normal;
|
||||
--h2-color: var(--text-normal);
|
||||
--h2-weight: 700;
|
||||
--h2-line-height: var(--line-height-normal);
|
||||
|
||||
--h3-style: normal;
|
||||
--h3-color: var(--text-normal);
|
||||
--h3-weight: 600;
|
||||
--h3-line-height: var(--line-height-normal);
|
||||
|
||||
--h4-style: normal;
|
||||
--h4-color: var(--text-normal);
|
||||
--h4-weight: 600;
|
||||
--h4-line-height: var(--line-height-normal);
|
||||
|
||||
--h5-style: normal;
|
||||
--h5-color: var(--text-normal);
|
||||
--h5-weight: var(--font-weight);
|
||||
--h5-line-height: var(--line-height-normal);
|
||||
--h5-variant: normal;
|
||||
|
||||
--h6-style: normal;
|
||||
--h6-color: var(--text-normal);
|
||||
--h6-weight: var(--font-weight);
|
||||
--h6-line-height: var(--line-height-normal);
|
||||
--h6-variant: all-small-caps;
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-line.HyperMD-header {
|
||||
padding-top: calc(var(--p-spacing) / 2);
|
||||
}
|
||||
|
||||
/** Typography: source writing */
|
||||
.markdown-source-view:not(.is-live-preview) .cm-scroller {
|
||||
--font-text-theme: "SF Mono", ui-monospace, monospace;
|
||||
font-family: var(--font-text-theme);
|
||||
|
||||
--font-monospace-theme: "SF Mono", ui-monospace, monospace;
|
||||
--code-size: 100%;
|
||||
|
||||
--font-weight: var(--font-normal);
|
||||
--line-height-normal: 1.55;
|
||||
--list-spacing: 0rem;
|
||||
|
||||
--inline-title-size: 100%;
|
||||
.inline-title {
|
||||
margin-bottom: 1.55em;
|
||||
}
|
||||
|
||||
--h1-size: 100%;
|
||||
--h2-size: 100%;
|
||||
--h3-size: 100%;
|
||||
--h4-size: 100%;
|
||||
--h5-size: 100%;
|
||||
--h6-size: 100%;
|
||||
|
||||
--h2-color: var(--text-normal);
|
||||
--h2-style: normal;
|
||||
--h2-weight: var(--bold-weight);
|
||||
|
||||
--h3-color: var(--text-normal);
|
||||
--h3-style: normal;
|
||||
--h3-weight: var(--bold-weight);
|
||||
|
||||
--h4-color: var(--text-normal);
|
||||
--h4-style: normal;
|
||||
--h4-weight: var(--bold-weight);
|
||||
|
||||
--h5-color: var(--text-normal);
|
||||
--h5-style: normal;
|
||||
--h5-weight: var(--font-weight);
|
||||
--h5-variant: normal;
|
||||
|
||||
--h6-color: var(--text-muted);
|
||||
--h6-style: normal;
|
||||
--h6-weight: var(--font-weight);
|
||||
--h6-variant: normal;
|
||||
|
||||
/* avoid creating formatting space around code */
|
||||
.cm-line .cm-inline-code:not(.cm-formatting) {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
/* pre-formatted lines and code blocks */
|
||||
.cm-line.HyperMD-codeblock:not(.HyperMD-list-line),
|
||||
.cm-line:has(> .cm-hmd-indented-code.cm-inline-code) {
|
||||
--indentation-guide-width: 0px;
|
||||
background: var(--code-background);
|
||||
padding-inline-start: var(--size-4-2);
|
||||
margin-left: calc(-1 * var(--size-4-2)) !important;
|
||||
}
|
||||
}
|
||||
|
||||
/** Hang header hashtags in the gutter if readable line width */
|
||||
body {
|
||||
--mia-hanging-heading-color: var(--text-normal);
|
||||
}
|
||||
.mia-hang-headings
|
||||
.markdown-source-view:not(.is-live-preview).is-readable-line-width
|
||||
.cm-scroller {
|
||||
.HyperMD-header span.cm-formatting-header {
|
||||
--gutter-space: 4.2em;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
left: calc(-1 * var(--gutter-space));
|
||||
width: var(--gutter-space);
|
||||
text-align: end;
|
||||
white-space: nowrap;
|
||||
margin-right: calc(
|
||||
-1 * var(--gutter-space)
|
||||
); /* This cancels the space it would normally take */
|
||||
color: var(--mia-hanging-heading-color);
|
||||
}
|
||||
}
|
||||
/* rendering on iPad differs from desktop */
|
||||
.mia-hang-headings.is-mobile
|
||||
.markdown-source-view:not(.is-live-preview).is-readable-line-width
|
||||
.cm-scroller
|
||||
.HyperMD-header
|
||||
span.cm-formatting-header {
|
||||
padding-right: 1ch;
|
||||
}
|
||||
|
||||
/** Indicate inline title as level 1 header (OPINIONATED) */
|
||||
.mia-inline-h1
|
||||
.markdown-source-view:not(.is-live-preview).is-readable-line-width
|
||||
.cm-scroller {
|
||||
.inline-title::before {
|
||||
content: "# ";
|
||||
--gutter-space: 1.2em;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
left: calc(-1 * var(--gutter-space));
|
||||
width: var(--gutter-space);
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
margin-right: calc(
|
||||
-1 * var(--gutter-space)
|
||||
); /* This cancels the space it would normally take */
|
||||
color: var(--mia-hanging-heading-color);
|
||||
}
|
||||
}
|
||||
|
||||
/* Typography: phone */
|
||||
@media (max-width: 400pt) {
|
||||
body.is-mobile {
|
||||
--file-margins: var(--size-4-2) var(--size-4-4);
|
||||
--line-height-normal: 1.4;
|
||||
|
||||
--h1-size: calc(var(--font-text-size) * 6 / 5);
|
||||
--h2-size: calc(var(--font-text-size) * 8 / 8);
|
||||
--h3-size: calc(var(--font-text-size) * 8 / 8);
|
||||
--h4-size: calc(var(--font-text-size) * 8 / 8);
|
||||
--h5-size: calc(var(--font-text-size) * 8 / 8);
|
||||
--h6-size: calc(var(--font-text-size) * 8 / 8);
|
||||
}
|
||||
}
|
||||
|
||||
/*** LINKS ***/
|
||||
|
||||
/* Subtle links treatment to keep visual noise down */
|
||||
|
||||
/* internal links have normal text and faint underline */
|
||||
/* internal unresolved links have muted text and faint dotted underline */
|
||||
/* external links have accent text and faint accent underline */
|
||||
/* hover brightens/darkens all links, and the underline remains the same */
|
||||
|
||||
/* There is inadequate support for styling this in the default theme. */
|
||||
/* Variables should control everything. They don't. */
|
||||
/* There are conflicting levels of application of underlines. */
|
||||
|
||||
body {
|
||||
--mia-link-decoration-thickness: auto;
|
||||
--mia-link-decoration-offset: 2px;
|
||||
|
||||
--link-color: var(--text-normal);
|
||||
--link-color-hover: var(--text-muted);
|
||||
--link-decoration: underline;
|
||||
--mia-internal-decoration-color: var(--text-faint);
|
||||
|
||||
--link-unresolved-color: var(--text-muted);
|
||||
--link-unresolved-opacity: 1;
|
||||
--link-unresolved-filter: none;
|
||||
|
||||
--link-external-decoration: underline;
|
||||
--link-external-decoration-hover: underline;
|
||||
--link-external-filter: none;
|
||||
|
||||
--link-external-color: var(--accent-color);
|
||||
--link-external-color-hover: var(--accent-color-light);
|
||||
--link-external-decoration-hover: hsla(var(--interactive-accent-hsl), 0.67);
|
||||
}
|
||||
.theme-light {
|
||||
--mia-link-decoration-thickness: auto;
|
||||
--mia-link-decoration-offset: 2px;
|
||||
}
|
||||
.theme-dark {
|
||||
--mia-link-decoration-thickness: 1px;
|
||||
--mia-link-decoration-offset: 2px;
|
||||
}
|
||||
|
||||
/* muted external links */
|
||||
body.mia-mono-links {
|
||||
--link-external-color: var(--text-normal);
|
||||
--link-external-color-hover: var(--accent-color);
|
||||
--link-external-decoration-color: var(--text-normal);
|
||||
--link-external-decoration-hover: var(--accent-color);
|
||||
}
|
||||
|
||||
/* internal link */
|
||||
.markdown-source-view .cm-hmd-internal-link .cm-underline,
|
||||
.metadata-property-value .internal-link,
|
||||
.bases-table-cell .internal-link,
|
||||
.markdown-rendered a.internal-link {
|
||||
text-underline-offset: var(--mia-link-decoration-offset);
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: var(--mia-link-decoration-thickness);
|
||||
text-decoration-color: var(--mia-internal-decoration-color);
|
||||
}
|
||||
|
||||
.markdown-source-view .cm-hmd-internal-link:hover,
|
||||
.metadata-property-value .internal-link:hover,
|
||||
.bases-table-cell .internal-link:hover,
|
||||
.markdown-rendered a.internal-link:hover {
|
||||
text-underline-offset: var(--mia-link-decoration-offset);
|
||||
text-decoration-thickness: var(--mia-link-decoration-thickness);
|
||||
text-decoration-color: var(--mia-internal-decoration-color);
|
||||
}
|
||||
|
||||
/* unresolved internal link */
|
||||
.markdown-source-view .cm-hmd-internal-link .is-unresolved .cm-underline,
|
||||
.metadata-property-value .internal-link.is-unresolved,
|
||||
.markdown-rendered a.internal-link.is-unresolved {
|
||||
text-underline-offset: var(--mia-link-decoration-offset);
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dotted;
|
||||
text-decoration-thickness: var(--mia-link-decoration-thickness);
|
||||
text-decoration-color: var(--mia-internal-decoration-color);
|
||||
}
|
||||
|
||||
/* ... what a mess */
|
||||
@media (hover: hover) {
|
||||
.cm-s-obsidian span.cm-hmd-internal-link:hover {
|
||||
text-decoration-line: none;
|
||||
}
|
||||
}
|
||||
|
||||
.markdown-source-view .cm-hmd-internal-link:hover .is-unresolved .cm-underline,
|
||||
.metadata-property-value .internal-link.is-unresolved:hover,
|
||||
.markdown-rendered a.internal-link.is-unresolved:hover {
|
||||
color: var(--text-normal) !important;
|
||||
text-decoration-color: var(--text-faint);
|
||||
}
|
||||
|
||||
/* external link */
|
||||
.markdown-source-view .cm-link .cm-underline,
|
||||
.markdown-source-view .cm-url .cm-underline,
|
||||
.metadata-property-value .external-link,
|
||||
.markdown-rendered a.external-link {
|
||||
text-underline-offset: var(--mia-link-decoration-offset);
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: var(--mia-link-decoration-thickness);
|
||||
text-decoration-color: var(--link-external-decoration-color);
|
||||
}
|
||||
.markdown-source-view .cm-url {
|
||||
text-decoration-line: underline !important;
|
||||
text-decoration-thickness: var(--mia-link-decoration-thickness) !important;
|
||||
text-underline-offset: var(--mia-link-decoration-offset);
|
||||
}
|
||||
|
||||
.markdown-source-view .cm-link:hover .cm-underline,
|
||||
.markdown-source-view .cm-url:hover .cm-underline,
|
||||
.metadata-property-value .external-link:hover,
|
||||
.markdown-rendered a.external-link:hover {
|
||||
text-underline-offset: var(--mia-link-decoration-offset);
|
||||
text-decoration: underline !important;
|
||||
text-decoration-thickness: var(--mia-link-decoration-thickness) !important;
|
||||
text-decoration-color: var(--link-external-decoration-hover) !important;
|
||||
}
|
||||
|
||||
/* no icon on external link */
|
||||
.mia-icon-none .external-link {
|
||||
background-image: none;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
/* UP-RIGHT-ARROW */
|
||||
.mia-icon-upright .external-link {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M7 7h10v10'/%3E%3C/svg%3E");
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
/* EXTERNAL-LINK */
|
||||
.mia-icon-extlink .external-link {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14L21 3'/%3E%3C/svg%3E");
|
||||
background-size: 14px;
|
||||
padding-right: 17px;
|
||||
}
|
||||
|
||||
/* Adjust link colours when highlighted */
|
||||
.markdown-source-view
|
||||
span.cm-highlight:is(
|
||||
.cm-link,
|
||||
.cm-link .is-unresolved,
|
||||
.cm-url,
|
||||
.cm-hmd-internal-link
|
||||
)
|
||||
.cm-underline,
|
||||
.markdown-rendered
|
||||
mark
|
||||
a:is(.internal-link, .external-link, .internal-link.is-unresolved) {
|
||||
color: var(--text-normal);
|
||||
text-decoration-color: var(--text-normal) !important;
|
||||
}
|
||||
|
||||
.markdown-source-view
|
||||
span.cm-highlight:is(
|
||||
.cm-link,
|
||||
.cm-link .is-unresolved,
|
||||
.cm-url,
|
||||
.cm-hmd-internal-link
|
||||
)
|
||||
.cm-underline:hover,
|
||||
.markdown-rendered
|
||||
mark
|
||||
a:is(.internal-link, .external-link, .internal-link.is-unresolved):hover {
|
||||
filter: invert();
|
||||
}
|
||||
|
||||
/* Adjust spelling underline for consistency */
|
||||
.cm-content ::spelling-error {
|
||||
text-decoration: underline dotted crimson;
|
||||
text-underline-offset: 2.1px;
|
||||
text-decoration-thickness: auto;
|
||||
}
|
||||
|
||||
/* Tone-down the bare urls relative to the actual content */
|
||||
.cm-s-obsidian span.cm-string.cm-url {
|
||||
color: var(--text-faint);
|
||||
}
|
||||
.cm-s-obsidian div.cm-active span.cm-string.cm-url {
|
||||
color: var(--text-normal);
|
||||
}
|
||||
|
||||
/*** IMAGE ALT CLASSES ***/
|
||||
|
||||
/** show top 250 px */
|
||||
.image-embed[alt="banner-top-250"] img {
|
||||
width: 100vw !important;
|
||||
height: 250px !important;
|
||||
object-fit: cover !important;
|
||||
object-position: center top !important;
|
||||
}
|
||||
|
||||
/** force standard mac screen aspect ratio */
|
||||
.image-embed
|
||||
img:is([alt="wallpaper"], [alt="wp"], [alt="16:10"], [alt="screen"]) {
|
||||
aspect-ratio: 16 / 10;
|
||||
width: 100vw;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
/** invert image when appropriate */
|
||||
.theme-dark img[alt$="invert-dark"] {
|
||||
filter: invert(1) hue-rotate(180deg);
|
||||
}
|
||||
|
||||
.theme-light img[alt$="invert-light"] {
|
||||
filter: invert(1) hue-rotate(180deg);
|
||||
}
|
||||
|
||||
/** float image right, content wraps around */
|
||||
.image-embed:has(img[alt^="float-right"]) {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
/** float image left, content wraps around */
|
||||
.image-embed:has(img[alt^="float-left"]) {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
/*** CSS CLASSES ***/
|
||||
|
||||
/*** READING with cssclass: reader ***/
|
||||
|
||||
/** reading view uses different font and weights */
|
||||
.markdown-reading-view .reader {
|
||||
--font-text: "Iowan Old Style", "New York", "Palatino", "Georgia", serif;
|
||||
--font-text-size: 15pt;
|
||||
--line-height-normal: 1.55;
|
||||
|
||||
--inline-title-color: var(--text-normal);
|
||||
--h1-color: var(--text-normal);
|
||||
--h2-color: var(--text-normal);
|
||||
--h3-color: var(--text-normal);
|
||||
--h4-color: var(--text-normal);
|
||||
--h5-color: var(--text-normal);
|
||||
--h6-color: var(--text-normal);
|
||||
|
||||
--h1-size: calc(var(--font-text-size) * 4.8 / 3);
|
||||
--h2-size: calc(var(--font-text-size) * 6.5 / 5);
|
||||
--h3-size: calc(var(--font-text-size) * 6 / 5);
|
||||
--h4-size: calc(var(--font-text-size) * 9 / 8);
|
||||
--h5-size: calc(var(--font-text-size) * 9 / 8);
|
||||
--h6-size: calc(var(--font-text-size) * 9 / 8);
|
||||
|
||||
--file-line-width: 775px;
|
||||
|
||||
--inline-title-size: var(--h1-size);
|
||||
|
||||
.inline-title {
|
||||
letter-spacing: 0px;
|
||||
}
|
||||
|
||||
.metadata-container {
|
||||
--metadata-label-font-size: 11.5pt;
|
||||
--metadata-input-font-size: 11.5pt;
|
||||
}
|
||||
}
|
||||
|
||||
.markdown-reading-view .reader p {
|
||||
margin: 0.9em 0;
|
||||
}
|
||||
|
||||
.markdown-reading-view .reader .inline-title,
|
||||
.markdown-reading-view .reader h1,
|
||||
.markdown-reading-view .reader h2,
|
||||
.markdown-reading-view .reader h3 {
|
||||
font-weight: var(--bold-weight);
|
||||
letter-spacing: -0.015em;
|
||||
}
|
||||
|
||||
/*** LEFT-ALIGNED math with cssclass: .math-left ***/
|
||||
|
||||
.math-left {
|
||||
.math-block {
|
||||
text-align: left !important;
|
||||
padding-left: 3ch;
|
||||
padding-right: 3ch;
|
||||
}
|
||||
|
||||
.math-block mjx-container {
|
||||
text-align: left !important;
|
||||
}
|
||||
}
|
||||
1
versions.json
Normal file
1
versions.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ "1.0.0": "0.15.0" }
|
||||
Loading…
Reference in a new issue