WebDev Hot

cferdinandi, to webdev
@cferdinandi@mastodon.social avatar
sarajw,
@sarajw@front-end.social avatar

@cferdinandi look at you nailing Thumbnail Face

cferdinandi,
@cferdinandi@mastodon.social avatar

@sarajw It was an explicit ask from @SamStrong , so I'm legally obligated to do it now.

davidbisset, to webdev
@davidbisset@phpc.social avatar

"In Praise Of The Basics"

https://www.smashingmagazine.com/2024/05/in-praise-of-the-basics/

"Long live the basics! Long live the “a-ha!” moments that help us all fall in love with the World Wide Web."

cr0ybot, to CSS
@cr0ybot@mastodon.social avatar

We lost so much when dropping Sass for PostCSS.

CSS built-in nesting is awkward, static variables can be useful actually, and what's the point of dropping a consistent API with good DX if we're still transforming our stylesheets anyways?

Chaining together interoperable PostCSS modules to accomplish half of what Sass can do is nearly impossible.

baumannzone, to javascript Spanish
@baumannzone@techhub.social avatar
keithjgrant,
@keithjgrant@front-end.social avatar

@baumannzone This has to do with how floating point numbers are stored (essentially, they’re fractions, not decimals). This occurs in most programming languages, not just JS. Look up “floating point rounding error”

keithjgrant,
@keithjgrant@front-end.social avatar

@baumannzone Here's python doing the exact same thing

BryceWrayTX, to webdev
@BryceWrayTX@fosstodon.org avatar

After reading this, checked my existing styling as processed through autoprefixer, found the vendor prefixes that had been added, and manually added them to my styling — so it now doesn’t require any additional tools for cross-browser compatibility.

https://weser.io/blog/vendor-prefixes-in-2024

css, to CSS
@css@front-end.social avatar

Using modern CSS features to create a custom range slider with a tooltip. There is no JS to update the values, it's pure CSS with minimal HTML 😎

Powered by Scroll Driven animation, Anchor positioning, @​property and more! 🤩

Demo: https://codepen.io/t_afif/full/JjqNEbZ via :codepen: @codepen

Online Version: https://css-tip.com/range-slider-tooltip/

It's Chrome only for the tooltip but the range slider works fine in all the browsers.

Showing two range slider with a tooltip containing the selected values. From the linked demo.

css,
@css@front-end.social avatar

@simevidas it's a demo to illustrate the input, you can easily add any text inside the label as a label. It's irrelevant to the demo so I didn't do it.

simevidas, (edited )
@simevidas@mastodon.social avatar

@css Not having a label is not the problem. The problem is using a <label> element without including a label. That’s confusing. The purpose of the <label> element is to include a label. There is no other reason why this element exists, so if you don’t have a label in the demo, don’t use <label>. Just remove it. Use a <span> if you need a wrapper element.

bitsgalore, to webdev
@bitsgalore@digipres.club avatar

Latest version of standard includes a warning that advises against using the syntax (formerly known as ), stating that it's "essentially unmaintained"🧐 :

https://html.spec.whatwg.org/multipage/xhtml.html

Looks like a recent change, as there's no mention of this in the April 3 version of the spec:

https://web.archive.org/web/20240403210532/https://html.spec.whatwg.org/multipage/xhtml.html

Unless I'm misreading it, this seems like a big deal? E.g. XML syntax is mandatory in 3 documents:

https://www.w3.org/TR/epub-33/#dfn-xhtml-content-document

Time to 📯?

ricochetcode, to webassembly
@ricochetcode@hachyderm.io avatar

Andreas Rossberg kicking off Wasm Research Day right. We've basically had no spec bugs because Wasm from the very get-go was designed to be formally verified e2e.

Richr, to webdev
@Richr@mastodon.social avatar

✏️ A modern approach to browser support - writing a new browser support policy @Clearleft

https://clagnut.com/blog/2431

aardrian,
@aardrian@toot.cafe avatar

@Richr @Clearleft

Thrilled to see this talks about outcomes for users (versus arbitrary release cycles that are not reflected in the wild).

Also thrilled to see your first principle is accessibility.

But one big caution about Baseline — it does not track accessibility feature support: https://adrianroselli.com/2023/12/baseline-does-not-really-cover-baseline-support.html

Which means you will have to go beyond what Baseline covers. I link some in the post and in the follow-up GitHub conversation (https://github.com/web-platform-dx/web-features/issues/498).

matthias_ring, to webdev
@matthias_ring@mastodon.social avatar

Is there a clickable, 2-level, responsive with minimal javascript, simple design, header and only, separate, free to use, up to date, modern browser.

Features I'm looking for:

  • full keyboard / screen reader support
  • no javascript dependencies
  • functional without javascript
aardrian,
@aardrian@toot.cafe avatar

@matthias_ring You want disclosure widgets. They are simple constructs that require JavaScript. What you want to do can be done with CSS, but then you have potential WCAG violations. Refs:
https://adrianroselli.com/2019/06/link-disclosure-widget-navigation.html
https://adrianroselli.com/2020/05/disclosure-widgets.html
https://adrianroselli.com/2023/03/css-only-widgets-are-inaccessible.html

daniel_js_craft, to webdev
@daniel_js_craft@mastodon.social avatar

Weekend discovery. An intermediate step in the RAG process is document chunking. Determining the appropriate chunk size can become a trial & error game. James Briggs does a great job of explaining how to use Semantic Chunking to get better results.

https://www.youtube.com/watch?v=TcRRfcbsApw

nucliweb, to javascript
@nucliweb@webperf.social avatar

Comprehensive guide to JavaScript performance analysis using Chrome DevTools

https://blog.jiayihu.net/comprenhensive-guide-chrome-performance/

cory, to webdev
@cory@social.lol avatar

🔗: The Gap via Ahmad Shadeed https://ishadeed.com/article/the-gap/

starbreaker,
@starbreaker@social.lol avatar

@cory I've already been using this when tinkering with Flexbox and Grid. Unfortunately, we've still got to use margin when not using Flexbox and Grid.

cory,
@cory@social.lol avatar

@starbreaker haha yeah, I’d love to use it everywhere. At least we're free of floats and things are — ever so slowly — improving.

ricmac, to javascript
@ricmac@mastodon.social avatar

This was the top performing post on @TheNewStack last week, so it seems there is a tremendous amount of interest in a post-React future among web developers. Maybe my Gmail analogy wasn’t far off after all ;) https://thenewstack.io/from-react-to-html-first-microsoft-edge-debuts-webui-2-0/ https://mastodon.social/@ricmac/112531029962000384

phryk, to CSS
@phryk@mastodon.social avatar
  • { box-sizing: border-box; }

Probably my most prejudiced hack. Judge if you want, but this one line saves me from an insane amount of alignment issues and overly complicated calc()s.

bingocaller,
@bingocaller@mastodon.social avatar

@phryk I don’t think this is particularly controversial? Paul Irish has been recommending it since *checks notes* 2012!? Damn, now I feel old. 👴

https://www.paulirish.com/2012/box-sizing-border-box-ftw/

phryk,
@phryk@mastodon.social avatar

@bingocaller I've been using it since essentially forever, too.

This is interesting because I've never seen anyone mention it in conversation around CSS… at the very least I'm glad I'm not the only one thinking that this makes things behave way more sensibly.

johann, to webdev French
@johann@masto.bike avatar

Je n'arrive pas a imprimer une page HTML qui contient une (longue) table dans un document Google Sheet "read only" (sans menu)

Dans Firefox, File > Print as PDF, ça n'imprime que la partie qui est visible dans le navigateur.

Quelqu'un-e a une solution ?

johann,
@johann@masto.bike avatar

@sknob Ouh c'est élégant :)

Il y a @joe qui a utilisé un plugin de FireFox :
https://seine.fleuv.es/@joe/112553663447562954

Vous êtes supers, MERCI 🖤

sknob,
@sknob@mamot.fr avatar
schizanon, to webdev
@schizanon@mastodon.social avatar

> Three.js introduces its own 'TSL' shader language as a way to write WebGPU shaders with JavaScript rather than the WebGPU Shading Language.

https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language

cferdinandi, to webdev
@cferdinandi@mastodon.social avatar

🐝🎧 New ADHD ftw! Podcast:
Episode 14 - How to avoid excessive meetings https://adhdftw.com/podcast/how-to-avoid-excessive-meetings/

antaresphdev, to webdev Tagalog
@antaresphdev@mas.to avatar

Nagbibigay ang Web Platform Baseline ng malinaw na info tungkol sa mga bagong web platform features na puwede nang magamit sa mga production sites.

Tingnan ang details nito sa website ng Antares Programming: https://antaresph.dev/resources/baseline/

kerfuffle, to webdev
@kerfuffle@mastodon.online avatar

I'm only just finding my way in the land of , but it feels like "trigger a request from any element" is a trap. I want progressive enhancement, which still requires a functional non-Javascript page before adding the nice things htmx offers. I didn't realise how rusty I am with regard to designing a presentation layer for all this in the backend.

_chrismay,
@_chrismay@fosstodon.org avatar

@kerfuffle I think you're right on. That's how I craft my htmx apps.

Some people use hx-boost (https://htmx.org/docs/#progressive_enhancement) to do progressive enhancement.

I haven't tried it yet, but I thought you might want to look into it.

kerfuffle,
@kerfuffle@mastodon.online avatar

@_chrismay
Yeah I've been looking at that. Reading the HX-Request header to determine whether to give a full-page response or just a snippet is what I do, and it quickly made it clear that navigating my site structure needs more up-front attention. Which is pretty much in line with I think.

peterreeves, to CSS
@peterreeves@mstdn.social avatar

I don't understand why CSS is so verbose sometimes. Why couldn't I just do:
color: --brand-red;
???
Why do I need to surround every use of it with var(...)? Wasn't the double-dash prefix was specifically chosen to not clash with any existing or future properties?

It's always so frustrating writing CSS. Especially compared to all the structure, abstractions, and terseness that programming languages offer.

keithjgrant,
@keithjgrant@front-end.social avatar

@css @peterreeves Exactly. A key consideration for every new CSS syntax is the performance involved in parsing and tokenizing the language.

It’s not simply about “is ‘left: 3 * 10px’ unambiguous?” It’s about “Can the parser know what token the ‘3’ is before it reads the ‘*’ or the ‘10px’. And without calc(), no, it cannot.

An ambiguous syntax leads to lookbacks, which absolutely destroys parser performance

keithjgrant,
@keithjgrant@front-end.social avatar

@css @peterreeves I guarantee the w3c tried to find a way to do this without var(). If you really want to dive through old GitHub issues, it’s probably there (though this one might date back to the older mailing list).

I recall seeing discussion about using $ like Sass, but then deciding that would conflict with existing Sass code, so eventually they settled on the current approach.

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar

fetch-in-chunks: fetching large files in chunks, with parallel downloads, progress tracking and request abortion
@tomayac
https://github.com/tomayac/fetch-in-chunks/

stefan, to webdev
@stefan@stefanbohacek.online avatar

Finally had a proper look at @eleventy.

I really like that it can be as simple or as complex as you want it to be.

I'm not quite sold on it for hosting blogs (yet), but I've migrated a few of my smaller projects for which I've used a simple node app (mainly to take advantage of templating).

Huge improvement in memory consumption! For example, https://simplepagebuilder.app went from 67.89MB down to just 6.07MB.

Nice!

#webdev #11ty #eleventy

pch,
@pch@s3th.me avatar

@stefan @eleventy Wow that's pretty cool. Hard to design something really pretty though. Might just be me! LOL

stefan,
@stefan@stefanbohacek.online avatar

@pch @eleventy Hah, not a designer myself, I just used Bootstrap here and a theme from https://www.happyhues.co.

But this really shows how flexible 11ty is, you can really throw anything on it.

Jbasoo, to CSS
@Jbasoo@mastodon.social avatar

I was kinda hoping calc-size() could resolve intrinsic sizes inside math functions but it doesn't seem to (at least in Chrome Canary). Not sure if that's a bug or if Friday afternoon isn't the best time to try to understand draft specs 🤯

I don't think it would be a common use case, but it would be handy to be able to use it to solve things like this https://mastodon.social/@Jbasoo/110593686096922129

noleli,
@noleli@mastodon.social avatar

@Jbasoo ooh! I hadn’t heard of calc-size(). Definitely relevant to some stuff I’m thinking about https://mastodon.social/@noleli/112535843863937418

kizu,
@kizu@front-end.social avatar

@Jbasoo It is possible! https://codepen.io/kizu/pen/vYwxyez

calc-size(max-content, round(up, size, var(--grid-size)))

The way it works: in the first argument is the intrinsic value you want to use, and in the second is the calculation that you intend to do with it, where a special size keyword becomes available as the “variable”.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines