Anchoreum: A game for learning CSS anchor positioning
12 comments
·February 11, 2025culi
If this accepts Firefox and Safari then it could be a great addition to "intro to web dev" tutorials
CSS Flex https://flexboxfroggy.com/
CSS Grid https://cssgridgarden.com/
CSS selectors https://flukeout.github.io/
uhoh-itsmaciek
Neat. The museum framing is cute, and well executed with the footsteps sound between levels.
On level 20, if I set `position-try-fallbacks: flip-inline;` and drag the anchor to the top, something weird happens: the label stays on top, but is also mirrored below the anchor, except with no text or background, just a border and a translucent frame. Latest Chrome (on Ubuntu, but I don't think that matters here). Is this a Chrome bug? A bug in Anchoreum? In dev tools, it looks like it's an Anchoreum issue, because there's a separate element in the DOM.
Edit: also happens on level 25 without changing anything if I drag the anchor to the left.
Edit 2: ah, I think that area is where you're _supposed to_ place the anchor. It's not very clear from the text.
chilmers
Pretty neat. But there doesn't seem to be any way to select or style the anchored element based on which fallback position it is in? This would seem to preclude adding a directional arrow to it, which is a somewhat baseline feature for things like tooltips.
JLCarveth
Great, yet another feature Firefox doesn't support... I really try to not use Chrome, but I run into this sort of issue a lot.
werdnapk
From https://caniuse.com/css-anchor-positioning you'll see "All major browser engines are working on implementing this spec.".
Not all browsers implement the same features at the same time. Firefox releases some features before Chrome, so it goes both ways.
lofaszvanitt
the chrome team just shovels all kinds of shit into their browser, that literally nobody uses. but it looks good in comparisons
vollbrecht
Seams not supported in firefox
uhoh-itsmaciek
And no answers, huh? I'm stuck on 38.
Edit: it doesn't mention that `anchor()` can accept an anchor name, which is kind of important for this.
I suppose fixing CSS itself to be predictable would be too hard? :)