392 private links
Mots-clés lié à display: flex
- auto : L'ancien roi. Contextuel, imprévisible parfois, il laisse le navigateur calculer la taille selon le modèle de boîte standard (display).
- min-content : "Je veux être aussi petit que possible." Le navigateur va essayer de réduire la boîte jusqu'à ce que le mot le plus long ou l'élément le plus large force la largeur minimale. C'est le "soft wrapping" ultime.
- max-content : "Je prends toute la place dont j'ai besoin." La boîte s'élargit pour contenir tout le texte sans aucun retour à la ligne, quitte à provoquer un scroll horizontal (à utiliser avec prudence !).
- fit-content : Le compromis parfait. C'est mathématiquement équivalent à min(max-content, available-space). La boîte s'adapte au contenu, mais s'arrête poliment si elle touche le bord du conteneur parent.
- stretch : L'élément s'étire pour remplir l'axe disponible. C'est souvent le comportement par défaut des flex-items ou des grid-items.
Math functions such as clamp(), min(), max().
Le pattern Repeat Auto Minmax (RAM) est usuellement donné aux snippets qui génère une grille responsive sans aucun breakpoint grid-template-columns: minmax(300px, 1fr)
The author creates a project to gather statistics about the top most starred projects on Github or the most downloaded packages on NPM.
- 9-27% of JS/TS projects declare themselves to be ES Modules
- Less than 6% of JS/TS files declare that they are ES Modules via the
.mjs,.cjsor.mtsfile extensions.
Some ideas:
- kill
.mjs,.cjsand.mtsshould be replaced by thetype="module"in package.json. Let's stick to.js,.jsx,.tsand.tsx - Make
type="module"the default and warns when the type is not set to module. - We should upgrade the most common libraries used by the community to ES Modules
- The NPM registry can require an explicit module field on new packages, making it clear when a package intentionally uses CommonJS.
- NodeJS can officially drop support for
requireandmodule.exportsin a future version, creating a bit more pressure to migrate.
appearance: base-select, so it's too early yet.
Here's the thing: 99% of companies don't need them. The top 1% have tens of millions of users and a large engineering team to match.
The fun thing about Postgres is there is already an extension for that: PostGIS, Full-text search, JSONB, TimescaleDB, pgvectorm, and many for AI
Each database add hidden costs: backup strategy, monitoring dashboards, seceurity patches, on-call runbooks, failover testing.
SLA math: Three systems at 99.9% uptime each = 99.7% combined
compared to 25M+ with cloud services.
So in order to set up one, the data center needs power, cooling, servers and software. The post goes in-depth about it. The list of softwares available is a great inspiration.
All of our storage arrays use mkv. The main array is 3PB of non-redundant storage hosting our driving data we train on. We can read from this array at ~1TB/s, which means we can train directly on the raw data without caching. Redundancy is not needed since no specific data is critical.
It can be useful for later. It seems broken on Firefox though.
A dialog transition. It can be definitely useful instead of heavy implementations. Here is a lightweight implementation without JS.
With the tool https://weasyprint.org/
A makefile script in Typescript, or to run benchmarks.
Issues with SQLite:
- The test suite is not open source
- External contributions are not welcomed
- It's written in C, which is nowadays prone to easily-avoidable bugs, hard to maintain and add new features
- SQLite does not support concurrent writes
- Columns are weakly typed
Note the SQLite documentation hints Rust as a potential language for a rewrite under conditions listed at the end of the page.
Where Turso is good: scaling (instead of switching to PostgreSQL). Also it's simple to build an extension for it
I don't know if SASS is relevant for most projects nowadays.
A powerful demo
I also use the folder model to understand it. The way I undestood it is with some trials. I got it with position:absolute that somehow create a new stack. This stack inherits the z-index of the DOM node.
a thing you absolutely cannot do is nest one interactive control inside another
it has few examples.
Some things to consider in this reset:
- an anonymous layer is used.
- border-box for all
- reset margins and borders
- reset body margins and paddings.
- min body height is 100%
- typography: line-height 1.5; prevent
text-size-adjustfor mobile - but headings, button, input and label get a smaller line-height
- prevent media content overflow with
max-inline-size: 100%; display: block; block-size: auto - fill svg with currentColor for svg without fill properties
- inherit fonts in fields
- textarea should resize only vertically
- remove fieldset borders
- text with
text-wrap: pretty - every digit has its own size (use tabular-nums for tables, time, math) with
font-variant-numeric: proportional-nums overflow-wrap: break-wordon texts and heading to avoid inline overflows- get the numbers on the same baseline with
font-variant-numeric: lining-nums; - hanging punctuation must be set properly
- code clarity is a must, so
font-variant-numeric: slashed-zerois useful. - collapse table borders
- reset
supandsubline-height because they are messing with it in texts - align opacity with
:disabledto 0.8 for all browsers and set the cursor: not-allowed - add an outline-offset to 0.2rem for
:focus-visible
Shadcn makes the radio button overly complex, even if <input type="radio" name="beverage" value="coffee" /> with 30 lines of CSS is enough.
The library uses 3 imports (and 2 components) and 45 lines of code and ARIA.