Removed dashes from some non-core detects' names. #719

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@ghost
ghost commented Oct 2, 2012

These dashes are preventing these detects from being queried in JS like every other test. For example, at the moment one can use

if (!Modernizr.fontface) {
    /* Do something. */
}

to test for @font-face support, but one must use

if (!Modernizr["display-table"]) {
    /* Do something. */
}

to achieve the same for display: table. This introduces, of course, a backwards-incompatible change, but helps in keeping project-wide code style and library-wide naming consistency.

Build Status

bmcustodio Removed dashes from some non-core detects' names.
These dashes were preventing these detects to be queried in JS like every other
test (e.g., 'Modernizr["display-table"]' as opposed to 'Modernizr.fontface'.).
This introduces, of course, a backwards-incompatible change, but helps in
keeping project-wide code-style and library-wide naming consistency.
656115b
@SlexAxton
Member

I think this is a good move, but maybe not til 3.0 with the AMD names and stuff.

@KuraFire
Member
KuraFire commented Oct 2, 2012

Agreed; when we hit 3.0 we'll likely be making various backwards-incompatible changes with compatibility aliases as it is, so these changes are a good candidate for merging at that time.

@ghost
ghost commented Oct 2, 2012

Nice guys. Glad this will be of some help. :-)

@paulirish
Member

@bmcustodio can you repeat this PR for the v3 branch?

@paulirish
Member

Also can you add a test in qunit which fails on dashed names?

@ghost
ghost commented Jan 8, 2013

@paulirish: Sure I can. Please allow me a few hours, though, so that I can fix a few problems with my workstation.

@ghost ghost closed this Jan 8, 2013
@ghost
ghost commented Jan 8, 2013

@paulirish: Done in #782. :-)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment