New HTML & CSS features
dialogtag::backdroppseudo-elementinert
images lazy loading
<img src="images/shirt.jpg" loading="lazy"
alt="a brown polo shirt"
width="500" height="600">container queries support from Safari 16
.container {
container-type: inline-size;
container-name: clothing-card;
}
.content {
display: grid;
grid-template-rows: 1fr;
gap: 1rem;
}
/* 👇🏻 if the clothing card component is in a container that's wider than 250 pixels, */
@container clothing-card (width > 250px) {
.content {
grid-template-columns: 1fr 1fr;
}
/* additional layout code */
}cascade layer support
/* Author Styles - Layer A */
@layer utilities {
div {
background-color: red;
}
}
/* Author Styles - Layer B */
@layer customizations {
div {
background-color: teal;
}
}
/* Author Styles - Layer C */
@layer userDefaults {
div {
background-color: yellow;
}
}has()supportnew viewport units:
svw,lvw,dvw- smallest/largest/dynamic view port widthsvh,lvh,dvh- smallest/largest/dynamic view port heightsvb,lvb,dvb- blocksvi,lvi,dvi- inlinesvmin,lvmin,dvminsvmax,lvmax,dvmax
offset-pathfor animationfocus-visiblepseudo-classaccent-colorfont-palettetext-decoration-skip-inkic unitSubgrid
/* Grid to layout cards */
main {
display: grid;
grid-template-columns:
repeat(auto-fit, minmax(225px, 1fr));
gap: 1rem;
}
/* Grid to layout each card’s content */
article {
display: grid;
grid-row: span 5;
grid-template-rows: subgrid; // 👈🏻
}dropped webkit prefixes from:
backface-visibilityprint-color-adjusttext-align: match-parentmask(renamed)text-combine-upright(renamed)appearance(renamed)
Web Inspector
new Flexbox inspector
new alignment editor
new justify-content editor
new CSS fuzzy autocompletion
developer tool extensions support
Web API
support for Web Push
Safari 16 + macOS Ventura
iOS and iPadOS next year
new web app manifest improvements
you can define the icon that’s used when people save your web app to the Home Screen
// Manifest file
"icons": [
{
"src": "orange-icon.png",
"sizes": "120x120",
"type": "image/png"
}
]ensure that there is no
apple-touch-icondefined in the HTML head
Broadcast Channel
post a message and sync that state to any other open tabs or windows
broadcastChannel.postMessage("Item is unavailable");File System Access API
// Accessing the origin private file system
const root = await navigator.storage.getDirectory();
// Create a file named Draft.txt under root directory
const draftHandle = await root.getFileHandle("Draft.txt", { "create": true });
// Access and read an existing file
const existingHandle = await root.getFileHandle("Draft.txt");
const existingFile = await existingHandle.getFile();