Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box-Sizing #248

7fe opened this issue Apr 27, 2011 · 1 comment

Box-Sizing #248

7fe opened this issue Apr 27, 2011 · 1 comment


Copy link

7fe commented Apr 27, 2011

Are there any plans to support box-sizing?

I believe it is as simple as;

  var s= ['boxSizing','MozBoxSizing','WebkitBoxSizing','msBoxSizing'];
  var div = document.createElement('div');
    for(var i=0,l=s.length;i<l ; i++){
     //obviously need to replace not override classes 
      if([s[i]]!=undefined)document.documentElement.className = 'box-sizing';

Or am I missing something?

Copy link

timmfin commented May 4, 2011

I also ran into a need for this recently. I just added this (based on limeblack's code):

Modernizr.addTest('boxsizing', function () {
  var s = ['boxSizing', 'MozBoxSizing', 'WebkitBoxSizing', 'msBoxSizing'],
      div = document.createElement('div');

  for (var i = 0, l = s.length ; i < l ; i++) {
    if([s[i]] !=undefined)
      return true;

  return false;

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

3 participants