Sorry if I’m late to the party, but it occurred to me that cascade layers can be used to show the most important CSS at the top.
Like a button with variants. I want the variants up top and not the base. Without cascade layers this requires smartness™.
Nice.
Posts by Jacob Berglund
It makes some assumptions: It posts on blur with a custom header (X-Enhance-Validate). You gotta for that header that, do the validation and not doTheThings(). Make sure you return the same form with a 422 status code. And that's pretty much it. Hey-o!
Made a web component to progressively enhance good ol' SSR forms. Introducing <enhance-form>! You wrap a form with it and you'll get inline form validation with minimal effort.
Heavily inspired by Unpoly 😍
Just reading the description and I'm like "omg yes plez and thank you!". I'm deep in progressive enhancement territory at this point and I do not want to go full shadow DOM. Something like this would slot right in, assuming my interpretation of the description is correct 😅
Laughed out loud on the bus thanks to this! Much appreciated 😂
I’m done with Spotify. It just doesn’t feel like the app I used to love.
i built an entire x86 CPU emulator in CSS (no javascript)
you can write programs in C, compile them to x86 machine code with GCC, and run them inside CSS
lyra.horse/x86css/
130 files changed, 125 insertions(+), 8115 deletions(-)
Today was a gooood day. 🪓
Shoutout to knip.dev!
Just shipped bsky-comments!
Embed Bluesky threads anywhere with a zero-dependency Web Component.
• Framework Agnostic (Native WC)
• < 3kb gzipped
• Zero Config: Just paste the Post URL
• Light DOM: Fully customizable (CSS/Tailwind)
github.com/florianschep...
#webdev #opensource #buildinpublic
If you just want a variable from CSS to JS, have a look at github.com/bramus/style...
But I suppose the component I made could emit an event with the name, value and unit. 😁
Like, you update a variable and the input changes?
Made a customizable-face-looking-at-the-cursor thing.
Try it out: varianter.github.io/fjes/
Feedback is welcomed 😊
Ha! It never struck me that an input without a name doesn’t get serialized in a form. Makes sense now though 😂
Imma yoink that.
I feel like this is WKs fault for not allowing us to extend elements. Kind of have to implement the basics all over.
Hat off though. It is humbling to get a glimpse of how much effort goes into these things. 🙏
Oh my, this is nicely documented. The remark answered my question 😅
github.com/microsoft/fl...
Oh, that is interesting. Does it stay out of forms when slotted?
Probably works crappy on mobile devices.
It is an attempt at making a pattern which isn’t necessarily a combobox, but could be used as such. The pattern being the point.
If you have any feedback or point me to where I could read up on the things you mentioned, I’d really appreciate it 🙏
Yarr! I was thinking about this the other day and experimented a bit using the text input inside shadow dom and requiring ARIAs in the light DOM for correctness.
codepen.io/jacobberglun...
The excitement is knowing there is an non-zero chance of death or other injuries.
And upon reading the obituary: ”yep, that’ll do it”
Woo! 🕺 I was just thinking of this and how to solve it using just popovers+checkbox/radios, but a native way? Sign me up!
Just built this to do ish that codepen.io/jacobberglun...
I'll update Chrome and have a look to see how keyboard nav is handled. 🥳
What is a combobox if not a popover, a text input to filter checkboxes/radios? Move the input, add in some arrow navigation and a programmatic click() and you got yourself a A+ LightDOM web component.
The progressive enhancement is that it’s just a popover with some radios/checkboxes.
Ah, thanks, didn’t know. 💡
Where do the rejected proposals go? Do they keep returning year after year, per community initiative?
For most, the LightDOM way should be enough, right? Like, we can still compose HTML on a server and call it a button.
I’ve gone as far as to put an inert <swap-to-spinner> wc inside a <button>. Mainly because making a <custom-button> seems… well, non-trivial.
Secret vetoes? 🥸
gushing over the maintainability and simplicity of @jim-nielsen.com’s menu as a whole dang separate-standalone-HTML-page: blog.jim-nielsen.com/2025/lots-of...
(via @dbushell.com)
Oooh, nice. I’d even italicize that nice were it possible. That nice.
I’m all for this simplicity. Like, a form with a method=get and some view transitions goes a long way as well. Basically free niceness.
over a year ago, i gave a talk at the xoxo conference about a mural, a mcdonald’s, and a man. (but it was also secretly about life, and legacy, and meaning.)
finally, i’m blogging the full story, with behind-the-scenes details, and a video of the talk.
enjoy. cabel.com/wes-cook-and...