Hacker News new | past | comments | ask | show | jobs | submit login

256 nested ids seems to create an overflow. If you remove the #i000 at the beginning of the rule on this: http://codepen.io/anon/pen/zefGg it turns red, but otherwise it stays blue.



Here is a better example of ids overflowing: http://codepen.io/anon/pen/Khwon


Might depend on the browser, but Webkit-based browsers, for example, use a 0xffffff mask on the resulting specificity. And so...

  $ python
  >>> MASK = 0xffffff
  >>> MASK
  16777215
  >>> ID = 0x10000
  >>> ID * 256
  16777216
  >>> ID * 256 & MASK
  0




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: