Behaviour SwRS-MDOKFSTUDIO-CORE-050
Soft appearance and colour transitions honour reduced motion
When the preview shows an editor, a bar, a menu, a closed editor or a theme change, the extension SHALL animate it softly by the rules of the scenarios and apply no preview motion when the user prefers reduced motion.
Part of StRS-MDOKFSTUDIO-CORE-001, outside the paths drawn on its map.
Step 1 of path 2 in StRS-MDOKFSTUDIO-PALETTE-005: from “A block text box is open in edit mode” to “The palette is shown”.
Step 1 of path 2 in StRS-MDOKFSTUDIO-THEME-002: from “The page is shown in one theme mode” to “The theme has changed without animation”.
Scenarios 6
The situations the tests check; open one to read it.
nominalSoft appearance after the first input
Givena fresh page with no pointer press or key press yet
Whenan editor opens
Thenit appears without animation
after a first pointer press or key press, an editor, bar or menu that opens appears softly
after a first pointer press or key press, an editor, bar or menu that opens appears softly
nominalNo soft appearance after a content patch
Givensoft appearance is on after a pointer press
Whena content patch replaces the content and an editor opens
Thenit appears without animation
after a following key press, an editor that opens appears softly again
after a following key press, an editor that opens appears softly again
nominalPalette, popovers and slash menu
Givensoft appearance is on (the attribute data-sphinx-preview-motion is on)
Whenan edition palette appears
Thenit starts transparent and fades in over the fast motion time of 120 ms
a popover or the slash menu starts transparent 3 px above its place and fades in over the same time
a popover or the slash menu starts transparent 3 px above its place and fades in over the same time
nominalClosed editor and theme change
| Input | Outcome |
|---|---|
| a block editor closes while soft appearance is on | the rendered block fades in |
| a theme switch | the colours transition once |
| the page idles after the switch | no transition repeats |
nominalReduced-motion attribute
| Input | Outcome |
|---|---|
| the system prefers reduced motion, page start or a theme change reported by the host | data-sphinx-preview-reduced-motion of the html element reads true |
| a system without that preference, or a window without matchMedia | the attribute reads false |
refusalReduced motion
| Input | Outcome |
|---|---|
| `prefers-reduced-motion: reduce` and a block changes | no glow, fade or transition runs |
| reduced motion and a block editor closes | the block appears without fade |
| reduced motion and the palette, a popover or the slash menu appears | shown without any fade |
| no such preference and a block changes | the glow runs |
Implemented in 3
Tested by 4
Replaces
SwRS-MDOKFSTUDIO-CORE-051Enable soft appearance after the first input superseded superseded by SwRS-MDOKFSTUDIO-CORE-050 Markdown file
SwRS-MDOKFSTUDIO-CORE-052Fade a closed editor back to its block superseded superseded by SwRS-MDOKFSTUDIO-CORE-050 Markdown file
SwRS-MDOKFSTUDIO-CORE-053Transition colours once on theme change superseded superseded by SwRS-MDOKFSTUDIO-CORE-050 Markdown file
SwRS-MDOKFSTUDIO-CORE-068Disable soft appearance after a content patch superseded superseded by SwRS-MDOKFSTUDIO-CORE-050 Markdown file