A Multi-Layered CSS Pun on 'Weird Flex But Ok'
Description
This image is a screenshot of a humorous Twitter thread between several developers. The first tweet, by Eli, confidently claims to know about 'linked lists' and provides a simple HTML `<ul><li><a>sup</a></li></ul>` snippet as proof. A second user, JF Bastien, sarcastically challenges him to 'Please reverse the linked list using CSS.' In a clever response, Elijah Manor provides the CSS code `ul { display: flex; flex-direction: column-reverse; }`, which visually reverses the order of the list items. The final tweet, from Sean Knox, delivers the punchline: 'Weird flex but ok'. The humor is multi-layered: it starts with the incorrect conflation of an HTML list with a computer science linked list, moves to an absurd technical challenge, is met with a surprisingly effective and witty CSS solution, and culminates in a perfect pun. The phrase 'weird flex' refers both to the strange boast and the use of the CSS `display: flex` property, making it a sophisticated joke that requires knowledge of CS fundamentals, frontend development, and internet slang
Comments
7Comment deleted
Backend interviews: 'Reverse a linked list in place.' Frontend interviews: 'Can you reverse the visual order of these divs without touching the DOM?' Both get solved, but only one of them ends with a perfect pun
One line of CSS: flex-direction: column-reverse; - suddenly the linked-list reversal is O(1) for the dev, O(n) reflow for the browser, and infinite cache invalidation for every CS purist in the room
The best part about using flexbox to reverse a linked list is that it has the same time complexity as the whiteboard interview solution, but with infinitely more browser compatibility issues
When your interviewer asks you to reverse a linked list in O(n) time and O(1) space, but you're a frontend engineer who knows that CSS flexbox can reverse visual order without touching the DOM - technically correct, the best kind of correct. Bonus points: it's declarative, works in IE11 (with prefixes), and the 'Weird flex but ok' response is both a cultural reference and an accurate technical description of the solution
Only in frontend can you reverse a “linked list” in O(1) with flex-direction: column-reverse - looks perfect until keyboard navigation proves you only reversed the rendering, not the DOM
Reversing a linked list with flex-direction: column-reverse - constant-time code change, linear-time confusion when tab order, a11y, and event handlers still walk head→tail
Forget O(n) traversal and recursion - flexbox reversal is pure O(1) declarative dominance