„Element queries are a new way of thinking about responsive web design where the responsive conditions apply to elements on the page instead of the width or height of the browser.
Unlike CSS @media queries, @element Queries are aware of more than just the width and height of the browser, you can write responsive conditions for a number of different situations like how many characters of text or child elements an element contains.
Another concept that element queries brings to CSS is the idea of ‘scoping’ your styles to one element in the same way that JavaScript functions define a new scope for the variables they contain.“
min-width
min-width in px, min-width in %max-width
max-width in px, max-width in %min-height
min-height in px, min-height in %max-height
max-height in px, max-height in %min-characters
on block elements, on form inputsmax-characters
on block elements, on form inputsmin-lines
min-lines demomax-lines
max-lines demomin-children
min-children demomax-children
max-children demomin-scroll-y
min-scroll-y demomax-scroll-y
max-scroll-y demomin-scroll-x
min-scroll-x demomax-scroll-x
max-scroll-x demoorientation
orientation demomin-aspect-ratio
min-aspect-ratio demomax-aspect-ratio
max-aspect-ratio demo$this
$this demo$parent
$parent demo$root
$root demo$prev
$prev demo$next
$next demoInspect styles in a simple, well-organized & beautiful way with this Chrome extension. You can select any object to get more specific information about them. Also a nice way to browse color palettes of websites you visit.
Canvas based dial that adds mouse click, wheel mouse, keyboard and finger / touch events.
Really nice :)
Sticky-kit provides an easy way to attach elements to the page when the user scrolls such that the element is always visible.
1 2 3 4 5 6 7 |
$("#sticky_item").stick_in_parent() .on("sticky_kit:stick", function(e) { console.log("has stuck!", e.target); }) .on("sticky_kit:unstick", function(e) { console.log("has unstuck!", e.target); }); |
Player.js is a library that allows you to programmatically control video and audio within iFrames across a number of services.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
var player = new playerjs.Player('iframe'); player.on('ready', function(){ player.on('play', function(){ console.log('play'); }); player.getDuration(function(duration){ console.log(duration); }); if (player.supports('method', 'mute')){ player.mute(); } player.play(); }); |