Head.Responsive() v2.0.0-alpha
Please read the comments in the
source-code, and leave your impressions
here. Thanks !
» Open your DEV console on Elements/Html to see it in action «
Changes (in flux)
-
We can now detect #hashChange just like pages & sections, great for emulating the CSS3 :target pseudo-selector. Actually we can do much more because paths like #user/profile/update are supported, which is great for SPA applications.
-
The prefix h- and w- has been introduced for measuring both viewport height & width. ex. h-lt800, w-gt1680
-
Browsers are no longer declared with min/max, instead we can now declare each browser version individually.
This was needed because FF is now at version 26 and Chrome at 33 !
Now it's a simple matter of choosing the browser, for example { ie: [6,7,8,11] }
-
Prefixes for browser detections have been changed for better readability, and follow the height/width syntax: .ie, .ie-lt6, .ff-gt25
-
Prefixes for pages/sections have been inverted for better readability in stylesheets: #page-*, .section-*, .hash-*
-
Prefixes for detections have been promoted to boolean suffixes, which makes it easier to concatenate with server or client side scripts: .mobile-true, .landscape-false
-
gte/lte/eq where never activated in the first place, and have been removed for the sake of simplicity and performance
-
Feature detection variables have been moved to their own namespaces instead of polluting the base head.* namespace: head.features.*, head.browser.*, head.viewport.*, head.screen.*