Skip to content

Instantly share code, notes, and snippets.

View prushforth's full-sized avatar
😎
Working on MapML

Peter Rushforth prushforth

😎
Working on MapML
View GitHub Profile
@dauwhe
dauwhe / toast.md
Last active May 30, 2020 01:51
Are Web Standards Toast?

Are Web Standards Toast?

I find myself in a tempest in a toaster. Yesterday I (and much of the web standards world) learned about two possible new HTML elements proposed by Google, std-toast and std-switch. I had no idea what “toast” meant in the context of the web, a problem shared my many other people. It turns out it’s a UI pattern, those little notices that pop up and then disappear without user interaction.

But wow, new HTML elements! This is the holy grail. In my part of the web we don’t even dream about new HTML elements. Oh, we’ve tried, but Hixie didn’t much care for footnote, WICG didn’t much care for list titles, and no one much cared about author. Just last week the author of the extensible web manifesto warned me to never expect new HTML elements, due to the difficulty of changing the parser.

But my concern wasn’t so much about the nature of the new elements, but of how we learned about them and what that says about how web standardization works. My [first tweet](https://twitter.com

@Rich-Harris
Rich-Harris / geojson.md
Last active March 12, 2020 08:50
A better GeoJSON

A better GeoJSON

GeoJSON is a widely-used format for encoding geographic data. It's flexible and human-readable, and because it's just JSON it's easy to integrate into web applications.

But it has some real warts, and if we wanted to we could certainly come up with a better format. After tweeting about my frustrations, I was asked to elaborate. Here goes:

Redundancy

GeoJSON geometries can be one of seven types: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection.

@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent