Skip to content

Commit

Permalink
Admonitions glow up
Browse files Browse the repository at this point in the history
  • Loading branch information
dphfox committed Aug 28, 2024
1 parent 6395ac6 commit 776cf5e
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/api-reference/graph/types/graphobject.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ The return value is `true` when a 'meaningful change' occurs because of this
revalidation. A 'meaningful change' is one that would affect dependencies'
behaviour. This is used to efficiently skip over calculations for dependencies.

!!! fail "Restrictions"
!!! failure "Restrictions"
This method should finish without spawning new processes, blocking the
thread, or erroring.
51 changes: 48 additions & 3 deletions docs/assets/theme/admonition.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,56 @@
background: none !important;
}

[dir="ltr"] .md-typeset :is(.admonition, details) {
.md-typeset :is(.admonition, details) {
border-radius: 0.25rem;
border-width: 0.1rem;
border-width: 0.1rem !important;
box-shadow:
0 0.25em 1.5em -0.75em var(--admonition-color),
inset 0 1em 2em -2em var(--admonition-color)
!important;
}

[data-md-color-scheme="fusiondoc-dark"] .md-typeset :is(.admonition, details) {
.md-typeset :is(.admonition, details) > :is(.admonition-title, summary)::before {
background-color: currentColor;
}

.md-typeset .note {
--admonition-color: #448aff;
}
.md-typeset .abstract {
--admonition-color: #00b0ff;
}
.md-typeset .info {
--admonition-color: #00b8d4;
}
.md-typeset .tip {
--admonition-color: #00bfa5;
}
.md-typeset .success {
--admonition-color: #00c853;
}
.md-typeset .question {
--admonition-color: #64dd17;
}
.md-typeset .warning {
--admonition-color: #ff9100;
}
.md-typeset .failure {
--admonition-color: #ff5252;
}
.md-typeset .danger {
--admonition-color: #ff1744;
}
.md-typeset .bug {
--admonition-color: #f50057;
}
.md-typeset .example {
--admonition-color: #7c4dff;
}
.md-typeset .quote {
--admonition-color: #9e9e9e;
}

[data-md-color-scheme="fusiondoc-dark"] .md-typeset .admonition.details {
--md-code-bg-color: var(--fusiondoc-grey-1);
}
2 changes: 1 addition & 1 deletion docs/tutorials/best-practices/instance-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ return {
}
```

!!! fail "Returning multiple values is fragile"
!!! failure "Returning multiple values is fragile"
Don't return multiple values directly from your function. When a function
returns multiple values directly, the extra returned values can easily get
lost.
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/best-practices/optimisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ to do, or avoid a few problematic scenarios that slow Fusion down.

Fusion tries to skip updates when they result in 'meaningless changes'.

!!! summary "TL;DR"
!!! abstract "TL;DR"
When your computations return values that aren't meaningfully different,
Fusion doesn't bother to perform further updates.

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/fundamentals/scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ local scope = scoped(Fusion, {

You can do this for as many tables as you need.

!!! fail "Conflicting names"
!!! failure "Conflicting names"
If you pass in two tables that contain things with the same name, `scoped()`
will error.

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ You'll not only learn how Fusion's features work, but you'll also be presented
with wisdom from those who've worked with some of the largest Fusion codebases
today.

!!! caution "But first, some advice from the maintainers..."
!!! warning "But first, some advice from the maintainers..."
**<span style="font-size: 1.5em; color: var(--fusiondoc-accent);">
Fusion is pre-1.0 software.
</span>**
Expand Down

0 comments on commit 776cf5e

Please sign in to comment.