You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed some third party plugins or components modify the inline styles of the body element.
For example, when opening and closing a burger menu some set the overflow attribute to an empty string overflow: '', which results in fullPages.js not being scrollable anymore when in responsive mode.
It basically overwrites the inline attribute fullPage.js sets on the body, which is overflow: visible;.
And then it inherits the one from .fp-enabled body, html.fp-enabled which is overflow: hidden.
So I'm thinking we can probably:
1- Set those inline attributes with !important.
2- Or instead create a new class for those also with !important on them.
This will make it a bit more resistant to third-party plugins playing with those properties. Although it won't make it resistant to other !important declarations.
If any of the inline CSS has !important on it, it can definitely effect custom CSS on 3p libs, and may break their functionality. I'd go with the option 2.
Another idea would be to add another CSS rule that has the body with overflow hidden with inline overflow hidden at the same time, so even if 3p library remove the inline CSS, overflow would still be there without the !important.
Another idea would be to add another CSS rule that has the body with overflow hidden with inline overflow hidden at the same time, so even if 3p library remove the inline CSS, overflow would still be there without the !important.
I noticed some third party plugins or components modify the inline styles of the
body
element.For example, when opening and closing a burger menu some set the
overflow
attribute to an empty stringoverflow: ''
, which results in fullPages.js not being scrollable anymore when in responsive mode.It basically overwrites the inline attribute fullPage.js sets on the
body
, which isoverflow: visible;
.And then it inherits the one from
.fp-enabled body, html.fp-enabled
which isoverflow: hidden
.So I'm thinking we can probably:
1- Set those inline attributes with
!important
.2- Or instead create a new class for those also with
!important
on them.This will make it a bit more resistant to third-party plugins playing with those properties. Although it won't make it resistant to other
!important
declarations.Reproduction:
https://codepen.io/alvarotrigo/pen/eYqBoBb
Steps
The text was updated successfully, but these errors were encountered: