78 Tweets about
html first
Show Topics

Who is building an web app or website that is going back to basics? No meta JS frameworks, just HTML over the wire.

Saved to html first
Today

Today I relearned about the `will-change` CSS property. It helped me go from dozens of dropped frames to nearly zero! It even helps with pure-CSS animations, like this one: pic.x.com/EiNoft2YE6

crutchcorn tweet image
Saved to html first
Today

This wonderful write-up from @bramus is a great summary of the state-of-the-art when it comes to animating `height: auto` (and other keywords) in CSS. I had never heard of `interpolate-size`! Very cool πŸ’― developer.chrome.com/docs/css-ui/an…

Saved to html first
Today

Discovered a super easy way to build circular progress bars with SVG that scale to any size! πŸ˜€ The pathLength attribute lets you normalize the length of a circle to 100. Then stroke-dasharray and stroke-dashoffset can be defined using percentages to create the progress bar. pic.x.com/nd9vwqsb3d

devongovett tweet image
Saved to html first
Today

And you could do the whole thing without JavaScript πŸ€™ β€’ Use the HTML [popover] API (nested) β€’ CSS starting-style to transition open/close ⭐️ β€’ Anchor positioning βš“οΈ <button popovertarget="menu"></button> <div popover="auto" id="menu"></div> pic.x.com/qzwniy6onf x.com/raunofreiberg/…

Saved to html first
Today

Switching word combos on scroll with CSS πŸ–±οΈ main { animation: switch both steps(3); animation-timeline: view(); } @​keyframes switch { to { --i: 3; }} .words__track { translate: 0 calc(var(--i) * -100%); } Result of a DM request πŸ‘‡ pic.x.com/q77bl0c2sg

Saved to html first
about 6 hours ago

Quick CSS tip: if you want to select the nth element with a certain class, `:nth-child` supports an `of` syntax. πŸ‘ pic.x.com/vms3srdx0d

stefanjudis tweet image
Saved to html first
Today

TIL any <button> inside a form that's not a submit button you have to add <button type="button"> otherwise it's always a submit button by default x.com/i/web/status/1…

Saved to html first
Today

Another beautiful customized select with a usable fallback πŸ§‘β€πŸ³πŸ˜˜ This API is awesome 😊 Makes my heart full to see this finally moving along in the WHATWG and browser prototypes ❀️ pic.x.com/yseagerw1t

Una tweet image
Saved to html first
Today

CSS challenge: I’ve been working for a solution for leaders via SVG backgrounds with lines + stroke-dasharray: codepen.io/leaverou/pen/b… It *almost* works great except: 1. Is f*cked for long items (see 4 + source comments) 2. Needs a way to adjust the gap so that it always starts… x.com/i/web/status/1…

Saved to html first
about 2 hours ago

If you accept money anywhere online, you might be missing out if these attributes aren't in order pic.twitter.com/EAQ0ObJK5g

Saved to html first
Today

A carousel component in 20 lines of modern CSS. 😱 pic.twitter.com/EyeA5bnAVZ

lazaronixon tweet image
Saved to html first
Today

Pretty impressive that you can do it without JavaScript with this new CSS API heres a quick tutorial on how to code the iPad video scroller mask effect yourself pic.twitter.com/noFimkzqtm x.com/wesbos/status/…

Saved to html first
Today

Is preparing buttons for proper styling a chore or do you already know `all: unset;` ? pic.twitter.com/GrEChdPzql

Saved to html first
Today

A short thread of "TIL: You can..." featuring underrated but powerful HTML/CSS tips. 🧡 πŸ’‘1/5: HTML buttons can submit forms without being inside them! Use the form attribute to link a button to a form by ID. Great for flexible layouts and improved UX! x.com/i/web/status/1… pic.twitter.com/B87URFECie

baptadn tweet image
Saved to html first
Today

πŸ’‘ TIL: You can set an accent color in CSS and it magically updates across your HTML user-interface controls! Just one line: accent-color: #55efc4 and your whole app gets a color refresh! pic.twitter.com/sFHY23nPd2

baptadn tweet image
Saved to html first
Today

Container queries are cross-browser supported now for over a year. If you're still worried about not supporting browsers, you could adopt a fallback solution via custom elements. πŸ«£πŸ‘‡ web.dev/blog/how-to-us… pic.twitter.com/aCMJho9rzl

stefanjudis tweet image
Saved to html first
Today

πŸ”₯ It feels like magic, but the <details> element will automatically expand when a search result is hidden within. It’s so hard to get this stuff right with <div>s and JS. The platform is awesome. πŸ˜„ pic.twitter.com/RZCN8hGAF0

Saved to html first
Today

The subtle differences when creating a squircle 🧐 Use a generated CSS clip-path to get a finer shape πŸ€™ .squircle { clip-path: polygon( 100.00% 50.00%, 99.95% 62.53%, 99.80% 67.70%, ... ); } Went down the rabbit hole πŸ‡ pic.twitter.com/OoSBRjJAcI x.com/jh3yy/status/1…

Saved to html first
Today

Once again I’m in the same #webcomponents crossroads I’ve been many times before. My component (an editable <color-swatch> if you need to know) has an <input>. Ideally the input should be styled like other inputs on the page and be able to participate in form submission.… x.com/i/web/status/1…

limitations of web components

Read More
Hide
Saved to html first
Today

Use CSS relative color syntax to darken/lighten colors for borders, backgrounds, etc. πŸ”₯ .success { --c: green; } aside { background: oklch(from var(--c) calc(l * 0.75) c h / 0.5); color: oklch(from var(--c) calc(l * 1.5) c h); } Magic! ✨ pic.twitter.com/uKC6wTkrUo x.com/JohnPhamous/st…

Saved to html first
Today

This has been my go-to monochrome palette for some time πŸ’― Has some great contrast between light/dark mode Bookmark for later πŸ€™ pic.twitter.com/ec1lWytvwh x.com/rehanxahmed/st…

KumailNanji tweet image

Here's a quick Friday or weekend mini-project for you: why don't you spend a few mins to add Speculation Rules to your blog (or site) to quick speed it up? Simply adding this script tag to your pages will allow intra-site links to prerender as soon as you hover on them. 🧡 1/6 pic.twitter.com/FT8yAINByr

tunetheweb tweet image
Saved to html first
Today

If you want to apply the global styles of the document to a shadowRoot, you can do it with this pic.twitter.com/dUSxmAyCQB

aralroca tweet image
Saved to html first
Today

anchor-tool.com, now with a visualizer for the inset-modified containing block! pic.twitter.com/aqlMSHEn0b

Saved to html first
Today

With a bit of CSS, you can build a simple color picker out of a collection of radio buttons. No JS needed. Most of the time, our projects don't need a full-fledged color picker where users can craft any possible color. pic.twitter.com/FaINkg8gs5

fractaledmind tweet image
Saved to html first
Today

I was fiddling around with css scroll animations a bit, but didn't know where to start... these are great examples to get started! ❀️ pic.twitter.com/ETmBqt27s1

Saved to html first
about 5 hours ago