Popover API Sliding Nav
Here’s a nifty demo of popover
but it’s not for what we’d traditionally consider a modal dialog.
Here’s a nifty demo of popover
but it’s not for what we’d traditionally consider a modal dialog.
Such a clever minimalist use of CSS!
After writing about a declarative Web Share API here yesterday I thought I’d better share the idea (see what I did there?).
I opened an issue on the Github repo for the spec.
(I hope that’s the right place for this proposal. I know that in the past ideas were kicked around on the Discourse site for Web platform Incubator Community Group but I can’t stand Discourse. It literally requires JavaScript to render anything to the screen even though the entire content is text. If it turns out that that is the place I should’ve posted, I guess I’ll hold my nose and do it using the most over-engineered reinvention of the browser I’ve ever seen. But I believe that the plan is for WICG to migrate proposals to Github anyway.)
I also realised that, as the JavaScript Web Share API already exists, I can use it to polyfill my suggestion for:
<button type="share">
The polyfill also demonstrates how feature detection could work. Here’s the code.
This polyfill takes an Inception approach to feature detection. There are three nested levels:
button type="share"
. Great! Don’t do anything. Otherwise proceed to level two.mailto:
link to prefill an email with the page title as the subject and the URL in the body. Ya basic!The idea is that, as long as you include the 20 lines of polyfill code, you could start using button type="share"
in your pages today.
I’ve made a test page on Codepen. I’m just using plain text in the button but you could use a nice image or SVG or combination. You can use the Codepen test page to observe two of the three possible behaviours browsers could exhibit:
button type="share"
. Currently that’s none because I literally made this shit up yesterday.button type="share"
nor the existing JavaScript Web Share API. This is Firefox and Chrome on desktop (and Edge if you’re on a Mac).See the Pen Polyfill for button type=”share" by Jeremy Keith (@adactio) on CodePen.
The polyfill doesn’t support Internet Explorer 11 or lower because it uses the DOM closest()
method. Feel free to fork and rewrite if you need to support old IE.
These wonderfully realistic photo effects from Lynn are quite lovely!
I love this little to-do app! Every time you tick something off your list, something grows in your virtual terrarium. Lovely!
This is not an image format. This is made of empty elements styled with CSS. (See for yourself by changing the colour value of the sun.)
How cool is this!!?
Tom took one of the core ideas from my talk at Beyond Tellerrand and turned it into this animated CodePen!
Woah! This is one smart hack!
Scott has figured out a way to get all the benefits of pointing to an external SVG file …that then gets embedded. This means you can get all the styling and scripting benefits that only apply to embedded SVGs (like using fill
).
The fallback is very graceful indeed: you still get the SVG (just not embedded).
Now imagine using this technique for chunks of HTML too …transclusion, baby!
This is a nifty visualisation by Hui Jing. It’s really handy to have elements categorised like this:
This orrery is really quite wonderful! Not only is it a great demonstration of what CSS can do, it’s a really accurate visualisation of the solar system.
Mandy’s experiments with text effects in CSS are kinda mindblowing—I can’t wait to see her at Ampersand at the end of the month!
This ever-growing curated collection of interface patterns on CodePen is a reliable source of inspiration.
I really like this month’s CodePen challenge, all about HTML elements that go well together. First up: del
and ins
.
I’m not sure why but I genuinely love this Windows 95 style interface for Instagram coded up by Gabrielle Wee.
Suggestions for small interface tweaks.
There’s going to be a CodePen meetup in Brighton as part of the Brighton Digital Festival. Should be fun! See you there.
We don’t want the field to de-democratize and become the province solely of those who can slog through a computer science degree.
So we need new tools that let everyone see, understand, and remix today’s web. We need, in other words, to reboot the culture of View Source.
This is a really great screencast on getting started with React. I think it works well for a few reasons:
There’s a little bit of “here’s one I prepared earlier” but, on the whole, it’s a great step-by-step approach, and one I’ll be returning to if and when I dip my toes into React.
Form validation taken to the extreme. If you want to know more about how it was done, there’s an article explaining the markup and CSS.
Here’s a handy interface if you want to get your head around named areas in CSS Grid, also known as doing layout with ASCII art.