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,8 +200,11 @@ ...@@ -200,8 +200,11 @@
overflow-x: hidden; overflow-x: hidden;
padding: 0; padding: 0;
text-indent: -150px; text-indent: -150px;
@media not (prefers-reduced-motion) {
transition: all 500ms; transition: all 500ms;
} }
}
body.fixed { body.fixed {
#barBottomLeft { #barBottomLeft {
overflow-x: visible; overflow-x: visible;
......
...@@ -12,8 +12,10 @@ a, a:link, a:visited { ...@@ -12,8 +12,10 @@ a, a:link, a:visited {
} }
} }
a[href] { a[href] {
@media not (prefers-reduced-motion) {
transition: color 0.3s; transition: color 0.3s;
} }
}
a[disabled] { a[disabled] {
pointer-events: none; pointer-events: none;
} }
......
...@@ -22,11 +22,13 @@ ...@@ -22,11 +22,13 @@
height: @height; height: @height;
margin-top: @margin; margin-top: @margin;
@media not (prefers-reduced-motion) {
transition: left @transition-duration, transition: left @transition-duration,
right @transition-duration, right @transition-duration,
opacity @transition-duration; opacity @transition-duration;
} }
} }
}
.border-shrink() { .border-shrink() {
left: 50%; left: 50%;
right: 50%; right: 50%;
......
...@@ -85,17 +85,21 @@ body:not(.fixed) #barTopMenu { ...@@ -85,17 +85,21 @@ 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 {
@media not (prefers-reduced-motion) {
transition: opacity 300ms; // Smooth change when entering transition: opacity 300ms; // Smooth change when entering
} }
}
&:hover { &:hover {
> li.active .navtitle { > li.active .navtitle {
opacity: 0; opacity: 0;
} }
> li:hover .navtitle { > li:hover .navtitle {
opacity: 1; opacity: 1;
@media not (prefers-reduced-motion) {
transition: opacity 0ms; // Quick change when leaving transition: opacity 0ms; // Quick change when leaving
} }
} }
}
// Recolor on hover and for active items // Recolor on hover and for active items
li:hover, li:hover,
...@@ -125,14 +129,18 @@ body:not(.fixed) #barTopMenu { ...@@ -125,14 +129,18 @@ body:not(.fixed) #barTopMenu {
// Rotate icon // Rotate icon
> label img { > label img {
@media not (prefers-reduced-motion) {
transition: transform 300ms; 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 {
@media not (prefers-reduced-motion) {
transition: opacity 300ms; transition: opacity 300ms;
} }
}
// Display menu on activation // Display menu on activation
&:hover label, &:hover label,
...@@ -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;
@media not (prefers-reduced-motion) {
transition: all 300ms; 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.
Please register or to comment