Posts tagged #tweet
Regex to find malformed PHP docblocks
You can paste an image from your clipboard directly into GitHub comments/issues
Use the Chrome search bar to find Jira tickets
See your PHP's generated opcodes
The simplest Notion template
Find the main application's path from a Composer package
Generating utility classes with Sass
HTML's <button type="reset"> behaviour
TailwindCSS <details> plugin
I built a nice looking and fully accessible dropdown menu by using the native <details>
HTML tag without a drop of JavaScript in the client.
A little more polish to get the alignment and colours sorted out, as well as flipping the caret on open — just a couple of years ago it would've been completely unthinkable to build an accessible dropdown component like that without the use of JavaScript pic.twitter.com/qPaygfh29p
— Liam Hammett (@LiamHammett) January 30, 2019
To build it in a utility-first approach, I created a simple plugin for TailwindCSS.
Just published my first npm package - that small three-line Tailwind Plugin to apply styles when a <details> tag is opened 🤷♀️
— Liam Hammett (@LiamHammett) February 13, 2019
A couple of useful examples in the readme of what you can achieve with it pic.twitter.com/TXjwqhmEGy
You can find the plugin over at GitHub.
Sip app shows the name of colours, super useful for colourblind users!
tl;dr php artisan
Use small-caps to open an article's first paragraph
Find VSCode extensions using too many resources
Screen-reading dates
What might look perfectly readable to the human eye may not be picked up very well by screen readers.
As you can see, in this example, VoiceOver thinks the “2018 - 15” section is a single unit that should be read as “2018 to 2015”.
To give screen readers a fighting chance, you should always make sure to use more semantic elements available in HTML, such as <time>
, if applicable.
Styling <details> inline in a paragraph
Make your checkboxes more accessible
Multi-condition weighted search with MySQL
Weighted search in MySQL
You can find the source code for this technique in this GitHub Gist.