Skip to content
Snippets Groups Projects
Commit cf710fad authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Jan-Hendrik Willms
Browse files

reduce motion, re #125

parent 76caba67
No related branches found
No related tags found
No related merge requests found
...@@ -200,7 +200,10 @@ ...@@ -200,7 +200,10 @@
overflow-x: hidden; overflow-x: hidden;
padding: 0; padding: 0;
text-indent: -150px; text-indent: -150px;
transition: all 500ms;
@media not (prefers-reduced-motion) {
transition: all 500ms;
}
} }
body.fixed { body.fixed {
#barBottomLeft { #barBottomLeft {
......
...@@ -4,7 +4,7 @@ a, a:link, a:visited { ...@@ -4,7 +4,7 @@ a, a:link, a:visited {
text-decoration: none; text-decoration: none;
&.index { color: #444; } &.index { color: #444; }
&.printhead { color: #339; } &.printhead { color: #339; }
&.tree { color: #000; } &.tree { color: #000; }
&.toolbar { &.toolbar {
color: #91a2b6; color: #91a2b6;
...@@ -12,7 +12,9 @@ a, a:link, a:visited { ...@@ -12,7 +12,9 @@ a, a:link, a:visited {
} }
} }
a[href] { a[href] {
transition: color 0.3s; @media not (prefers-reduced-motion) {
transition: color 0.3s;
}
} }
a[disabled] { a[disabled] {
pointer-events: none; pointer-events: none;
......
...@@ -22,9 +22,11 @@ ...@@ -22,9 +22,11 @@
height: @height; height: @height;
margin-top: @margin; margin-top: @margin;
transition: left @transition-duration, @media not (prefers-reduced-motion) {
right @transition-duration, transition: left @transition-duration,
opacity @transition-duration; right @transition-duration,
opacity @transition-duration;
}
} }
} }
.border-shrink() { .border-shrink() {
......
...@@ -85,7 +85,9 @@ body:not(.fixed) #barTopMenu { ...@@ -85,7 +85,9 @@ body:not(.fixed) #barTopMenu {
// Hide all navigation item title on hover and display only the currently // Hide all navigation item title on hover and display only the currently
// hovered one // hovered one
.navtitle { .navtitle {
transition: opacity 300ms; // Smooth change when entering @media not (prefers-reduced-motion) {
transition: opacity 300ms; // Smooth change when entering
}
} }
&:hover { &:hover {
> li.active .navtitle { > li.active .navtitle {
...@@ -93,7 +95,9 @@ body:not(.fixed) #barTopMenu { ...@@ -93,7 +95,9 @@ body:not(.fixed) #barTopMenu {
} }
> li:hover .navtitle { > li:hover .navtitle {
opacity: 1; opacity: 1;
transition: opacity 0ms; // Quick change when leaving @media not (prefers-reduced-motion) {
transition: opacity 0ms; // Quick change when leaving
}
} }
} }
...@@ -125,13 +129,17 @@ body:not(.fixed) #barTopMenu { ...@@ -125,13 +129,17 @@ body:not(.fixed) #barTopMenu {
// Rotate icon // Rotate icon
> label img { > label img {
transition: transform 300ms; @media not (prefers-reduced-motion) {
transition: transform 300ms;
}
transform: rotate(90deg); transform: rotate(90deg);
} }
// Define transition duration for possible badge on overflow // Define transition duration for possible badge on overflow
> label > a[data-badge]::before { > label > a[data-badge]::before {
transition: opacity 300ms; @media not (prefers-reduced-motion) {
transition: opacity 300ms;
}
} }
// Display menu on activation // Display menu on activation
...@@ -225,7 +233,9 @@ label[for="barTopMenu-toggle"] { ...@@ -225,7 +233,9 @@ label[for="barTopMenu-toggle"] {
height: 0; height: 0;
max-height: 0; max-height: 0;
opacity: 0; opacity: 0;
transition: all 300ms; @media not (prefers-reduced-motion) {
transition: all 300ms;
}
// 1/4 of the screen's width, creates a bigger hover area // 1/4 of the screen's width, creates a bigger hover area
width: 25vw; width: 25vw;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment