Stephen Margheim's Avatar

Stephen Margheim

@fractaledmind.bsky.social

1,343 Followers  |  190 Following  |  432 Posts  |  Joined: 23.04.2024  |  2.2728

Latest posts by fractaledmind.bsky.social on Bluesky

PS. If you want to learn how to make beautiful <textarea>s like in the GIF with nothing but standard HTML and CSS, I'll be sharing those tips in the future as well. So be sure to follow ๐Ÿ™

07.12.2025 17:00 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Full CSS snippet:
```
textarea {
field-sizing: content;
min-block-size: attr(rows rlh);
}
```

07.12.2025 17:00 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
attr() - CSS | MDN The attr() CSS function is used to retrieve the value of an attribute of the selected element and use it in a property value, similar to how the var() function substitutes a custom property value. It can also be used with pseudo-elements, in which case the attribute's value on the pseudo-element's originating element is returned.

`field-sizing` docs: developer.mozilla.org/en-US/docs/...

`attr()` function docs: developer.mozilla.org/en-US/docs/...

07.12.2025 17:00 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

The `min-block-size` rule uses the new, more powerful `attr()` CSS function to automatically convert the rows attribute into the default height, because content field-sizing <textarea>s will *ignore* the rows attribute.

07.12.2025 17:00 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Video thumbnail

Coming in the next version of Safari, and already in Chrome and Edge, you can now create <textarea>s that auto-grow with the `field-sizing: content` rule.

#StylishHTML

07.12.2025 17:00 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

PS. If you want to learn how to make beautiful listboxes like in the GIF with nothing but standard HTML and CSS, I'll be sharing those tips in the future as well. So be sure to follow ๐Ÿ™

06.12.2025 16:57 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Learn more at MDN: developer.mozilla.org/en-US/docs/...

Full CSS snippet:
```
::picker(select) {
scrollbar-color: lightgray transparent;
scrollbar-width: thin;
}
```

06.12.2025 16:57 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Video thumbnail

Have a small scroll container where you want to de-emphasize the scrollbar, like in a popover? Say hello to `scrollbar-color` and `scrollbar-width`

#StylishHTML

06.12.2025 16:57 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

PS. If you want to learn how to make beautiful popovers like in the GIF with nothing but standard HTML and CSS, I'll be sharing those tips in the future as well. So be sure to follow ๐Ÿ™

05.12.2025 16:57 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Dark-themed code snippet showing two HTML lines: a button with popovertarget="--dropdown-example" and a div id="--dropdown-example" popover.

Dark-themed code snippet showing two HTML lines: a button with popovertarget="--dropdown-example" and a div id="--dropdown-example" popover.

Requires double-dashed IDs in your HTML:
```
<button popovertarget="--dropdown-example"></button>
<div id="--dropdown-example" popover></div>
```

05.12.2025 16:57 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Dark-themed code editor showing a CSS snippet defining [popovertarget] and [popover] rules with anchor-name, position-anchor, top: anchor(bottom), and left: anchor(left).

Dark-themed code editor showing a CSS snippet defining [popovertarget] and [popover] rules with anchor-name, position-anchor, top: anchor(bottom), and left: anchor(left).

Full CSS snippet:
```
[popovertarget] {
anchor-name: attr(popovertarget type(<custom-ident>));
}

[popover] {
position-anchor: attr(id type(<custom-ident>));

top: anchor(bottom);
left: anchor(left);
}
```

05.12.2025 16:57 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Video thumbnail

Double-dashed IDs and the enhanced `attr()` CSS function allow us to bind popovertargets with their popovers without having to create distinct anchor-names.

Learn more at MDN: developer.mozilla.org/en-US/docs/... and developer.mozilla.org/en-US/docs/...

#StylishHTML

05.12.2025 16:57 โ€” ๐Ÿ‘ 6    ๐Ÿ” 3    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

PS. If you want to learn how to make beautiful <dialog>s like in the GIF with nothing but standard HTML and CSS, I'll be sharing those tips in the future as well. So be sure to follow ๐Ÿ™

04.12.2025 17:03 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Dark code editor showing a CSS rule: body:has(dialog:modal) { overflow: hidden; } with syntax-highlighted selectors and properties.

Dark code editor showing a CSS rule: body:has(dialog:modal) { overflow: hidden; } with syntax-highlighted selectors and properties.

Full CSS snippet:
```
body:has(dialog:modal) {
overflow: hidden;
}
```

04.12.2025 17:03 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Video thumbnail

Prevent scrolling when a modal <dialog> is open with pure CSS using the `:modal` CSS pseudo-class. Mix with `body:has` and you're good to go!

Learn more at MDN: developer.mozilla.org/en-US/docs/...

#StylishHTML

04.12.2025 17:03 โ€” ๐Ÿ‘ 7    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

PS. If you want to learn how to make beautiful breadcrumb <nav>s like in the GIF with nothing but standard HTML and CSS, I'll be sharing those tips in the future as well. So be sure to follow ๐Ÿ™

03.12.2025 17:39 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Dark code editor showing CSS: body selector with scrollbar-gutter: stable and a nested &:has(:popover-open) rule setting overflow: hidden.

Dark code editor showing CSS: body selector with scrollbar-gutter: stable and a nested &:has(:popover-open) rule setting overflow: hidden.

Full CSS snippet:
```
body {
scrollbar-gutter: stable;

&:has(:popover-open) {
overflow: hidden;
}
}
```

03.12.2025 17:03 โ€” ๐Ÿ‘ 5    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Video thumbnail

With `scrollbar-gutter: stable` in place, you get this lovely behavior instead.

03.12.2025 17:03 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Video thumbnail

Want to avoid layout shift when you remove scrolling on popover or dialog opening?

Simple, use the new `scrollbar-gutter: stable` CSS rule on your scroll container (likely <body>).

Learn more at MDN: developer.mozilla.org/en-US/docs/...

#StylishHTML

03.12.2025 17:03 โ€” ๐Ÿ‘ 4    ๐Ÿ” 2    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Video thumbnail

I love @rauno.bsky.social's style and taste, so I remixed a recent combobox design of his as a simple <select> using the new customizable select styling features coming to Baseline:

play.tailwindcss.com/9JsjWJyk9a

30.11.2025 12:11 โ€” ๐Ÿ‘ 6    ๐Ÿ” 2    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 1

PS. Creating the effect of the picker wrapping and surrounding the select took some creative problem-solving, but Iโ€™m quite happy with the result. Key limitation is that you canโ€™t animate the picker beautifully with this approach.

30.11.2025 12:17 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Video thumbnail

I love @rauno.bsky.social's style and taste, so I remixed a recent combobox design of his as a simple <select> using the new customizable select styling features coming to Baseline:

play.tailwindcss.com/9JsjWJyk9a

30.11.2025 12:11 โ€” ๐Ÿ‘ 6    ๐Ÿ” 2    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 1
Preview
GitHub - yippee-fun/morphlex: Optimal DOM morphing, written in TypeScript. Optimal DOM morphing, written in TypeScript. Contribute to yippee-fun/morphlex development by creating an account on GitHub.

Morphlex now has a new algorithm that produces extremely optimal DOM morphs for inserts, removals and sorts. github.com/yippee-fun/m...

01.11.2025 11:34 โ€” ๐Ÿ‘ 16    ๐Ÿ” 2    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

This is what I have seen typically as the primary value. Seems less valuable in the age of AI. Also, requires nearly 100% adoption of typing throughout the code base to have the full graph. I still find runtime typing a stronger value proposition, especially for a dynamic language like Ruby

31.10.2025 22:03 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Genuine question: what is the essential benefit of static type checking? I understand the core benefit of runtime type checkingโ€”to guarantee that certain states, inputs, outputs are never allowed to flow thru the program. But Iโ€™ve never quite grokked what makes static type checking valuable

31.10.2025 15:02 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 3    ๐Ÿ“Œ 0
Empirical Demo
YouTube video by Joel Drapper Empirical Demo

Nick, you need to check out www.youtube.com/watch?v=G9rx... which is a demo of what we are building with github.com/yippee-fun/e...

29.10.2025 17:11 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Deep magics. But built on top of `require-hooks` gem.

26.10.2025 15:41 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
GitHub - yippee-fun/empirical Contribute to yippee-fun/empirical development by creating an account on GitHub.

And we continue writing that love letter with the new Empirical gem, which leverages the power of pre-processing Ruby at boot time to bring a terse and elegant DX for defining methods with runtime typing constraints.

github.com/yippee-fun/...

24.10.2025 16:41 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
GitHub - yippee-fun/literal: A literal Ruby gem. ๐Ÿ’Ž A literal Ruby gem. ๐Ÿ’Ž. Contribute to yippee-fun/literal development by creating an account on GitHub.

Once you then embrace that you can create your own objects that respond to === and encode custom rules of โ€œset inclusionโ€, you have everything you need to a rich and robust runtime type system. The Literal gem is @joel.drapper.me and Iโ€™s love letter to ===

github.com/yippee-fun/...

24.10.2025 16:41 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Level-up `rescue` with dynamic exception matchers When you use a rescue clause in Ruby, you can specify what kinds of exceptions you want to rescue. But what if you want to rescue exceptions by severity? By message? B...

This post from @honeybadger.io is about runtime types, it just doesnโ€™t know it! It does a good job of demonstrating the simplicity and power of Rubyโ€™s === interface, and a runtime type is simply โ€œan object that responds to ===.โ€

www.honeybadger.io/blog/level-...

24.10.2025 16:41 โ€” ๐Ÿ‘ 4    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

@fractaledmind is following 19 prominent accounts