@chris22smith@mastodon.social
@chris22smith@mastodon.social avatar

chris22smith

@chris22smith@mastodon.social

Senior front-end web developer and team lead.
Making the web easy to use, accessible and fast since 1999.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

murtaugh, to random
@murtaugh@mastodon.social avatar

I will never call it X and yet people will still know what I'm talking about.

chris22smith,
@chris22smith@mastodon.social avatar

@murtaugh What's X?

chris22smith, to webdev
@chris22smith@mastodon.social avatar

I've always been very much in favour of UX and a11y over DX but, if you don't provide good DX, developers can produce some truly horrible UX and a11y. Can't win.

chris22smith,
@chris22smith@mastodon.social avatar

@cferdinandi @ben I'm finding that it's easier to use component libraries/frameworks with decent a11y so we screw it up less. But then we're back to sending a MB of JavaScript down the pipe before the user even sees anything. It's tough.

chris22smith, to webdev
@chris22smith@mastodon.social avatar

If you type Hello World into Word and save it as HTML, you get the text Hello World and about 1,000 lines of, well, shite.

jaffathecake, to random
@jaffathecake@mastodon.social avatar

I get it. I get the whole point of it. But CSS logical properties are so confusing. Even after reading the first two paragraphs of https://developer.mozilla.org/en-US/docs/Web/CSS/block-size I'm left thinking ENOUGH WITH THE FUCKIN RIDDLES.

Ok, so if display: block makes the thing full width, block-size will change the width.

lol no guess again!

chris22smith,
@chris22smith@mastodon.social avatar

@jaffathecake I forced myself to use logical properties and it does stick pretty quickly. It's then hard to go back and not fanatically update everything you see.

chris22smith, to UX
@chris22smith@mastodon.social avatar

New post: Please stop using flags to represent languages

https://chrissmith.xyz/blog/2024/please-stop-using-flags-to-represent-languages/

As someone with a background in languages and, more simply, as someone with some common sense, this has been a pet hate of mine since I first saw it in the late 90s.

brianklaas, to random
@brianklaas@journa.host avatar

I just passed my “Life in the UK” test, paving the way for UK citizenship, in which I was asked about Jesus and one question was factually wrong…so it prompted me to write about the test and my observations of actual life in the UK after 12 years here. https://www.forkingpaths.co/p/my-life-in-the-uk-test-and-a-great

chris22smith,
@chris22smith@mastodon.social avatar

@brianklaas This test makes me feel ashamed to be British. No Brit could pass it without specific revision, so what's it actually testing?

joelanman, to random
@joelanman@hachyderm.io avatar

Reddit is a great case study in poor performance of a web UI

chris22smith,
@chris22smith@mastodon.social avatar

@joelanman Reddit is talked about like something that all devs know and use. I've never bothered with it.

murtaugh, to random
@murtaugh@mastodon.social avatar

I listened to that new Rolling Stones track and I hope it doesn't hurt you when I say I can't recall a more boring rock and roll song.

chris22smith,
@chris22smith@mastodon.social avatar

@murtaugh It's certainly nothing to get excited about but they've done worse.

murtaugh, to random
@murtaugh@mastodon.social avatar

Went for my — I like how I’ve decided that the hottest part of the day is the best time to fit in a run 🤦

chris22smith,
@chris22smith@mastodon.social avatar

@murtaugh I do my run before work, at 7am, when it's nice and cool. It's still stupid.

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

Today I will write the first few pages of the part.

My request: please tell me about your cool, non-obvious selector tricks. I'd love to include a few in the book.

chris22smith,
@chris22smith@mastodon.social avatar

@ppk I like to wrap any animations in a media query, like this:

@media@mastodon.social (prefers-reduced-motion: no-preference) { /* keyframe animations or transitions */ }

This means they only run if the user hasn't set a preference for reduced motion.

chris22smith, to webdev
@chris22smith@mastodon.social avatar

Web devs, is there a reliable way of taking a screenshot, element to image, with JavaScript?

I've tried html2canvas (not faithful), media stream (requires user permission) and blob generation (I can't figure it out).

I'm actually trying to load an iframe then replace it with a screenshot of its content as a way of saving resources.

chris22smith,
@chris22smith@mastodon.social avatar

@murtaugh html2canvas would probably work if I was loading better pages. It's probably my best option so far but I'm hoping for pixel perfect.

chris22smith, to CSS
@chris22smith@mastodon.social avatar

CSS puzzler...

I'm making a page with a checkered pattern which extends across the full width. Is there a way I can dynamically change the size of the small squares so I always get whole squares across the width? They need to stay roughly the same base size. I guess I could use vw units and a lot of break points but that's horrible, even with Sass. Is there something easier I'm missing?

chris22smith,
@chris22smith@mastodon.social avatar

@keithjgrant That's clever and certainly gets me closer. I was hoping for less in the DOM but it's better than what I've got currently. Thanks.

5t3ph, to CSS
@5t3ph@front-end.social avatar

What are some things you've built-in to your mindset or starters to "get around" limitations or quirks of ?

chris22smith,
@chris22smith@mastodon.social avatar

@5t3ph The lack of cohesion or consistency in the appearance of form elements is a problem for me. I feel like I've got to apply some blanket styles to put it right.

I also hate the way that text can wrap under the marker in lists. I use flex to fix it. I suppose my expectation comes from things like Word, where that doesn't happen.

5t3ph, to webdev
@5t3ph@front-end.social avatar

What's always been "weird" to you about ? As in, how something works? Less intuitive aspects? Stuff that trips you up even though you "know" how it works?

This is not a gripe thread, I'm looking for constructive input, thanks!

chris22smith,
@chris22smith@mastodon.social avatar

@5t3ph I've always found collapsing margins a bit unpredictable. Also, the way a <hr> is styled always trips me up.

chris22smith,
@chris22smith@mastodon.social avatar

@5t3ph I've thought of another. When styling <ul> or <ol> lists, I'm never sure whether the margin, padding and list-style defaults are on the parent list or the list item children.

chris22smith, to webdev
@chris22smith@mastodon.social avatar

When you're using HTML tables and you want more advanced features like column sorting or expandable rows, is there a library or framework that you reach for?

Any recommendations for something that's powerful yet easy to use? Thanks.

chris22smith,
@chris22smith@mastodon.social avatar

@michael Thanks. As long as it's reasonably small and does the job I'm open to it. I prefer solutions that build on native tables over ones that reinvent them.

chris22smith, to webdev
@chris22smith@mastodon.social avatar
murtaugh, to random
@murtaugh@mastodon.social avatar

This really seems like a decision that could end up tainting every single WordPress blog in the eyes of search engines.

https://www.theverge.com/2023/6/7/23752261/wordpress-automattic-generative-ai-writing-tool-plug-in-jetpack

chris22smith,
@chris22smith@mastodon.social avatar

@murtaugh This is my great fear, that the web becomes so noisy that we can't search for information, rely on reviews and eventually the infrastructure collapses or we have to pay to publish content.

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