Layout never was so easy to declare. Come with some fancy ASCII art and you'll see how your elements are gracefully placed around.
A bunch of cool stuff in 2017
Can I Use serviceworkers? Data on support for the serviceworkers feature across the major browsers from caniuse.com.
This day goes to #PWA history! Initial steps of #ServiceWorker in #Safari: https://t.co/WU4Uin6ZHP. Kudos to @bradeeoh & all @webkit team! pic.twitter.com/FFf95pDxde
— Maxim Salnikov (@webmaxru) 3 de agosto de 2017
Run when an external event is triggered regardless there were open views of the website.
Can I Use push-api? Data on support for the push-api feature across the major browsers from caniuse.com.
Can I Use async-functions? Data on support for the async-functions feature across the major browsers from caniuse.com.
function search(query) {
return fetch(`/search/?q=$(query)`)
.then(response => response.json())
.then(json => json.results.map(...))
.catch(reason => console.log(reason));
}
function search(query) {
var resp;
return fetch(`/search/?q=$(query)`)
.then(response => {
resp = response;
response.json()
})
.then(json => {
json.results.map(result => doSomething(result, resp));
})
.catch(reason => console.log(reason));
}
async function search(query) {
try {
let response = await fetch(`/search/?q=${query}`);
let json = await response.json();
return json.results.map(result => doSomething(result, response));
}
catch (reason) {
console.log(reason);
}
}
Can I Use css-featurequeries? Data on support for the css-featurequeries feature across the major browsers from caniuse.com.
The following example is from Using Feature Queries in CSS by Jen Simmons
Try it in Safari which supportsinitial-letter
.
The carrot is a root vegetable, usually orange in colour, though purple, black, red, white, and yellow varieties exist. Carrots are a domesticated form of the wild carrot, Daucus carota, native to Europe and southwestern Asia. The plant probably originated in Persia and originally cultivated for its leaves and seeds. The most commonly eaten part of the plant is the taproot, although the greens are sometimes eaten as well. The domestic carrot has been selectively bred for its greatly enlarged, more palatable, less woody-textured taproot.
#feature-queries p::first-letter {
color: #FE742F;
font-weight: bold;
}
@supports (-webkit-initial-letter: 4) or (initial-letter: 4) {
#feature-queries p::first-letter {
-webkit-initial-letter: 4;
initial-letter: 4;
margin-right: 0.5em;
}
}
Can I Use css-variables? Data on support for the css-variables feature across the major browsers from caniuse.com.
The highlight color, #b4ff43, is used in many contexts like links or selection. And also in borders and decorative elements.
:root { --hl-color: #84b830; }
.container {
font-size: calc(var(--font-factor, 1) * 1em);
box-shadow: 0 0 100px 10px rgba(128, 128, 128, var(--shadow-alpha, 0.1));
}
.container a:link { color: var(--hl-color); }
.container p::selection { background-color: var(--hl-color); }
.container p { border: 3px solid var(--hl-color); }
.container span { color: var(--hl-color); }
.container:hover {
--font-factor: 2;
--shadow-alpha: 1.0;
}
Can I Use web-animation? Data on support for the web-animation feature across the major browsers from caniuse.com.
rightFox.animate(
[
{ transform: 'rotate(0deg)' }, // from
{ transform: 'rotate(360deg)' } // to
],
{ duration: 1200, iterations: Infinity }
)
Can I Use css-grid? Data on support for the css-grid feature across the major browsers from caniuse.com.
Layout never was so easy to declare. Come with some fancy ASCII art and you'll see how your elements are gracefully placed around.
.container {
display: grid;
grid-template-areas:
"t t t t n n"
"a a b b n n"
;
}
header { grid-area: t; }
nav { grid-area: n; }
article { grid-area: a; }
footer { grid-area: b; }
Can I Use webgl2? Data on support for the webgl2 feature across the major browsers from caniuse.com.
Can I Use wasm? Data on support for the wasm feature across the major browsers from caniuse.com.
Can you tell what is the native app?
And now?
But you certainly do now.
Or now.
Multiplexing
Push / Server Hint
HPACK
Can I Use web-app-manifest? Data on support for the web-app-manifest feature across the major browsers from caniuse.com.
{
"name": "Flipkart Lite",
"short_name": "Flipkart Lite",
"icons": [ {
"src": "https://img1a.flixcart.com/www/linchpin/logo_lite-cbb3574d.png",
"sizes": "192x192",
"type": "image/png"
} ],
"start_url": "/?start_url=homescreenicon",
"orientation": "portrait",
"display": "standalone",
"theme_color": "#006cb4",
"background_color": "#006cb4"
}
Partial manifest from Flipkart Lite.
Can I Use payment-request? Data on support for the payment-request feature across the major browsers from caniuse.com.
This is not a payment method.
The browser becomes a mediator to manage payment instruments and sensible data in a safe way.
Can I Use credential-management? Data on support for the credential-management feature across the major browsers from caniuse.com.
Can I Use requestidlecallback? Data on support for the requestidlecallback feature across the major browsers from caniuse.com.
Can I Use webvr? Data on support for the webvr feature across the major browsers from caniuse.com.
A 360 picture viewer in 6 lines of HTML code.
See the Pen 360º panorama viewer by Salvador de la Puente González (@lodr) on CodePen.
Salvador de la Puente González