frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Size of Life

https://neal.fun/size-of-life/
2051•eatonphil•19h ago•222 comments

A "Frozen" Dictionary for Python

https://lwn.net/SubscriberLink/1047238/25c270b077849dc0/
19•jwilk•1h ago•0 comments

The Cost of a Closure in C

https://thephd.dev/the-cost-of-a-closure-in-c-c2y
78•ingve•3h ago•19 comments

Getting a Gemini API key is an exercise in frustration

https://ankursethi.com/blog/gemini-api-key-frustration/
561•speckx•14h ago•228 comments

Patterns.dev

https://www.patterns.dev/
298•handfuloflight•9h ago•73 comments

Australia begins enforcing world-first teen social media ban

https://www.reuters.com/legal/litigation/australia-social-media-ban-takes-effect-world-first-2025...
787•chirau•1d ago•1196 comments

Booting Linux in QEMU and Writing PID 1 in Go to Illustrate Kernel as Program

https://serversfor.dev/linux-inside-out/the-linux-kernel-is-just-a-program/
113•birdculture•6d ago•32 comments

How the Brain Parses Language

https://www.quantamagazine.org/the-polyglot-neuroscientist-resolving-how-the-brain-parses-languag...
26•mylifeandtimes•2d ago•6 comments

Auto-grading decade-old Hacker News discussions with hindsight

https://karpathy.bearblog.dev/auto-grade-hn/
453•__rito__•17h ago•205 comments

Why Startups Die

https://www.techfounderstack.com/p/why-startups-die
13•makle•3d ago•5 comments

Python Workers redux: fast cold starts, packages, and a uv-first workflow

https://blog.cloudflare.com/python-workers-advancements/
64•dom96•2d ago•15 comments

Go's escape analysis and why my function return worked

https://bonniesimon.in/blog/go-escape-analysis
11•bonniesimon•6d ago•6 comments

VCMI: An open-source engine for Heroes III

https://vcmi.eu/
109•eamag•4d ago•14 comments

How Google Maps allocates survival across London's restaurants

https://laurenleek.substack.com/p/how-google-maps-quietly-allocates
272•justincormack•2d ago•131 comments

Incomplete list of mistakes in the design of CSS

https://wiki.csswg.org/ideas/mistakes
123•OuterVale•6h ago•74 comments

Rubio stages font coup: Times New Roman ousts Calibri

https://www.reuters.com/world/us/rubio-stages-font-coup-times-new-roman-ousts-calibri-2025-12-09/
285•italophil•1d ago•479 comments

Super Mario 64 for the PS1

https://github.com/malucard/sm64-psx
233•LaserDiscMan•16h ago•91 comments

Fossils reveal anacondas have been giants for over 12 million years

https://www.cam.ac.uk/stories/twelve-million-years-of-giant-anacondas
49•ashishgupta2209•1w ago•21 comments

Qwen3-Omni-Flash-2025-12-01:a next-generation native multimodal large model

https://qwen.ai/blog?id=qwen3-omni-flash-20251201
270•pretext•19h ago•95 comments

Show HN: Wirebrowser – A JavaScript debugger with breakpoint-driven heap search

https://github.com/fcavallarin/wirebrowser
31•fcavallarin•20h ago•8 comments

Show HN: Automated license plate reader coverage in the USA

https://alpranalysis.com
182•sodality2•17h ago•105 comments

Flow Where You Want – Guidance for Flow Models

https://drscotthawley.github.io/blog/posts/FlowWhereYouWant.html
19•rundigen12•5d ago•1 comments

McDonald's removes AI-generated ad after backlash

https://www.theguardian.com/business/2025/dec/11/mcdonalds-removes-ai-generated-christmas-ad-adve...
7•terabytest•22m ago•1 comments

Common Lisp, ASDF, and Quicklisp: packaging explained

https://cdegroot.com/programming/commonlisp/2025/11/26/cl-ql-asdf.html
84•todsacerdoti•1d ago•20 comments

Scientists create ultra fast memory using light

https://www.isi.edu/news/81186/scientists-create-ultra-fast-memory-using-light/
99•giuliomagnifico•6d ago•24 comments

Valve: HDMI Forum Continues to Block HDMI 2.1 for Linux

https://www.heise.de/en/news/Valve-HDMI-Forum-Continues-to-Block-HDMI-2-1-for-Linux-11107440.html
740•OsrsNeedsf2P•17h ago•411 comments

3D-printed carotid artery-on-chips for personalized thrombosis investigation

https://advanced.onlinelibrary.wiley.com/doi/10.1002/adma.202508890
20•PaulHoule•1w ago•2 comments

Terrain Diffusion: A Diffusion-Based Successor to Perlin Noise

https://arxiv.org/abs/2512.08309
129•kelseyfrog•16h ago•38 comments

Gundam is just the same as Jane Austen but happens to include giant mech suits

https://eli.li/gundam-is-just-the-same-as-jane-austen-but-happens-to-include-giant-mech-suits
218•surprisetalk•1w ago•147 comments

Is it a bubble?

https://www.oaktreecapital.com/insights/memo/is-it-a-bubble
244•saigrandhi•17h ago•378 comments
Open in hackernews

Incomplete list of mistakes in the design of CSS

https://wiki.csswg.org/ideas/mistakes
123•OuterVale•6h ago

Comments

edent•6h ago
When I occasionally venture I to standards-land, I always ask "what user research have you done on this?"

So many weird design choices in computing are because one person said "this seems right to me" without considering other viewpoints or consulting with the wider community.

Sure, you probably dont want death by committee, but a tiny cabal engaging in groupthink often produces unhelpful results.

kuharich•6h ago
Past comments: https://news.ycombinator.com/item?id=38363698
dang•6h ago
Thanks! Macroexpanded:

Mistakes in the Design of CSS (2013) - https://news.ycombinator.com/item?id=38363698 - Nov 2023 (143 comments)

Incomplete List of Mistakes in the Design of CSS - https://news.ycombinator.com/item?id=25891435 - Jan 2021 (68 comments)

Incomplete List of Mistakes in the Design of CSS - https://news.ycombinator.com/item?id=18297757 - Oct 2018 (150 comments)

Incomplete List of Mistakes in the Design of CSS - https://news.ycombinator.com/item?id=10453850 - Oct 2015 (106 comments)

Incomplete List of Mistakes in the Design of CSS - https://news.ycombinator.com/item?id=7665667 - April 2014 (1 comment)

nfw2•6h ago
I'd like to propose for the list:

Default heading styles should not have equal top and bottom margin. Headings should be closer to the content they label than to the content they are setting their content apart from.

h1, h2, h3 should not have different styles. it's an anti-pattern that leads to broken accessibility

quirino•5h ago
This "headings closer to the content" suggestion is very good.

I came across it when reading Butterick's Practical Typography and it's possibly the lowest effort/clearest improvement guideline in the book.

Now I can't unsee websites that do it wrong.

0xfffafaCrash•5h ago
moreover h* is just broken whenever dealing with more dynamic content — it simply can’t reasonably be made to work according to accessibility recommendations — and the accessibility guidelines around never skipping a level themselves are ridiculous given the practical reality that dynamic content exists and we have only h1, h2, etc. to work with — the readers and specs are what need to adapt here, not the entire internet

there should really be one header tag and its level should be based on some nesting depth

and don’t get me started on the maintainability mess that is z-index… better we have a system to centrally maintain an ordering list than a distributed one which only works reasonably consistently if you already know everything in the whole system

webstrand•4h ago
I like how z-index works, currently. And though I agree with the article, it should apply to all elements by default, I'm not sure how you'd do stacking differently in a way that'd work any better than the current situation?

You can't do away with stacking contexts, you need those to isolate content you don't control to prevent it from breaking the stacking order of content you do control.

I completely agree with you about h* tags, though. I wish html5 sectioning hadn't been killed by the browser vendors. As is there's no safe way to put headings inside custom elements. We almost had it, it was specified and everything.

pwdisswordfishy•2h ago
Lile XHTML2?

https://www.w3.org/TR/xhtml2/mod-structural.html#edef_struct...

nfw2•45m ago
The problem with trying determine heading depth automatically is the depth is not something that can be deduced just by the structure. If headings are siblings, for example, the may be on the same level semantically or not.

One way I've dealt with this in react is combine a Heading component with ContentGroup component. Each content group needs exactly one heading, and heading can't exist without it. Content group can contain other content groups. The tag for heading can then be determined by how many content groups are in the tree above it.

This works pretty well ime, but it can be hard to get devs to use (or think about accessibility at all).

wavemode•3h ago
That's sensible, but I think default styles for specific elements are not part of the CSS standard, and are instead dictated by the user-agent stylesheet of your browser.
anonymars•5h ago
I will never understand the bizarre scene of the web's smug collective declaration that tables were dead and not to be used juxtaposed against the years it took to regain the ability to reliably center things. Assuming one agrees that we even did regain it.

Related: I also love when I can't paste tabular data into Excel/etc. anymore

For the record, I don't hate the idea of stylesheets, but...sheesh

ModernMech•5h ago
My favorite part about that is how we came back around to display:grid
windows2020•5h ago
Until then, display: table kept everyone calm.
spartanatreyu•5h ago
No, dealing with tables was like trying to build a house out of tempered glass.

With css grid, I can tell each element which area or column+row to occupy.

If I add or remove a random element, the rest of the elements stay in the correct place.

But do that with a table and you end up trying to glue your house back together shard by shard whilst trying not to cut yourself or breaking things more.

friendzis•4h ago
> If I add or remove a random element, the rest of the elements stay in the correct place.

This complaint highlights how absurdly not fit-for-purpose html+css actually is. Okay, you may want to do "responsive" design, but you have the semantic layout fixed, therefore you try and contort a styling engine into pretending to be a layout engine when in reality it is three stylesheets in a trenchoat.

pbowyer•2h ago
> Okay, you may want to do "responsive" design, but you have the semantic layout fixed, therefore you try and contort a styling engine into pretending to be a layout engine when in reality it is three stylesheets in a trenchoat.

I need to write this up properly, but one of my bugbears with responsive design is that it became normalised to push the sidebar down below the content on small screens. And if you didn't have a sidebar, to interweave everything in the content no matter what screensize you were viewing on.

What I want is a way to interleave content and asides on small screens, and pull them out into 1+ other regions on larger screens. Reordering the content on larger screens would be the icing on the cake but for now I'll take just doing it.

This CSS Grid approach adds gaps: https://codepen.io/pbowyer/pen/azNarbZ

Using named grid-template-areas stacks the items you move to the sidebar on top of each other, so you only see one of them.

'Good' old floats get most of the way, but put the item in the sidebar exactly where it falls. Plus they're a pain to work with overall: https://codepen.io/pbowyer/pen/jEqdJgP

bryanrasmussen•48m ago
>This complaint highlights how absurdly not fit-for-purpose html+css actually is. Okay, you may want to do "responsive" design, but you have the semantic layout fixed,

this not fit for purpose may in fact be historically superseded usages that still are baked in to some usages affected by the relatively rapid change of the various platforms that must interact and use the respective technologies, the specification version of "technical debt"

that is to say some subsets of the numerous technologies can be used to construct something fit for the purpose that you are describing, but as a general rule anything constructed in a solution will probably be using other subsets not fit for that particular purpose, but maybe fit for some other purpose.

afavour•5h ago
Tables aren’t dead, they never were… when displaying tabular data. When it comes to layout I think you might be wearing rose tinted glasses. Remember having to put a 1px image in a table cell to avoid it disappearing? Remember “best viewed at 800x600”? I’m personally not nostalgic for either.
erfgh•2h ago
There were better solutions to those problems than the CSS debacle.
tobr•2h ago
For what it’s worth, the very page we’re on here still uses tables and spacer gifs, in 2025. (EDIT: I don’t mean to imply that this is good, just an inescapable observation in this context)
Popeyes•1h ago
Probably why there are endless reworkings of the site.
eviks•2h ago
> Remember having to put a 1px image in a table cell to avoid it disappearing

Isn't this a trivial problem to solve that doesn't require introducing any new layout mechanisms?

dahcryn•1h ago
at least they were specific

Today it's usually implicitly designed for iphone, designed for 1080p, or ipad, and you have to guess, strong correlation with whatever device the designer uses in his personal life.

xboxnolifes•4h ago
I think it was advised a bit too early, but ever since flexbox entered the scene, tables for page formatting became irrelevant.

And just in case, nobody ever said tables were dead. Tables were declared bad practice for page formatting, not for tabular data.

cluckindan•3h ago
Do not use flexbox for page layout. It invites nested flexboxes, which eats your reflow performance.

Use grid instead.

twsted•3h ago
Useful insight: any sources?
dekoidal•2h ago
From 2014 https://jakearchibald.com/2014/dont-use-flexbox-for-page-lay...
wk_end•2h ago
Browser performance tips from 2014 mean very little twelve years on. Not only have machines gotten faster and networks gotten faster, rendering engines gotten faster. And I'm doubtful it nested flexboxes would've been all that much of a problem in most cases even then.

The most important thing is to use the right tool for the job. If grid lets you express what you want in the most straightforward way, use it; if flexbox does - even if it needs nesting - then use it instead. Don't shoehorn one into a situation where the other makes more sense. And sometimes either will work for a particular situation and that's fine too; use whatever you find most ergonomic. They're both very good in their own way.

cluckindan•1h ago
Try resizing a browser window with nested a flex layout.
tim1994•1h ago
Should you optimize for resize performance? I guess that depends on the app. Use the tool that fits the requirements.
easyThrowaway•2h ago
Not the first time I hear of this, but I thought it was a blink-specific issue when using severely nested structures (e.g., html pages written using visual editors like Elementor or Webflow)?
throwaway77385•2h ago
For quite a while, I had to keep using flexbox instead of grids, because grids killed performance, funnily enough. That seems to have been rectified with modern browsers though, funnily enough.
zwnow•2h ago
Flexbox is great and having nested flexboxes is also great. It makes building responsive pages a bliss. Learn it if you are having trouble with it, it is really not that difficult. Grids are much more error prone and allow for much less flexibility.
rcxdude•16m ago
Even for layout, CSS took a long time to catch up with tables in some areas. Tables were not designed for layout, but there's a lot of aspects to them which are easier to grasp and work with than trying to get the same effect with early CSS.
erfgh•2h ago
The killer argument at the time (and even now most likely) is that screen readers could not distinguish whether the table was used for layout or for data and therefore sight-impaired users would have trouble.

The argument doesn't make sense because it is not too hard for a screenreader to understand whether a table is used for layout and even if it was hard the problem would more easily be solved by just adding an attribute to the table to indicate that it is used for layout.

agumonkey•2h ago
sidenote: as a teen, i would regularly layout posters and presentations in excel.. the page preview dashed-border and the grid stability was such a relief compared to word
6510•1h ago
On commodore 64 the screen is just a fixed size grid of characters. No one ever had issues making an ui. We pretend but flexible viewport size is not actually possible. If you are making a painting for example the size of the canvas greatly influences what can and can be done.

I made a stunning landscape photo one time that looked great only when displayed at roughly the size of a hand. If made larger undesirable details became visible (littering), when smaller important details were lost (a formation of birds over a fishing vessel).

oneeyedpigeon•49m ago
> We pretend but flexible viewport size is not actually possible.

Not beyond a point, but it's still very useful to be flexible up to that. For example, I'm very grateful that a web page will reflow text rather than print everything on one line and force horizontal scrolling.

KevinMS•2h ago
They shamed everybody into the torturous use of floats for layout and then eventually, about 15 years later, added layout features back into a layout language.
6510•1h ago
I try to politely debate the proponents with each hype cycle giving them the benefit of the doubt. They lost the "lets get rid of tables" debate quite miserably. I would quickly slap something together in jsfiddle, they would try recreate it. Adding some col- and/or rowspan programmatically for cells with the same value. Give an rgba color to rows and nth cells (columns). Resizing columns by size of cell content. It took tons of ugly css to replicate. Pasting the table into a wysiwyg editor is something they can never hope to re-create.

Usually I declare victory when they say that tables might get depreciated in the future.

They at one point really wanted to get rid of framesets. I asked how to make the classic scrollable resizable side top bottom UI in pure CSS. We've tried for hours, everything we tried looked ugly and didn't fully work. framesets are here to stay now :)

I still have one of the funnier "how to make this without tables?" challenges. It's not a very good example of the use of tables but did make me laugh.

https://go-here.nl/omg-tables.html

bryanrasmussen•57m ago
>Give an rgba color to rows and nth cells (columns).

that sounds like a use for tables, so I find it difficult to imagine a non-table layout that would want this.

>Resizing columns by size of cell content.

I can sort of see this as a requirement for non-table layouts that would not work well, however my experience from table time was that was one of the biggest irritants at least for me, that columns would haphazardly resize based on what was in them, and sometimes you wanted them to and sometimes not. As a general rule I found it better design wise to truncate text rather than have things expanding and contracting in response to what copy editors were doing.

>framesets are here to stay now

woo yeah, I see them a lot in the wild. I mean really the only time I really see frames used anymore are iframes and generally in eCommerce and similar security requiring solutions where the frame can be partially controlled by the storefront, but is more fully controlled by the payment provider. I just find the statement "framesets are here to stay now" really weird and triumphal for something that is so rarely used?

>I still have one of the funnier "how to make this without tables?" challenges.

I followed the link, I would think it is better suited to a "why would you make this" challenge. I'm not sure

1. it shouldn't be a table. seems like maybe it should be

2. why the freaky animation. or for that matter why the animation nearly crashed my browser.

I'm definitely sure lots of designs could not be adequately achieved without tables and framesets, but my experience seems to have run contrary to yours because for me CSS was a godsend in fixing the things I found irritating about those two technologies, this does not mean that I never encountered situations where I thought this would be easier with tables, but as soon as I tried putting tables back in I found all those irritants came back in.

From my experience tables and framesets were best suited to layouts that are rarely ever wanted, and when used to implement slightly different layouts had too many problems and irritants to be useful.

Your mileage has obviously differed, but I'm not sure that "here is a particular problem that people seldom wish to solve and which I have constructed, that plays to the strengths of my favored technology while avoiding its pitfalls" is as impressive an argument as you seem to think it is.

lucideer•11m ago
> I will never understand

I think it's fairly easy to understand if you understand what it was a backlash against. Tables today are used sensibly, for the most part, but the pre-CSS world was truly absurd in its table use.

The reaction may well have been over-the-top, but it wasn't disproportionate given the state of table usage at the time.

CSS's initial forays into layout seem bad today because people think of tables in terms of their intended use (not the now long-gone monstrosities the community actually extracted from them), but in comparison to the previous ecosystem, floats were a relative godsend.

groby_b•5h ago
It is extremely funny to me that the list thinks the mistake about !important was using the exclamation mark sigil, and not the concept of a single priority level.

In the words of one of my CS profs, from a few decades ago: "There are only 3 numbers - zero, one, and infinity. And 'one' is often a mistake"

colechristensen•4h ago
As opposed to the 15 levels of priority available in Chef.

5 different types (default, force_default, normal, override, force_override)

which can be in 4 different places (attribute, node, environment, role) but not all of the types can be in all of the places

PLUS the "automatic" type, which is from somewhere else entirely

Oh and there's inheritance and merging which does not behave intuitively at all because it's not exactly inheritance.

In other words I have early career trauma from someone's extremely unwise priority implementation and am deeply suspicious of ANY priority override system which isn't just code I've written in a normal programming language.

savolai•4h ago
This felt relieving. As in: some part of me had felt stupid for thinking some of this seems really unintuitive when using it in practice. Like z-index stuff, margins, vertical-align, border-radius, ...

Meanwhile, one of the linked pages mentioned bluegriffon, so I got curious if such editors can handle template languages such as django's.

While I don't know that yet (edit:no templates at all, what a shame), I also found this tutorial, and it was inspiring that such a pedagogical approach to online authoring still exists.

https://www.thesitewizard.com/bluegriffon/bluegriffon-2-tuto...

Edit: no seriously, why don't these editors support at least some established template language? I think dreamweaver had a concept of templates, which made using these editors make at least some sense.

Edit: oh wow dreamweaver still exists. Any of you have experience? Still good?

3eb7988a1663•3h ago
Are they taking requests? I know just enough CSS to hang myself, but one thing I can never keep straight in flexbox is "align" vs "justify". Could not have used something like "main-axis" or "cross-axis"? Intentionally had to be somewhat obtuse from how it would be used?
jdthedisciple•3h ago
Yea align and justify get me everytime.

I like that in Flutter they do exactly as you suggest: they call it mainAxisAlignment and crossAxisAlignment

hoten•3h ago
> Table layout should be sane.

I wish that one were we elaborated on more :)

Devasta•2h ago
For me, the mistake is having style attributes in html.

You should be able to write

<div color="red" font-weight="bold"/>

Instead of

<div style="color: red; font-weight: bold;"/>

silverwind•2h ago
These namespaces do not merge cleanly, for example `content`.
Devasta•7m ago
Oh for sure, its way way too late to do it, but I don't think much of any of the modern web stack would be kept if we designed in the 90s with what we know now.
sakesun•2h ago
Wow. An xhtml page.
chrismorgan•45m ago
Only in name, not reality: it’s served as HTML. If it had been served as XHTML, they’d have immediately noticed how they didn’t close the meta viewport tag (since it wouldn’t have rendered) and fixed it.
nrhrjrjrjtntbt•2h ago
Margin collapse... any good resources on this. Didnt know it was a thing until know but ive seen it happen and couldnt fathom why.
felipc•2h ago
Complete list of mistakes in the design of CSS: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference

Just kidding. To me the biggest mistake was the standards' slowness in the early 2010s to provide badly needed new functionality such as a proper replacement for table layout, vertical alignment, etc. The cult of knowing specific tricks to get things working properly carried on for too long and made a lot of people annoyed at the semantic web (rip).

kjgkjhfkjf•2h ago
It would be very interesting to see a post-mortem for each of the design mistakes, with links to the original design discussions and docs, and analysis of how the decision-making process went astray.
TZubiri•2h ago
Having units for pixels and centimeters, despite not being able to reliably control either of those measurements.
silverwind•2h ago
Why not make a opt-in "strict mode" for CSS that fixes all these issues?
reddalo•36m ago
Because writing such CSS would lead to broken results on most browsers.
eviks•2h ago
> That should be corrected if anyone invents a time machine. :P

Why can't this be dealt with with CSS versioning/features where you can opt into your current-color and a lot of more substantive style behavior while leaving currentColor functional?

yread•1h ago
I don't understand the point about comments. Why shouldn't they be allowed? What object model?

>Comments shouldn't have been allowed basically everywhere in CSS (compare to HTML, which basically only allows them where content goes), because it makes them basically unrepresentable in the object model, which in turn makes building editing directly on top of the object model impossible

maattdd•1h ago
https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_...
wedg_•1h ago
I'm guessing they mean that comments shouldn't be allowed everywhere, not that they shouldn't be allowed at all? i.e. CSS lets you put comments in many more places than HTML, in such a way that it's hard to practically impossible to represent in an AST? At least that's how I read it
recursivecaveat•1h ago
Imagine you have something like `width /comment/: /comment2 /12px /comment3/,`. Now you want to load your css into some kind of structured representation, rearrange it, then spit it back out again with that comment intact. The requirement to represent such comments in your structured format so you can retain them is really obnoxious. In html you can just view comments as another node in a uniform tree.
systoll•1h ago
The CSS Object Model.

HTML comments are basically just a HTML tag that isn't rendered. Tools that 'compile' the HTML code into a document tree, including browsers, preserve comments as nodes without any extra effort.

CSS comments can go anywhere:

    /*wow*/ .selector /*x*/ {animation /*z*/: 2s /*z*/ linear /*z*/ bounce;}
Tools that transform/parse CSS can either: 1. Strip comments before parsing, meaning anything based on the parsed version will lose the comments. 2. Dedicate a disproportionate amount of complexity to retaining the comments, and still not really have a good way to handle them through edits/transformations.
yread•54m ago
But if it's valid CSS it has to be representable in AST/object model? It's a comment, it can't have any child nodes, it doesn't depend on anything - pretty trivial. And if it's in the tree you can transform it with proper tools. If you are transforming CSS you have to write a proper parser and not just a bunch of regexes

EDIT: also why is it useful to have comments in the object model in the first place? To access them from js?

Izkata•1h ago
> Absolutely-positioned replaced elements should stretch when opposite offset properties (e.g. left+right) are set, instead of being start-aligned.

They do with left+right, and have done this for a very long time. You only get the anchoring if you additionally set width.

Izkata•1h ago
> The display property should be called display-type.

More importantly to me, "display" has been overloaded with two meanings: Display of the element this rule applies to/how it interacts with surrounding elements (none, block, inline, inline-block) and display of the contents of this element (flex, grid).

Which is why we now also have inline-flex and inline-grid.

Edit: Apparently we can now arbitrarily combine inline/block and flex/grid as two values to "display", no idea when this happened: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/P...

6510•1h ago
- Making elements somewhat act like they are not there should not have been display:none as as display: has other purposes.

- Values for properties with just two valid values available should have been true and false rather than having one more unique word combo to remember forEach.

- I cant quite describe them but float at times has some weird unexpected behavior.

https://stackoverflow.com/questions/23154201/weird-behaviors...

shiomiru•48m ago
The greatest mistake IMO is the way float state leaks out of blocks, as this is both extremely unintuitive and undesirable for performance reasons.[1] Floats should've been restricted to inline formatting contexts, with all in-flow blocks behaving as if they had `clear: both' set.

I also don't understand why they never specced the (much simpler) `text-align: -moz-left/-moz-right/-moz-center' which already had precedent in HTML with `<div align=left/right/center>'. It's the saddest part of the "center a div" saga, all the W3C had to do to fix it is to assign a standard keyword to a feature that everybody already implemented, but to this day it still hasn't happened.[2]

[1]: https://pcwalton.github.io/_posts/2014-02-25-revamped-parall...

[2]: After many long decades, they did finally specify block-level `justify-items'. Two problems: a) it's backwards-incompatible with text-align, b) it still doesn't work in Gecko.

redbar0n•44m ago
How could CSS (or any language) have been designed so that these mistakes could have easily been corrected today in any case?

If the mentioned mistakes or similar language design mistakes were made. Because mistakes will always be made.

(Unison lang comes to mind but it’s refactor failsafe seems narrow. How about: Antifragile language design? Self-correcting language?)

MrMetric•13m ago
Simple: A version specifier, or feature specifiers. Backward compatibility concerns vanish when I can opt-in to a newer spec. Old code keeps working, and new code doesn't suffer for legacy nonsense.

For example, the Circle compiler extends C++ with its `#feature` directive: https://github.com/seanbaxter/circle/blob/master/new-circle/...

Sadly, the closest I've personally seen to this sort of thing in widespread use is `"use strict";` in JavaScript, which is only a single binary switch. You can't, say, turn on a new keyword, disable a keyword, switch to a different incompatible version of some browser API, etc.

I encourage all language designers to include a feature mechanism in a forward-compatible way. Don't overthink the difficulty: It doesn't need to do anything at first, it just needs to not be a parsing error. Treat it like a comment. FYI, this is the same as having a version number or header size in a binary file format's header, which all sane formats have (there are a lot of insane formats out there...).

the_other•26m ago
‘text-transform: uppercase’ should be ‘text-transform: UPPERCASE’, for the LOLZ.