Comments (8)
Could you setup a test page? We need to see if this flickering still occurs in the last two versions of major browsers, and if so, exactly which browsers+versions this occurs in so that it can be precisely documented.
from sanitize.css.
Sure, I just whipped up a Codepen in 2 seconds. You see the "Open" and "Close" hyperlinks moving left/right...
http://codepen.io/davidhund/full/EaGWWG
from sanitize.css.
Awesome work (even if it was quick)! While I do see the scrollbar appear, I do not see any shifting in Chrome 40, Firefox 36, or Safari 8.0.5 for Mac. Which OSs/Browsers/Versions were you able to test?
from sanitize.css.
I see a (very slight) jump on Safari 6.1.6, Chrome 41.0.2272.89 and Firefox 31.0, all on the mac.
Make sure the content is centered (screen is > 30em) and place your mouse 'hand' cursor in the bottom middle of the "O" of the "Open" hyperlink. Clicking without moving your mouse pointer will show a shift and the pointer will be below the "l" of "Close". Clicking again.. etc... :-)
I could only quickly test on an older iMac but I'm pretty sure it happens almost everywhere...
from sanitize.css.
This would depend on the scroll bar settings in the OS. I agree that it's a good idea to add. I always thought of it as "layout shifting".
from sanitize.css.
Yes, I used to be a huge advocate of this, and I guess my experience on a Mac (and my secret hope) was that it was resolved. This shouldn’t be blocked by any other requests, even #2, which suggests overflow: hidden on all the things.
I would like to run a few more tests, particularly to see how Windows IE10+ machines handle this change, and how background images or colored, full-width elements are affected.
from sanitize.css.
I now believe :root { overflow-y: scroll; }
is safe to add in. For operating systems and browsers that use the overlay scrollbar style, this pleasurable effect is not lost by defining overflow-y
.
Also, a major aww yiss:
:root {
-ms-overflow-style: -ms-autohiding-scrollbar; // gives IE the overlay style
}
That was tested in IE10 for Windows 7.
Notes:
- MacOS Lion introduced the overlay style for scrollbars.
- The overlay style does not impact horizontal space, which is nice.
- MSDN mentions an -ms-overflow-style property that may be worth setting to
-ms-autohiding-scrollbar
by default, if it is supported in any IE. - Firefox added support for the overlay style: after hating on it. It’s a fun read.
- There is no standard forthcoming for this overlay style. If there was, it fizzled.
See:
from sanitize.css.
Nice!
After-the-fact-FYI: Win7 Chrome 41.0.2272.89, Fx 36 and IE11 all have the layout shift.
Cool find re: -ms-autohiding-scrollbar
! Works in Win7/IE11. overflow-y: scroll
has no negative side-effects. Thanks!
from sanitize.css.
Related Issues (20)
- Height: 100% on html/body? HOT 1
- sanitize.css adds an extra dotted outline to focused buttons in Firefox HOT 1
- Pedantic colon placement HOT 1
- Why do we need `text-indent: 0` for the `table`s? HOT 5
- list-style-type:none for <ol> ? HOT 2
- Should set `cursor: pointer` on the `[aria-controls]` elements? HOT 3
- Accessibility fix: Allow iOS browsers to auto-scale fonts based on user preference HOT 7
- Other npm packages have references pages.css HOT 5
- zero-width space is consuming space in Safari
- Video captions to match body font family HOT 2
- iOS 15 brings up some new default styles HOT 1
- Pseudo-class :where()? HOT 4
- Text cursor not showing on paragraphs
- `nav li::before` breaks flexbox lists
- Touch-action is not in the stylesheet
- Add svg to assets.css
- Is this project alive/maintained? HOT 1
- Update README.md
- Consider removing opinionated tab-size
- Background transparency issue with iframe elements
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sanitize.css.