Skip to content

Commit 816865f

Browse files
Antosikjanosh
andauthored
Breaking: Svelte 5 (#295)
* breaking: update deps, move svelte to peerdeps * misc: update vite/svelte configs * breaking: auto-migrate to svelte5 * fix: update icons to svelte5 * misc: update scrollIntoViewIfNeeded definition * docs: update contributing * breaking: update Wiggle & require svelte 5.8 * breaking: auto-migrate MultiSelect to svelte5 & update slotNames * breaking: migrate MultiSelect to svelte5, update props & events * fix: update remaining lib components to svelte5 * fix: remove package-lock * fix: return option naming for slot * fix: fix warnings and codestyle * fix: fix Spring usage in Wiggle * tests: update unit tests * fix: remove package-lock * fix package.json import in svelte.config.js by updating to 'with' syntax * deps: update dependencies * misc: update tsconfig to sveltekit latest * fix: update routes & site to svelte5 * - fix failing package.json import in svelte.config.js to use 'with' syntax - add bubble, stopPropagation, preventDefault event modifier functions in MultiSelect.svelte - skip readme tests (no longer work due to different code structure not matching Svelte 4 specific regexes) * misc: ignore test results folder * misc: update tests configs * misc: better props types * test: update tests * bump package deps, fix eslint errors, remove semicolons * fix MultiSelect.svelte.test.ts unit tests * refactor imports * stricter link check with lychee over markdown-link-check * refactor: consolidate utility functions into single utils.ts file * bum package deps * MultiSelect.svelte remove global CSS scoping * pnpm remove @testing-library/jest-dom @testing-library/svelte @testing-library/user-event, reverting MultiSelect.svelte.test.ts to pure vitest * rename <Name>Slot.svelte to <Name>Snippet.svelte (more terminology change needed in docs) - restore running end-to-end tests in GitHub Actions - MultiSelect forward ...rest props to the input element * add install-e2e: npx playwright install chromium * readme migrate slot example to svelte 5 snippets and remove breaking changes section * fix missing $state() runes in examples - MultiSelect.svelte CSS: replace `:where` with `:is` for less recessive button styles - single Toc component in +layout.svelte for /, /changelog, /contributing - remove redundant Toc imports and instances from +page.svelte, changelog, and contributing pages - fix async loading of changelog in +page.server.ts * fix vestiges of svelte 4 event props (on:event -> onevent) * MultiSelect.svelte replace :where() with :is() in all CSS selectors * fix failing playwright tests --------- Co-authored-by: Janosh Riebesell <[email protected]>
1 parent 91f22d0 commit 816865f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1823
-1165
lines changed

.github/workflows/link-check.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
name: Link Check
1+
name: Link check
22

33
on:
44
push:
55
branches: [main]
66
pull_request:
77
branches: [main]
8-
paths: ['**/*.md']
9-
schedule:
10-
- cron: '0 0 1 * *' # monthly
118

129
jobs:
13-
markdown-link-check:
14-
uses: janosh/workflows/.github/workflows/markdown-link-check.yml@main
10+
link-check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out repo
14+
uses: actions/checkout@v4
15+
16+
- name: Discover broken links
17+
uses: lycheeverse/lychee-action@v2
18+
with:
19+
args: --exclude '%7B' --accept 100..=103,200..=299,403,429 -- ./**/*.{md,svelte,ts}
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ jobs:
1414
uses: janosh/workflows/.github/workflows/npm-test.yml@main
1515
with:
1616
test-cmd: npm run test:unit
17+
install-e2e: npx playwright install chromium
18+
e2e-test-cmd: npx playwright test tests/*.ts

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,10 @@ node_modules
66
build
77
dist
88

9+
# test results
10+
test-results
11+
912
# test coverage reports
1013
coverage
14+
15+
package-lock.json

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ repos:
3838
exclude: changelog\.md
3939

4040
- repo: https://github.com/pre-commit/mirrors-eslint
41-
rev: v9.19.0
41+
rev: v9.24.0
4242
hooks:
4343
- id: eslint
4444
types: [file]

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ All notable changes to this project will be documented in this file. Dates are d
363363
- Move examples to new `src/routes/demos` dir [`#63`](https://github.com/janosh/svelte-multiselect/pull/63)
364364
- make ToC position fixed (closes #64) [`#64`](https://github.com/janosh/svelte-multiselect/issues/64)
365365
- check for undefined (not falsy) value in rawOp processing (fixes #65) [`#65`](https://github.com/janosh/svelte-multiselect/issues/65)
366-
- LanguageSlot change SVG icons src repo to vscode-icons for more coverage [`92390e9`](https://github.com/janosh/svelte-multiselect/commit/92390e937a063b2b0c88e0ac6f9a9d8f3cb1eadd)
366+
- LanguageSnippet change SVG icons src repo to vscode-icons for more coverage [`92390e9`](https://github.com/janosh/svelte-multiselect/commit/92390e937a063b2b0c88e0ac6f9a9d8f3cb1eadd)
367367
- more preselected slots in Examples.svelte [`cd0a01a`](https://github.com/janosh/svelte-multiselect/commit/cd0a01a7a6b319299642b3c24c5caea8dc9dc24d)
368368

369369
#### [v4.0.3](https://github.com/janosh/svelte-multiselect/compare/v4.0.2...v4.0.3)

package.json

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,47 +15,49 @@
1515
"preview": "vite preview",
1616
"package": "svelte-package",
1717
"serve": "vite build && vite preview",
18-
"check": "svelte-check --ignore dist",
19-
"test": "vitest --run --coverage tests/unit/*.ts && playwright test tests/*.test.ts",
18+
"check": "svelte-check src",
19+
"test": "vitest --run --coverage tests/unit/*.ts && npm run test:e2e",
2020
"test:unit": "vitest tests/unit/*.ts",
2121
"test:e2e": "playwright test tests/*.test.ts",
2222
"changelog": "npx auto-changelog --package --output changelog.md --hide-empty-releases --hide-credit --commit-limit false",
2323
"update-coverage": "vitest tests/unit --run --coverage && npx istanbul-badges-readme"
2424
},
25-
"dependencies": {
26-
"svelte": "4.2.12"
25+
"peerDependencies": {
26+
"svelte": "^5.8.0"
2727
},
2828
"devDependencies": {
29-
"@iconify/svelte": "^4.0.2",
30-
"@playwright/test": "^1.48.1",
31-
"@stylistic/eslint-plugin": "^2.12.1",
32-
"@sveltejs/adapter-static": "^3.0.5",
33-
"@sveltejs/kit": "^2.7.2",
34-
"@sveltejs/package": "2.3.5",
35-
"@sveltejs/vite-plugin-svelte": "3.0.2",
36-
"@vitest/coverage-v8": "^2.1.3",
37-
"eslint": "^9.13.0",
38-
"eslint-plugin-svelte": "^2.46.0",
39-
"globals": "^15.11.0",
40-
"hastscript": "^9.0.0",
41-
"highlight.js": "^11.10.0",
42-
"jsdom": "^25.0.1",
43-
"mdsvex": "^0.12.3",
44-
"mdsvexamples": "^0.4.1",
45-
"prettier": "^3.3.3",
46-
"prettier-plugin-svelte": "^3.2.7",
29+
"@iconify/svelte": "^5.0.0",
30+
"@playwright/test": "^1.52.0",
31+
"@stylistic/eslint-plugin": "^4.2.0",
32+
"@sveltejs/adapter-static": "^3.0.8",
33+
"@sveltejs/kit": "^2.21.0",
34+
"@sveltejs/package": "2.3.11",
35+
"@sveltejs/vite-plugin-svelte": "^5.0.3",
36+
"@types/node": "^22.15.18",
37+
"@vitest/coverage-v8": "^3.1.3",
38+
"eslint": "^9.26.0",
39+
"eslint-plugin-svelte": "^3.6.0",
40+
"globals": "^16.1.0",
41+
"hastscript": "^9.0.1",
42+
"highlight.js": "^11.11.1",
43+
"jsdom": "^26.1.0",
44+
"mdsvex": "^0.12.6",
45+
"mdsvexamples": "^0.5.0",
46+
"prettier": "^3.5.3",
47+
"prettier-plugin-svelte": "^3.3.3",
4748
"rehype-autolink-headings": "^7.1.0",
4849
"rehype-slug": "^6.0.0",
49-
"svelte-check": "^4.0.5",
50-
"svelte-multiselect": "^10.3.0",
50+
"svelte": "^5.28.6",
51+
"svelte-check": "^4.1.7",
52+
"svelte-multiselect": "11.0.0-rc.1",
5153
"svelte-preprocess": "^6.0.3",
52-
"svelte-toc": "^0.5.9",
53-
"svelte-zoo": "^0.4.13",
54-
"svelte2tsx": "^0.7.22",
55-
"typescript": "5.6.3",
56-
"typescript-eslint": "^8.11.0",
57-
"vite": "^5.4.9",
58-
"vitest": "^2.1.3"
54+
"svelte-toc": "^0.6.0",
55+
"svelte-zoo": "^0.4.18",
56+
"svelte2tsx": "^0.7.37",
57+
"typescript": "5.8.3",
58+
"typescript-eslint": "^8.32.1",
59+
"vite": "^6.3.5",
60+
"vitest": "^3.1.3"
5961
},
6062
"keywords": [
6163
"svelte",

playwright.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import type { PlaywrightTestConfig } from '@playwright/test'
22

33
export default {
44
webServer: {
5-
command: `vite dev --port 3005`,
5+
command: `npm run build && npm run preview -- --port 3005`,
66
port: 3005,
7+
reuseExistingServer: true,
78
},
9+
testDir: `tests`,
10+
testMatch: `tests/*.test.ts`,
11+
timeout: 5000,
812
} satisfies PlaywrightTestConfig

readme.md

Lines changed: 40 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -40,34 +40,6 @@
4040
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
4141
| ![Statements](https://img.shields.io/badge/statements-97.94%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-79.39%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-97.94%25-brightgreen.svg?style=flat) |
4242

43-
## 📜 &thinsp; Breaking changes
44-
45-
- **8.0.0** (2022-10-22)&nbsp;
46-
- Props `selectedLabels` and `selectedValues` were removed. If you were using them, they were equivalent to assigning `bind:selected` to a local variable and then running `selectedLabels = selected.map(option => option.label)` and `selectedValues = selected.map(option => option.value)` if your options were objects with `label` and `value` keys. If they were simple strings/numbers, there was no point in using `selected{Labels,Values}` anyway. [PR 138](https://github.com/janosh/svelte-multiselect/pull/138)
47-
- Prop `noOptionsMsg` was renamed to `noMatchingOptionsMsg`. [PR 133](https://github.com/janosh/svelte-multiselect/pull/133).
48-
- **v8.3.0** (2023-01-25)&nbsp; `addOptionMsg` was renamed to `createOptionMsg` (no major since version since it's rarely used) [sha](https://github.com/janosh/svelte-multiselect/commits).
49-
- **v9.0.0** (2023-06-01)&nbsp; Svelte bumped from v3 to v4. Also, not breaking but noteworthy: MultiSelect received a default slot that functions as both `"option"` and `"selected"`. If you previously had two identical slots for `"option"` and `"selected"`, you can now remove the `name` from one of them and drop the other:
50-
51-
```diff
52-
<MultiSelect
53-
{options}
54-
+ let:option
55-
>
56-
- <SlotComponent let:option {option} slot="selected" />
57-
- <SlotComponent let:option {option} slot="option" />
58-
+ <SlotComponent {option} />
59-
</MultiSelect>
60-
```
61-
62-
- **v10.0.0** (2023-06-23)&nbsp; `duplicateFunc()` renamed to `key` in [#238](https://github.com/janosh/svelte-multiselect/pull/238). Signature changed:
63-
64-
```diff
65-
- duplicateFunc: (op1: T, op2: T) => boolean = (op1, op2) => `${get_label(op1)}`.toLowerCase() === `${get_label(op2)}`.toLowerCase()
66-
+ key: (opt: T) => unknown = (opt) => `${get_label(opt)}`.toLowerCase()
67-
```
68-
69-
Rather than implementing custom equality in `duplicateFunc`, the `key` function is now expected to map options to a unique identifier. `key(op1) === key(op2)` should mean `op1` and `op2` are the same option. `key` can return any type but usually best to return primitives (`string`, `number`, ...) for Svelte keyed each blocks (see [#217](https://github.com/janosh/svelte-multiselect/pull/217)).
70-
7143
## 🔨 &thinsp; Installation
7244

7345
```sh
@@ -84,7 +56,7 @@ yarn add --dev svelte-multiselect
8456
8557
const ui_libs = [`Svelte`, `React`, `Vue`, `Angular`, `...`]
8658
87-
let selected = []
59+
let selected = $state([])
8860
</script>
8961
9062
Favorite Frontend Tools?
@@ -257,7 +229,7 @@ Full list of props/bindable variables for this component. The `Option` type you
257229
loading: boolean = false
258230
```
259231

260-
Whether the component should display a spinner to indicate it's in loading state. Use `<slot name='spinner'>` to specify a custom spinner.
232+
Whether the component should display a spinner to indicate it's in loading state. Use `{#snippet spinner()} ... {/snippet}` to specify a custom spinner.
261233

262234
1. ```ts
263235
matchingOptions: Option[] = []
@@ -423,35 +395,42 @@ Full list of props/bindable variables for this component. The `Option` type you
423395

424396
If `maxSelect={1}`, `value` will be the single item in `selected` (or `null` if `selected` is empty). If `maxSelect != 1`, `maxSelect` and `selected` are equal. Warning: Setting `value` does not rendered state on initial mount, meaning `bind:value` will update local variable `value` whenever internal component state changes but passing a `value` when component first mounts won't be reflected in UI. This is because the source of truth for rendering is `bind:selected`. `selected` is reactive to `value` internally but only on reassignment from initial value. Suggestions for better solutions than [#249](https://github.com/janosh/svelte-multiselect/issues/249) welcome!
425397

426-
## 🎰 &thinsp; Slots
398+
## 🎰 &thinsp; Snippets
427399

428-
`MultiSelect.svelte` accepts the following named slots:
400+
`MultiSelect.svelte` accepts the following named snippets:
429401

430-
1. `slot="option"`: Customize rendering of dropdown options. Receives as props an `option` and the zero-indexed position (`idx`) it has in the dropdown.
431-
1. `slot="selected"`: Customize rendering of selected items. Receives as props an `option` and the zero-indexed position (`idx`) it has in the list of selected items.
432-
1. `slot="spinner"`: Custom spinner component to display when in `loading` state. Receives no props.
433-
1. `slot="disabled-icon"`: Custom icon to display inside the input when in `disabled` state. Receives no props. Use an empty `<span slot="disabled-icon" />` or `div` to remove the default disabled icon.
434-
1. `slot="expand-icon"`: Allows setting a custom icon to indicate to users that the Multiselect text input field is expandable into a dropdown list. Receives prop `open: boolean` which is true if the Multiselect dropdown is visible and false if it's hidden.
435-
1. `slot="remove-icon"`: Custom icon to display as remove button. Will be used both by buttons to remove individual selected options and the 'remove all' button that clears all options at once. Receives no props.
436-
1. `slot="user-msg"`: Displayed like a dropdown item when the list is empty and user is allowed to create custom options based on text input (or if the user's text input clashes with an existing option). Receives props:
402+
1. `#snippet option({ option, idx })`: Customize rendering of dropdown options. Receives as props an `option` and the zero-indexed position (`idx`) it has in the dropdown.
403+
1. `#snippet selectedItem({ option, idx })`: Customize rendering of selected items. Receives as props an `option` and the zero-indexed position (`idx`) it has in the list of selected items.
404+
1. `#snippet spinner()`: Custom spinner component to display when in `loading` state. Receives no props.
405+
1. `#snippet disabledIcon()`: Custom icon to display inside the input when in `disabled` state. Receives no props. Use an empty `{#snippet disabledIcon()}{/snippet}` to remove the default disabled icon.
406+
1. `#snippet expandIcon()`: Allows setting a custom icon to indicate to users that the Multiselect text input field is expandable into a dropdown list. Receives prop `open: boolean` which is true if the Multiselect dropdown is visible and false if it's hidden.
407+
1. `#snippet removeIcon()`: Custom icon to display as remove button. Will be used both by buttons to remove individual selected options and the 'remove all' button that clears all options at once. Receives no props.
408+
1. `#snippet userMsg({ searchText, msgType, msg })`: Displayed like a dropdown item when the list is empty and user is allowed to create custom options based on text input (or if the user's text input clashes with an existing option). Receives props:
437409
- `searchText`: The text user typed into search input.
438410
- `msgType: false | 'create' | 'dupe' | 'no-match'`: `'dupe'` means user input is a duplicate of an existing option. `'create'` means user is allowed to convert their input into a new option not previously in the dropdown. `'no-match'` means user input doesn't match any dropdown items and users are not allowed to create new options. `false` means none of the above.
439-
- `msg`: Will be `duplicateOptionMsg` or `createOptionMsg` (see [props](#🔣-props)) based on whether user input is a duplicate or can be created as new option. Note this slot replaces the default UI for displaying these messages so the slot needs to render them instead (unless purposely not showing a message).
440-
1. `slot='after-input'`: Placed after the search input. For arbitrary content like icons or temporary messages. Receives props `selected: Option[]`, `disabled: boolean`, `invalid: boolean`, `id: string | null`, `placeholder: string`, `open: boolean`, `required: boolean`. Can serve as a more dynamic, more customizable alternative to the `placeholder` prop.
411+
- `msg`: Will be `duplicateOptionMsg` or `createOptionMsg` (see [props](#🔣-props)) based on whether user input is a duplicate or can be created as new option. Note this snippet replaces the default UI for displaying these messages so the snippet needs to render them instead (unless purposely not showing a message).
412+
1. `snippet='after-input'`: Placed after the search input. For arbitrary content like icons or temporary messages. Receives props `selected: Option[]`, `disabled: boolean`, `invalid: boolean`, `id: string | null`, `placeholder: string`, `open: boolean`, `required: boolean`. Can serve as a more dynamic, more customizable alternative to the `placeholder` prop.
441413

442-
Example using several slots:
414+
Example using several snippets:
443415

444416
```svelte
445-
<MultiSelect options={[`Red`, `Green`, `Blue`, `Yellow`, `Purple`]} let:idx let:option>
446-
<!-- default slot overrides rendering of both dropdown-listed and selected options -->
447-
<span>
448-
{idx + 1}
449-
{option.label}
450-
<span style:background={option.label} style=" width: 1em; height: 1em;" />
451-
</span>
452-
453-
<CustomSpinner slot="spinner">
454-
<strong slot="remove-icon">X</strong>
417+
<MultiSelect options={[`Red`, `Green`, `Blue`, `Yellow`, `Purple`]}>
418+
{#snippet children({ idx, option })}
419+
<span style="display: flex; align-items: center; gap: 6pt;">
420+
<span
421+
style:background={`${option}`}
422+
style="border-radius: 50%; width: 1em; height: 1em;"
423+
></span>
424+
{idx + 1}
425+
{option}
426+
</span>
427+
{/snippet}
428+
{#snippet spinner()}
429+
<CustomSpinner />
430+
{/snippet}
431+
{#snippet removeIcon()}
432+
<strong>X</strong>
433+
{/snippet}
455434
</MultiSelect>
456435
```
457436

@@ -460,37 +439,37 @@ Example using several slots:
460439
`MultiSelect.svelte` dispatches the following events:
461440

462441
1. ```ts
463-
on:add={(event) => console.log(event.detail.option)}
442+
onadd={(event) => console.log(event.detail.option)}
464443
```
465444

466445
Triggers when a new option is selected. The newly selected option is provided as `event.detail.option`.
467446

468447
1. ```ts
469-
on:remove={(event) => console.log(event.detail.option)}`
448+
onremove={(event) => console.log(event.detail.option)}`
470449
```
471450

472451
Triggers when a single selected option is removed. The removed option is provided as `event.detail.option`.
473452

474453
1. ```ts
475-
on:removeAll={(event) => console.log(event.detail.options)}`
454+
onremoveAll={(event) => console.log(event.detail.options)}`
476455
```
477456

478457
Triggers when all selected options are removed. The payload `event.detail.options` gives the options that were previously selected.
479458

480459
1. ```ts
481-
on:change={(event) => console.log(`${event.detail.type}: '${event.detail.option}'`)}
460+
onchange={(event) => console.log(`${event.detail.type}: '${event.detail.option}'`)}
482461
```
483462
484463
Triggers when an option is either added (selected) or removed from selected, or all selected options are removed at once. `type` is one of `'add' | 'remove' | 'removeAll'` and payload will be `option: Option` or `options: Option[]`, respectively.
485464
486465
1. ```ts
487-
on:open={(event) => console.log(`Multiselect dropdown was opened by ${event}`)}
466+
onopen={(event) => console.log(`Multiselect dropdown was opened by ${event}`)}
488467
```
489468
490469
Triggers when the dropdown list of options appears. Event is the DOM's `FocusEvent`,`KeyboardEvent` or `ClickEvent` that initiated this Svelte `dispatch` event.
491470
492471
1. ```ts
493-
on:close={(event) => console.log(`Multiselect dropdown was closed by ${event}`)}
472+
onclose={(event) => console.log(`Multiselect dropdown was closed by ${event}`)}
494473
```
495474
496475
Triggers when the dropdown list of options disappears. Event is the DOM's `FocusEvent`, `KeyboardEvent` or `ClickEvent` that initiated this Svelte `dispatch` event.
@@ -499,7 +478,7 @@ For example, here's how you might annoy your users with an alert every time one
499478
500479
```svelte
501480
<MultiSelect
502-
on:change={(e) => {
481+
onchange={(e) => {
503482
if (e.detail.type === 'add') alert(`You added ${e.detail.option}`)
504483
if (e.detail.type === 'remove') alert(`You removed ${e.detail.option}`)
505484
if (e.detail.type === 'removeAll') alert(`You removed ${e.detail.options}`)
@@ -514,7 +493,7 @@ The above list of events are [Svelte `dispatch` events](https://svelte.dev/tutor
514493
```svelte
515494
<MultiSelect
516495
options={[1, 2, 3]}
517-
on:keyup={(event) => console.log('key', event.target.value)}
496+
onkeyup={(event) => console.log('key', event.target.value)}
518497
/>
519498
```
520499

@@ -534,7 +513,7 @@ const options = [42, 69]
534513
// type Option = number
535514
```
536515

537-
The inferred type of `Option` is used to enforce type-safety on derived props like `selected` as well as slot components. E.g. you'll get an error when trying to use a slot component that expects a string if your options are objects (see [this comment](https://github.com/janosh/svelte-multiselect/pull/189/files#r1058853697) for example screenshots).
516+
The inferred type of `Option` is used to enforce type-safety on derived props like `selected` as well as snippets. E.g. you'll get an error when trying to use a snippet that expects a string if your options are objects (see [this comment](https://github.com/janosh/svelte-multiselect/pull/189/files#r1058853697) for example screenshots).
538517

539518
You can also import [the types this component uses](https://github.com/janosh/svelte-multiselect/blob/main/src/lib/index.ts) for downstream applications:
540519

src/app.css

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,10 @@
1212
--sms-li-disabled-bg: black;
1313
--sms-placeholder-color: lightgray;
1414

15-
--toc-mobile-bg: #1c0e3e;
16-
--toc-li-padding: 3pt 1ex;
17-
--toc-mobile-btn-color: white;
18-
--toc-desktop-nav-margin: 0 0 0 1em;
19-
--toc-active-bg: teal;
20-
2115
--zoo-github-corner-color: var(--night);
2216
--zoo-github-corner-bg: white;
2317
--zoo-example-margin: 1em auto;
18+
--zoo-example-btn-bg: none;
2419
}
2520
body {
2621
background: var(--night);
@@ -41,14 +36,13 @@ a.btn {
4136
cursor: pointer;
4237
border: none;
4338
border-radius: 3pt;
44-
background-color: teal;
4539
padding: 2pt 4pt;
4640
font-size: 12pt;
4741
line-height: initial;
4842
transition: background-color 0.2s;
43+
background-color: rgba(31, 182, 205, 0.425);
4944
}
5045
:is(button, a.btn):hover {
51-
background-color: teal;
5246
color: white;
5347
}
5448
a {
@@ -90,7 +84,7 @@ table {
9084
border-collapse: collapse;
9185
}
9286
table :is(td, th) {
93-
border: 1px dashed teal;
87+
border: 1px dashed rgba(255, 255, 255, 0.2);
9488
padding: 5pt 9pt;
9589
}
9690
table img {

0 commit comments

Comments
 (0)