apply filter to new-tab makes the page has unwanted horizontal scroll (lemmy.world)
hi,...
cferdinandi, to webdev 📺 New Video: How to build your first Web Component https://www.youtube.com/watch?v=4ZCJDf5gjLA #WebDev #FrontEndDeveloper #100DaysOfCode #CodeNewbie
davidbisset, to webdev "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." #webdev #oldschool #html #css
cr0ybot, to CSS 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 #JavaScript WTF
keithjgrant, @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, @baumannzone Here's python doing the exact same thing
BryceWrayTX, to webdev 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.
css, to CSS 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, @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 ) @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 Latest version of #HTML standard includes a warning that advises against using the #XML syntax (formerly known as #XHTML), 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 #EPUB 3 documents:
https://www.w3.org/TR/epub-33/#dfn-xhtml-content-document
Time to #wheelOutTheDigitalDarkAgeKlaxon 📯?
ricochetcode, to webassembly 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. #Wasm #WasmResearchDay
Richr, to webdev ✏️ A modern approach to browser support - writing a new browser support policy @Clearleft
aardrian, 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 Is there a clickable, 2-level, responsive #hamburger #menu with minimal javascript, simple design, header and #navigation only, separate, free to use, #webdev up to date, modern browser.
Features I'm looking for:
- full #a11y keyboard / screen reader support
- no javascript dependencies
- functional without javascript
aardrian, @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 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.
nucliweb, to javascript Comprehensive guide to JavaScript performance analysis using Chrome DevTools
https://blog.jiayihu.net/comprenhensive-guide-chrome-performance/
cory, to webdev 🔗: The Gap via Ahmad Shadeed #Webdev #CSS https://ishadeed.com/article/the-gap/
starbreaker, @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, @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 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/ #WebDevelopment #javascript #htmlfirst https://mastodon.social/@ricmac/112531029962000384
phryk, to CSS
- { box-sizing: border-box; }
Probably my most prejudiced #CSS hack. Judge if you want, but this one line saves me from an insane amount of alignment issues and overly complicated calc()s.
bingocaller, @phryk I don’t think this is particularly controversial? Paul Irish has been recommending it since *checks notes* 2012!? Damn, now I feel old. 👴
phryk, @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, French @sknob Ouh c'est élégant :)
Il y a @joe qui a utilisé un plugin de FireFox :
https://seine.fleuv.es/@joe/112553663447562954Vous êtes supers, MERCI 🖤
sknob, French
schizanon, to webdev > 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
#webDev #javaScript #threejs #webgl #shader #glsl #web #game #development #graphics #programming #tsl #webgpu #webgpusl #shadingLanguage #gamedev
cferdinandi, to webdev 🐝🎧 New ADHD ftw! Podcast:
Episode 14 - How to avoid excessive meetings https://adhdftw.com/podcast/how-to-avoid-excessive-meetings/ #WebDev #ADHD #AuDHD #neurodivergent
antaresphdev, to webdev Tagalog 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/ #webdevelopment #html #css #javascript
kerfuffle, to webdev I'm only just finding my way in the land of #htmx, but it feels like "trigger a request from any #HTML 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, @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, @_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 #HATEOAS I think.
peterreeves, to CSS 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 withvar(...)
? 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, @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, @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 fetch-in-chunks: fetching large files in chunks, with parallel downloads, progress tracking and request abortion
@tomayac
https://github.com/tomayac/fetch-in-chunks/
hi,...
stefan, to webdev 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!
pch,
stefan, @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 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 #CSS 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, @Jbasoo ooh! I hadn’t heard of
calc-size()
. Definitely relevant to some stuff I’m thinking about https://mastodon.social/@noleli/112535843863937418
kizu, @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”.