I have a daily #Vim tip set up in ChatGPT. I has access to my `.vimrc` and sends me something relevant. Sometimesāāālike todayāāāitās stuff I already know, which is unavoidable, but other times thereāll be a real gem. A nice little companion to my morning coffee.
If we press ahead, itāll be about Ā£400 all-in (including the Costco shop) until 19 November. And to test that Pierre can retrieve their own papertrailā¦
š§āš³ I have multiple custom GPTs that are trained intently around my own needs. This was a chat with Pierre, my chef pal. Today, I walked around @Costco ONLY taking photos of labels. Then I fed the photos to Pierre and askedā¦
š my input
š Pierreās output
ALT Three vertically stacked Vim windows showing Markdown mission statements for different client engagements. Each document begins with a heading and concise project summary. Client names have been replaced with placeholders and identifying path information is redacted.
Iām giving @talatapp a spin! Transcripts and digests have become a core part of my client onboarding/ingest but itās been unreasonably difficult when every client has a different meeting platform of choice.
Has anyone else found that this dropdown doesnāt actually switch between your projects (Codex) and your chats (ChatGPT)? Iāve effectively lost ChatGPT on desktop!
ALT Harry Roberts presenting a web performance talk at LeedsJS, speaking beside a slide reading ābuild for the web, build on the web, build with the webā during a talk on platform-first web development and modern front-end architecture.
The biggest CLS score Iāve ever seen on a real site. This wasnāt a purpose-built demo or a bug or a weird edge case. This is a perfectly ānormalā CLS event(s). Ouch!
š This morning, I made arguably my best shakshuka to date. With the leftovers (Italians, stop reading now), I styled it out into a caponata style sauce and tossed in some casarecce and feta.
ALT A pan full of shakshuka taken from the point of view of a diner. Itās centred on the table with places made up ready to eat.
ALT Aerial photo of a colourful bowl of pasta: caponata-style sauce clings to casarecce pasta, topped with feta, parsley, and pickled hot peppers.
I wrote a @Cloudflare Worker to attach protocol information as a Server-Timing header. Then I can send that off to @SpeedCurve to compare H1 vs H2 vs H3 performance.
My site gets a staggering amount of HTTP/1.1 traffic! My latest screencast shows you how to test different protocols with @RealWebPageTest. Link in next post.
ALT img[alt]:not([alt=""])::after { /* Only apply to images with non-empty alt text. */
content: " ["attr(src)"]" / ""; /* Provide emtpy alt text for `content`: prevents ATās reading it. */
font-family: monospace;
font-style: italic;
}
š¼ļø Chrome and Firefox both support ::after on alt text:
ALT Chrome: Screenshot of a JS Bin demo. The HTML defines an image with alt="This image deliberately 404s" and a missing src. CSS uses img[alt]::after with content: " [attr(src)]". On the right, the rendered output shows āThis image deliberately 404s [deliberate-404.jpg]ā in italic monospace.
ALT Firefox: Screenshot of a JS Bin demo. The HTML defines an image with alt="This image deliberately 404s" and a missing src. CSS uses img[alt]::after with content: " [attr(src)]". On the right, the rendered output shows āThis image deliberately 404s [deliberate-404.jpg]ā in italic monospace.
š§ I just did some Sass-only refactoring after switching a legacy project from LibSass to Dart Sass. To make sure it had zero side effects, I just took a checksum of the compiled CSS before and after.
Simple; effective.
ALT A screenshot showing that the before and after MD5 checksums of csswizardry.min.css are identical.
E.g. `--word-diff` and `--word-diff-regex` are magical when dealing with fine-grained changes:
ALT Terminal screenshot of a git show for a commit titled āFix stupid typoā. The same HTML change is displayed three ways: a normal unified diff, a word diff, and a regex-based word diff. Each shows corrections to meta tag image paths in demo/index.html, replacing /assets/og-image.png with /Obs.js/demo/assets/og-image.png.
⨠Hereās something neat: you can apply `display: block;` to `script` and `style` and show folk the exact, literal snippet you just ran. Great for docs and demo pages. I do it with Obs.js:
ALT Screenshot of browser DevTools showing how adding `display: block` and some other cosmetic properties can not only make active `<script>`s visible, but actually become part of the documentation themselves.
ALT An email from Slack:
āJump back into the conversation
āSee what your teamās been up to while youāve been gone.
āš„ 1,400,820 messages sentā
I used this to build a quick obfuscator. This will be great for anonymising @SpeedCurve or @GoogleSearchc Console dashboards before putting them in talks etc. Peep the address bar and tab name, too!
I love @ChromeDevToolsās Snippets, but they donāt take parameters which means you need to change the snippet itself every time. One way around it is to take input from `prompt()`!
šThe script listens for changes on the Navigator and Battery APIs. It updates classes on the `html` element and also exposes them to a global JS object you can pick up later in your application.
I spent the weekend working on a script that detects device and network characteristics.
š Insiders already have access to the code: csswizardry.gumroad.com/l/suā¦
Set a client up with @SpeedCurve and weāre custom-capturing some more high-fidelity Network and Device information. When people say āYou users could be in the middle of a field!ā, most of theirs actually are.
That cost almost 70ms, pushing Layout (for just 620 DOM nodes) up to 113ms. By swapping `font-family: Inter, sans-serif;` to `font-family: system-ui, sans-serif;`, Layout was more than halved.
They are spending an unusual amount of time in Layout pre-FCP. They were setting a font stack in which the primary desired font is non-standard and they werenāt using web fonts at all. Because my machine doesnāt have Inter installed, it had to scramble to find a decent fallback.