Closed (won't fix)
Project:
Drupal core
Version:
8.0.x-dev
Component:
javascript
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 May 2013 at 23:11 UTC
Updated:
29 Jul 2014 at 22:17 UTC
Jump to comment: Most recent file
Comments
Comment #1
ruplThis patch adds
boxshadowtest, and it adds two new internal "utilities" that Modernizr requires in order to test CSS:testAllPropsandtestProps. They weren't required before because this is the first CSS test we're including in our build of Modernizr.There are some whitespace changes but no other substantive changes are being introduced. The overall library version remains at 2.6.2, and no existing tests have received upstream updates.
I haven't actually tested this patch because I'm getting some insane PHP error that is totally beyond my comprehension when I load up my test D8 site. I'm pretty confident that this patch is clean, but it should be reviewed by someone who can install HEAD trouble-free.
Comment #2
ry5n commentedI’m not used to scrutinizing Modernizr internals, but I tested this against the latest 8.x HEAD and the appropriate boxshadow class is added.
Comment #3
seutje commentedI agree we need testProps and testPropsAll in our core build, but I'm not sure we want to invoke this test without a good reason for it.
The use-case outlined in #1252178-81: Add Modernizr to core is only for Seven, so wouldn't it be silly to penalize all those anonymous users for something that's required only in the administrative side of things?
There's also some weird indentation going on in there, but I assume that's from the build tool.
Comment #4
ry5n commented@seutje Yeah. It makes sense to move this test into Seven.
Comment #5
ruplagreed about boxshadow. I threw this together before seeing @jessebeach's comment. Will re-roll w/o
boxshadowand leave Seven to implementModernizr.addTest.yes, build tool is the cause of the whitespace weirdness. better not to fix it for now, and besides we will remove un-minified lib before shipping D8
Comment #6
nod_I'd say no to adding the test, even for Seven.
We don't use the prefixed version of box-shadow (required for older android browser versions). And the only other one that don't have support for it is IE8 (and opera mini but it has it's own thing to show focus and all). http://caniuse.com/css-boxshadow
Soooo, there you go.
Comment #7
ruplI can see what you mean, and I also was unsure if replacing
outlinewithbox-shadowwas accessible. Closed.Comment #8
ry5n commentedI beg to differ; I think there is an a11y issue here. IE8 doesn’t support box-shadow, but it will respect 'outline: none'. Without a modernizr class, the following CSS (proposed for Seven) will cause IE8 to display no native focus indicator and no custom one either. The border color will change, but for some buttons (blue) this will not be visible enough. If no box-shadow, I want to defer to the browser style.
Comment #9
nod_CSS tests are expensive on the computational side of things. It'll be a huge performance impact on the long run.
I'd be fine if the test is in conditional comments (the irony). But not for everyone.
Just restore the outline on IE8, conditional comments are supported in core.
Comment #10
ry5n commented_nod OK, that works for me, although I’ll probably use conditional classes (add .lt-ie9 conditionally) instead of loading any JS.
Comment #10.0
ry5n commentedUpdated issue summary to include old issue number.