In this Twitter account you will find new open source tools, software development jokes, and stories around developing @Autoprefixer, @PostCSS, and @logux_io.
Subscribe to my other accounts about fun STEM facts from Wikipedia @lostinwiki and popular linguistics @linguopunk.
A thread about the future of color in CSS.
Why P3 colors will be the “new retina” that we will all have to support.
How we will write colors in CSS in 2022-2023.
I released a new @PostCSS plugin to fix the 100vh bug in mobile Safari.
github.com/postcss/postcss-1…
Pure CSS. In contrast with previous hacks, it works in Chrome. It allows you to forget about the bug: just write min-height: 100vh, the plugin will insert the hack automatically.
I like the new Zed code editor.
— Works much faster than VS Code
— Font rendering is more beautiful
— 90% of all features are already built-in, no need to install a bunch of plugins for basic work
— AI is built into UI
— Minimalistic design
zed.dev/
Node.js 22 is here 😎
Featuring: require()ing ESM graphs, WebSocket client, updates of the V8 JavaScript engine, and more.
Big thank you to @_rafaelgss and @satanacchio for their work on this 🎉
Sucrase is an alternative to Babel which is 16 times (!) faster than Babel and 2 times faster than esbuild.
In this project, @alangpierce shows that esbuild magic is not only in Go. Good parser/AST design and memory usage are more important.
github.com/alangpierce/sucra…
There is a dangerous attack by replacing URL in npm/yarn lock file.
Attacker can send a big PR with dependencies update and replace one URL in lock file from npmjs.com to their own server.
dev.to/kozlovzxc/injecting-b…
NtechLab, company made Russian surveillance system, keep its office in the Cyprus.
dnb.com/business-directory/c…
I am so angry! It is so dirty to help build a repression tool for Putin while you moved to Europe.
Why are they not in sanction list?
With new FF 128 now all browsers support Relative Colors in CSS.
For example, you can specify that hover color is always 10% lighter and then just set colors for button states and hover will recalculate itself.
So I updated my article about OKLCH:
evilmartians.com/chronicles/…
The Edge browser team is abandoning React (the browser UI is done on web technologies) and now their UI is getting 40% faster.
I’ve been saying for a long time that modern frameworks have advanced a lot relative to React with its slow VDom.
theverge.com/2024/5/28/24166…
I understand that sorting imports or keys by length is a strange approach.
But how much I like it when the code itself looks nice. As if in doomed world we have created, there is room for beauty and absolute order.
What do you think?
github.com/azat-io/eslint-pl…
I publish a new article: “How to Favicon in 2021:
Six files that fit most needs”.
Let’s stop to use 20+ files from outdated generators and guides.
evilmartians.com/chronicles/…
🤯 @nextjs downloads
~200M: last 12 months
~400M: last 7 years
Truly unbelievable even for someone who obsesses about it day and night 😁
My slides from #HolyJS: why front-end is dying and where we should move.
Initially, this talk should be about promoting your open source project, but in the current hype culture, there is no way to unknown developers to promote their work.
slides.com/ai/frontend-is-dy…
Many people use Google Lighthouse, which helps you make your website faster.
@Mozilla has a similar Observatory service about security.
observatory.mozilla.org/
Check your website and set recommended headers.
Browsers can switch pages instantly when you press Back.
They save a memory snapshot of the JS environment and the DOM to disk and simply launch the environment back.
web.dev/bfcache/
Check that your code is ready for this. For example, re-loads data from localStorage.
An unknown person joined the core team of a popular library where the author burned out and then inserted a backdoor.
And large corporations continue to ignore the problem of burnout of library maintainers, on whom their business depends.
The xz situation is absolutely insane and almost certainly state sponsored.
This is an excellent example of a widely used software being maintained by basically one person.
Read this web article and then frown and become sad.
boehs.org/node/everything-i-…
Thread of how a tourist can survive in China in 2023.
China doesn’t have Google Maps or Uber. China just has opened the borders, but if you go there, you need to integrate into their digital platforms.
New Firefox DevTools got a very important feature for unnecessary horizontal scroll debugging.
Clicking on the “scroll” badge will show the children causing an overflow.
hacks.mozilla.org/2020/11/fi…
A special plugin to clean webpack build from unnecessary Moment.js locales. Cleaning bundle from locales is must-have things for any Moment.js users since this locales are huge. You can clean them without the plugin but plugin “just works”.
github.com/iamakulov/moment-…
Most of static websites do not need React.
1. 300 KB of JS is too big for most of landings.
2. You can split CSS, JS, and HTML to components without React.
Svelte 4 was released!
No big features, since it mostly refactoring before Svelte 5.
Cool part is node_modules footprint reducing from 10 MB to 3 (and subdependencies from 61 to 16).
svelte.dev/blog/svelte-4
I published an article about the new oklch() color format in CSS and why it’s better than hex, rgb() or hsl().
Upcoming CSS specs will improve colors a lot (finally, native color modifications). OKLCH color space is one new feature from these specs.
evilmartians.com/chronicles/…
There is amazing `pnpm deploy` command in @pnpmjs.
It copies your project (with monorepo support) to dist/ removing devDependencies to reduce security risks. Then you copy dist/ to Docker image.
pnpm.io/cli/deploy
Here is how I use it:
github.com/hplush/slowreader…
PGlite (WASM build of PostgreSQL by @ElectricSQL) is not just a way to get powerful database on the web client.
It also simplifies Node.js development since you do not need to run separated PostgreSQL service.
And @DrizzleORM supports it out-of-the-box.
orm.drizzle.team/docs/get-st…
If on your project you have pre-commit hook by lint-staged, try to replace it to nano-staged.
It has a much smaller footprint in node_modules and works faster.
github.com/usmanyunusov/nano…
Instead of overflow: hidden, you can use border-radius: inherit to avoid background of children’s elements bleeding out of the border radius of the parent element.
For example, since overflow will cut off popovers, etc.
css-tricks.com/preventing-ch…
Wrote a guide about 11 popular HTML and JS mistakes in forms.
Many big companies make them in even a simple login forms.
Use it as checklist for next PR review.
evilmartians.com/chronicles/…
I tried pnpm instead of yarn 3 in the app and I like it a lot.
It is exactly what I expect from “yarn 2” to have the same API, but faster and without bugs.
Should I start to use pnpm in my open source libraries? Do you see pnpm in other open source?
npm is behind all other package managers in most of the cases.
Yarn 1 is dead.
Yarn 2+ was created for PnP and requires too many configs for simple open source projects.
This is why I am switching to pnpm.
“Open source is political” only applies to US politics.
If something happens outside of US context, tech Twitter will be silent.
Remember it next time when US developer will come to your open source project and ask to rename option because it is important for US politics.
Twitter please make this viral. There's a civil war going on in Belarus cuz of rigged elections. Their president sits in the office for 26!!! years. That's crazy. People are dying on the streets. Several journalists are missing. We supported #BLM movement now help us please 🙏🏽
I just released a new JS library KeyUX to create a user-friendly keyboard UX for websites.
Not just for a11y, but for any professional tool in general.
github.com/ai/keyux
Nano ID is an extremely small JS library (139 bytes!) to create IDs.
But @polemius found a way to reduce another 2 bytes. He wrote a script using artificial evolution to find better for gzip symbols order in the alphabet.
His article about this hack:
dev.to/polemius/how-i-reduce…
Do still thinking of what JS framework you should choose? Miyamoto Musashi in 17 century did the best answer for your question.
“You should not have a favorite weapon. To become over-familiar with one weapon is as much a fault as not knowing it sufficiently well”.
Received $2000 donation from Microsoft to @PostCSS, @Autoprefixer and other my projects. They donated many projects that day.
Thanks a lot to people who promote this project in the company and developers who highlight my projects.
github.com/sponsors/ai
Don’t use “carousels” on websites.
They look cool only in Figma. Users usually don’t like them, and developing them right is almost impossible.
A simple list will be much easier to use and develop.
shouldiuseacarousel.com
If you are making dark theme support for your website, don’t forget to add :root { color-scheme: light dark }. It tells Safari to use dark scrollbar and buttons.
webkit.org/blog/8840/dark-mo…
Here is my open-source drama to be fully transparent about criticism addressed to me.
Summary: Colorette author dislikes that I fork his project.
Threat with how I see this problem (let’s discuss open-source ethics) ↓
nitter.app/jorgebucaran/status/14…
I just bought @FrameworkPuter 13 as my main laptop for web development.
There is no just alternative with the same level of Linux support.
Also:
— AMD CPU (“M1” for Linux laptops)
— Charging via USB-C from both sides of laptop
— Ability to update CPU to the new generation
We made a big update for our OKLCH color picker 1.1.
OKLCH is a color format wide gamut colors support and great math for design systems.
We added 3D and new color space render with Web Workers.
oklch.com
↓ A small thread with technical details
Introducing our new project for web developers. We (@romanshamin and I) have created the OKLCH color picker and сonverter.
oklch.evilmartians.io/
↓ Thread: here's why oklch() could replace hex, rgb(), or hsl() in CSS and why you'll need this tool.
I just updated my famous website favicon guide:
evilmartians.com/chronicles/…
— Webmanifest icons are now optional (for PWAs) since browsers stopped using them in normal UIs
— We added maskable icons. Android will cut them into a special shape depending on the system theme.
I’m turning 37 today!
If you are in Barcelona, come join the party at 19:00 in La textile collective. No gifts necessary.
maps.app.goo.gl/MnSnr1frtNwj…
Or you can always donate me on GitHub.
github.com/sponsors/ai
During the migration @logux_io from Jest to uvu I found that I can’t find a small spy library for methods with good TypeScript support.
In an hour, I made my library with only 5 KB in your node_modules, minimalistic API and optional mocking.
github.com/ai/nanospy
Node.js no longer needs libraries for colored output to the console.
They added styleText to node:util, which does the job of chalk or picocolors.
github.com/hplush/slowreader…
Good idea from @iamakulov (he is great in website performance, highly recommend). window.addEventListener('resize', cb) can be replaced with window.matchMedia(media).addListener(cb), which will call JS only on specific width changes
github.com/ai/sitnik.ru/pull…
I just finished a website for @logux_io. Check it out:
logux.io
We did a few experiments about how we can improve the standard open-source tool’s website.
github.com/logux/logux.io
In the thread below, I will try to explain these UX and tech experiments.
OKLCH color picker is my favorite type of app that seems very simple, but hides many tricks inside.
oklch.com
In this thread I’ll collect various hacks of the project.
github.com/evilmartians/oklc…
Today, I will kill Internet Explorer.
Browserslist 4.21 is ready with many new features.
But the main change is that IE 11 will be added to `dead` query and removed from the default browsers.
Just need to find a cute hedgehog GIF to fit @Browserslist feed cute style.
Next week it will be 5 years since the first @PostCSS release and 5 years since my experiment of a month without any computers and digital devices.
So we translated old article with my conclusions, how this month without computers changed me.
dev.to/iskin/how-a-month-wit…
This week @github just banned all users from Iran and Crimea. They can’t see or push the code.
medium.com/@hamed/github-blo…
Even GitHub Pages content is banned.
VPN will not help. GitHub banned users, who used Iranian IPs in the past.
I prefer LanguageTool to Grammarly, since it is open source, supports many languages and can be run locally.
But I just found that I can add it to VS Code to help me to write docs
marketplace.visualstudio.com…
I added it to repo of my configs
github.com/ai/environment/co…
We replaced globby and fast-glob with tinyglobby (by @superchupu) in Size Limit and postcss-mixins to reduce dependencies from 23 to 2.
github.com/SuperchupuDev/tin…
While some complain about the node_modules size, we with @e18e_dev, are making the Node.js ecosystem lighter.
Like having CSS of React component in the same JS files, but don’t want to compile CSS in client-side runtime like in the most CSS-in-JS?
css-literal-loader by @monasticpanic is a CSS-in-JS, which compiles styles to static CSS on Webpack build step.
github.com/4Catalyzer/css-li…
Found a great test runner uvu by @lukeed05.
Do not use global API (like expect() or it() in Jest), super lightweight (Jest takes 25 MB in node_modules), fast.
Concerning bad ESM support in Jest, I am thinking of migration.
github.com/lukeed/uvu
Moved sitnik.ru from HSL to LCH colors with postcss-lab-function polyfill.
HSL has a problem: changing the hue changes the brightness. I think new LCH and OKLCH are good candidates for universal way to write color in CSS.
github.com/ai/sitnik.ru/comm…
We launched our open source OKLCH color picker at Product Hunt!
producthunt.com/posts/oklch-…
It is not about the picker itself. We want to help design community in transition to using system for choosing colors. And this system needs a good math (OKLCH).
JS library returns clock emoji symbol with the current time in arrows position. Useful for making UI more cute. We use it in our chatbots.
github.com/gazay/node-emoji-…
It is better to use `animation-play-state: paused` in (prefers-reduced-motion: reduce) media query instead of `animation: none`.
`paused` renders the first keyframe. `none` loses properties from keyframes.
github.com/ai/sitnik.ru/blob…
pnpm can run scripts in parallel. Just pass RegExp to pnpm run.
If you have monorepo, use also --recursive --include-workspace-root to find scripts in subprojects too.
For instance, it speeded up Nano Stores tests by 1.6 times.
github.com/nanostores/nanost…
Recently found @penpotapp, open source alternative for Figma.
I used it to create an illustration for my keyboard layout and like the experience. Everything works as expected.
penpot.app
We continue supporting our article about minimal favicon set.
In new version we replaced sizes="any" to "32x32" for ICO file. It prevents Chrome from downloading both ICO and SVG files.
evilmartians.com/chronicles/…
Do you remember a neural network for smart code auto-completion? It is now available for most popular text editors (including VS @code, @AtomEditor, Sublime Text, Vim, WebStorm).
tabnine.com/
Visited the second @SvelteSociety meetup in New York. @Rich_Harris, the creator of @sveltejs show adaptive SVG hacks and @swyx show his static sites on Svelte experiments. The meetup was really cozy.
The most strange letter in the world is a “Multiocular O” from Russian. It was used very rarely and only in “many-eyed seraphims” word.
en.wikipedia.org/wiki/Multio…
CommonJS applications can’t use a library with only ES modules.
@sindresorhus announce the migration of his 1K+ libraries to pure ESM without CJS. It will cause a chain reaction.
blog.sindresorhus.com/get-re…
2021 will be a year of big ESM migration in Node.js community.
If you use Bootstrap only for grids, now you can remove it and use CSS Grid Layout, which is supported by all browsers including IE 10-11.
How to use grids in IE by Autoprefixer:
css-tricks.com/css-grid-in-i…
Why it is a good idea to remove Bootstrap:
evilmartians.com/chronicles/…
Types in TypeScript is a Turing completeness language.
Just for fun, people made a SQL database on top of these types (not in TS, but on types, database will disappear after compilation to JS).
github.com/codemix/ts-sql
I released Size Limit 1.1, the biggest release of the project. @MaksimBalabash found a way to track JS execution time.
github.com/ai/size-limit/
For example, CI can check that your app JS will be downloaded and executed in 2 seconds. It is like linter, but for performance.
Bought a new laptop, Lenovo ThinkPad X1 Gen 9.
The best update in my life.
— A really new level of keyboard comfort
— Official Linux support
— 14" 16:10 4K screen
More context of how NtechLab’s technology is used against people in Russia by Putin’s regime.
And this company operate in Cyprus without real problems.
We should add them to the sanctions list.
I finally released Size Limit 1.0. The tool to find why a small JS lib adds 100 KB to a project. It will show error in pull request if it bloated the size.
github.com/ai/size-limit/
Add to your open source JS projects. Send PR to another JS libs if you want to reduce its size.
I moved from nvm to @usevolta for Node.js version switching. Volta is written on Rust and much faster. It is critical is you switch versions on `cd`.
volta.sh/
There is also asdf , which works with many tools, not just Node.js.