-
-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #317 -- Margin discrepancy light dark mode #318
Fix #317 -- Margin discrepancy light dark mode #318
Conversation
While this does address the position shift, it seems to introduce a weird artifact behind the page elements. As you scroll down the page there is a little black oval that stays fixed to the center of the page. I suspect that this is the dotted effect that exists on the light mode which is being thrown out of wack by the fixed positon. |
justify-content: center; | ||
font-family: 'Varela Round', sans-serif; | ||
width: 100%; | ||
margin: 0 0 0 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems as though simply changing the margin value to include the 8px that exists in the light mode fixes the shift, without introducing the weird oval artifact mentioned in my earlier comment.
margin: 8px 0 0 0;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, nope I was wrong. That causes an 8px white edge at the top, and doesn't correct the shift when scrolled to the bottom of the page.
However... leaving the margin at 0, and instead adding a bit of padding does work.
body.darkmode--activated {
display: flex;
...
margin: 0 0 0 0;
padding: 8px 0;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite, adding padding to the top + bottoms doesn't stop the gutters from disappearing at the sides of the page when darkmode is activated.
I think this problem is caused switch to position: absolute;
ignoring the existing gutters. I'm just updating the branch now, if you do a pull and take a look, that background should be back now (so THAT'S what the position: inherit;
was for)
I think we should hold on this until further discussion around #325 occurrs. This change wouldn't be necessary if we end up removing darkmodejs entirely. |
Sure, that's fine. I'll withdraw this PR. |
#317
Making the darkmode-background
position: fixed;
and removing theposition: absolute;
andmargin: 0;
from the body when darkmode is activated is a clean fix for this. There's also some redundant body styles that I removed.As a side note, I did notice this 'waves' SVG is interfering with darkmode. Not sure if it should still be there?