Open AirMike opened 6 years ago
@AirMike Are you using v2 or v1?
Sorry, its v2
Yeah, we have a global rule to body
element.
It's because of #30 issue, where we realized:
An error occurred because the .navbar-fixed (from Materialize) nav element is oriented with position: fixed
, which uses the width of the root for size calculation. The walkthrough has a #walk-wrapper
element that is responsible for having the styles that leave the border coloured with that fullscreen effect, growing with a size of 300vw
.
This distorts the size of the content horizontally, affecting the size of the window (and fixed elements get lost with it).
The solution was to wrap the walkthrough with an element #walk-bounds
that has the size of the user window, limiting the overflow of the coloured border.
And to force this wrapper element to be the size of the screen, we needed to set position: relative
to the body.
Maybe you can put it out of css file, a define some option in js file to be set if this css to body needs to be set?
It can be made. But we're trying to make the library less configurable as possible :/ I'll take some time to study this case soon!
any feedback on this?
@menosprezzi i think that the best solution is the options in the JS (by now).
I it will solve the issue, However, we need to review it
Em seg, 21 de mai de 2018 10:21, AirMike notifications@github.com escreveu:
any feedback on this?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/essetwide/material-walkthrough/issues/41#issuecomment-390651977, or mute the thread https://github.com/notifications/unsubscribe-auth/AVAzetLPBMZe0uMKYFRSVh0ybX6q1FJ3ks5t0r90gaJpZM4SZzyQ .
Hi,
setting global rules is not a good practice, and in this case it causes problems on some page layouts when body position is set to relative. One of problem is divs (direct child of body) that needs to be responsove in a way that on the small screen goes to full screen by setting:
What can we do to avoid setting global css rules?