Styles inside the @media rule could change whether a scrollbar is present, so it's a bad idea to have whether those rules are used depend on whether the scrollbar is present.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
Ok, you are right. This matches CSS3 standard. However this is unusable, because a rule to make space for the content at a specific width won't be effective when needed, because scrollbar will make the content not fit before the rule is applied. I guess that's why other browsers didn't implement it "right". I didn't say the rule should change its behavior depending on scrollbar's visibility. I just expected it to become in effect when the body-width (offsetWidth) is the given pixel value. For example, a rule set for 800px is activated when the body.offsetWidth is 800px. But no, because when body is 800px, the viewport width is 818px, with scrollbar, so the rule won't activate. Sorry for taking your time guys. INVALID is OK: http://www.w3.org/TR/2009/CR-css3-mediaqueries-20090915/#width "The ‘width’ media feature describes the width of the targeted display area of the output device. For continuous media, this is the width of the viewport (as described by CSS2, section 9.1.1 [CSS21]) including the size of a rendered scroll bar (if any)."
You need to log in before you can comment on or make changes to this bug.