Skip to content

Instantly share code, notes, and snippets.

@gregwhitworth
gregwhitworth / ri-feature-detection.js
Last active September 4, 2016 08:09
Responsive images feature detection
(function (window) {
document.addEventListener("DOMContentLoaded", function (e) {
var supports = {
srcset: false,
currentSrc: false,
sizes: false,
picture: false
};
var img = new Image();
@gregwhitworth
gregwhitworth / what-color-square.md
Last active May 31, 2016 04:18
What color box should be visible to the user (just by viewing the code): blue or yellow?

I am wanting to get developer feedback on what you are expecting based on the code below. Please don't run the code in a browser to determine your answer. Purely based on your knowledge of CSS which color box should the user see? Blue or yellow? Leave your answer in the comments. Thank you!!

  <style type='text/css'>
    div, nav {
		width: 200px;
		height: 200px;
	}

	nav, div.c1 {

position: fixed;