Active
Project:
Modernizr
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2012 at 12:54 UTC
Updated:
20 Feb 2013 at 01:02 UTC
The Modernizr custom builder has the ability to prefix the <html> classes with a custom string. It should be pretty easy to provide this config option in the admin UI so I'm filing this issue as a to-do.
Comments
Comment #1
johnalbinI found this
Modernizr._config.classPrefixburied in https://github.com/Modernizr/Modernizr/blob/master/src/addTest.jsI was trying to find docs or rationale behind it, but only found this issue via Google since d.o's google-fu is so powerful. :-)
It looks like if the prefix was set to 'has-', then the classes would be
has-FEATUREandhas-no-FEATUREComment #2
ruplThat is correct. It's pretty much the only purpose of the CSS prefix. Clever example!
Think of it like the Drupal DB table name prefix. It's there to provide a namespace of sorts.
Comment #3
ruplOther services prefix their JavaScript-controlled
<html>classes as well. For example, Typekit often generateswf-prefixes.