Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    K

    kizu

    kizu.dev · Personal blog · on HN since 2023

    kizu, a front-end developer, writes about advanced CSS techniques such as anchor positioning, scroll-driven styles, and fitting text to width.

    Visit blogHN submissions
    Web DevelopmentDesign & UX
    What HN says

    HN commenters cite his fit-to-width and CSS workaround posts as proof that tricks once thought impossible work in CSS without JavaScript.

    Stats for nerds
    16HN people shared it
    12linked in comments
    15story points
    May 2026last shared
    2023people per year2026

    Top posts on HN

    1. 1
      Fit-to-Width Text
      3 people · 5 points · first shared 2023 · Discussion on HN
    2. 2
      Future CSS: Anchor Positioning
      3 people · 2 points · first shared 2023 · Discussion on HN
    3. 3
      Solving Shrinkwrap [for CSS]: New Experimental Technique [Without JavaScript]
      1 person · 2 points · first shared 2026 · Discussion on HN
    4. 4
      Layered Toggles: Optional CSS Mixins
      1 person · 2 points · first shared 2024 · Discussion on HN
    5. 5
      Position-Driven Styles
      2 people · 1 points · first shared 2023 · Discussion on HN
    6. 6
      Counters and Stones
      1 person · 1 points · first shared 2023 · Discussion on HN
    7. 7
      Scroll-Driven State Transfer
      1 person · 1 points · first shared 2023 · Discussion on HN
    8. 8
      Cyclic Dependency Space Toggles
      1 person · 1 points · first shared 2023 · Discussion on HN
    9. 9
      Fit to width
      2 people · first shared 2024
    10. 10
      Svg linked parameters workaround
      1 person · first shared 2026

    What HN people wrote when they linked it

    • eyelidlessnessJun 2023

      Weirdly enough, with the new scroll-driven animations spec (the spec’s terminology), you can do all sorts of position-based styling without any actual scrolling taking place[1]. Of course you can also use it for its intended purpose of actually detecting scroll position.

      But this also unlocks a lot of other style query problems, like the cursed wrap detection. For some cases, container queries should also be sufficient. And contrary to many of the other responses here, yes I think this flexibility is important progress. There are tons of fairly straightforward (even trivially specified) layout techniques that are currently next to impossible without some combination of hardcoding measurements and/or JS, which are going to become reasonably achievable in the next year or two. That’s fantastic. And for everyone who complains about this complexity at the styling level, it’ll eventually eliminate the need for a whole class of runtime JS doing a whole bunch of inefficient calculations badly.

      1: https://kizu.dev/position-driven-styles/

    • staminadeMay 2024

      The article I linked goes into the details, but basically a relative approach constrains your markup: The positioned thing must be a child of the relatively positioned anchor or a wrapper element, and you often cannot sensibly position it without using JS to check the location of the anchor. E.g. a popover menu for a button must check if the button is close to an edge of the viewport and position the menu element appropriately. Anchor positioning will do this automatically.

      Also, if support for multiple anchors is included, then it opens up some very interesting capabilities to do things like draw arbitrary diagram connectors between elements: https://kizu.dev/anchor-positioning-experiments/

    • kizmarhNov 2025

      Not by themselves, at least today, as we can't currently modify the value of a custom property by using itself in the calculation. But in the future we will have an `inherit()` functional notation that will unlock this (and at least Chrome implemented it in Canary already — https://blog.kizu.dev/play-with-inherit-function/).

      It is possible to use style queries and some hacks (https://kizu.dev/self-modifying-variables/) to achieve this today, but that doesn't bring this closer to production, as Firefox still does not support them (but will be soon).

    • swyxNov 2024

      i asked this on bluesky (https://bsky.app/profile/swyx.io/post/3lb2x53wuwc2y) and immiediately got this https://kizu.dev/fit-to-width/ which means theres no technical barrier now, we just need the powers that be to prioritize it

      anyone with influence on the CSSWG?

    • spiralganglionMay 2026

      Credit to Roman Komarov who came up with the approach [1], and Todd Matthews [2] who made the art assets.

      1: https://kizu.dev/svg-linked-parameters-workaround/
      2: https://www.seaofclouds.com

    • niutechNov 2024

      There is pure CSS solution: https://kizu.dev/fit-to-width/

    Related

    Bram.usbram.us47 people

    YAML: The Norway Problem (2022)

    Bram.us
    Personal · last shared 2026
    Bryce Wraybrycewray.com16 people

    Tailwind CSS v3.2: revisiting my “feature creep” warning

    Bryce Wray
    Personal · last shared 2026
    swyxswyx.io120 people

    AWS is playing chess, Cloudflare is playing Go

    swyx
    Personal · last shared 2026
    A List Apartalistapart.com667 people

    The future of web software is HTML over WebSockets

    A List Apart
    Publication · last shared 2026
    Lea Veroulea.verou.me121 people

    Today’s JavaScript, from an outsider’s perspective (2020)

    Lea Verou
    Personal · last shared 2026
    The CSS Ninjathecssninja.com19 people

    60fps scrolling using pointer-events: none

    The CSS Ninja
    Personal · last shared 2014
    Vanseo Designvanseodesign.com27 people

    What Designers Should Know About Visual Perception and Memory

    Vanseo Design
    Personal · last shared 2022
    CSS { In Real Life }css-irl.info22 people

    Aspect-ratio is great

    CSS { In Real Life }
    Personal · last shared 2024