Ancestors

Toot

Written by Alaric Snell-Pym on 2024-11-14 at 22:45

I have recently been forced to do some HTML/CSS work and, oh my god, they went and ruined HTML while I wasn't looking.

I now quite strongly believe the "class" attribute was a mistake and needs to be deprecated ASAP, and I'm not entirely sure they "style" attribute and element (eg, HTML authors getting to specify their own CSS, rather than CSS being something the user chooses in their browser to meet their accessibility needs / fit in with their desktop theme) are a good idea at all.

=> More informations about this toot | More toots from kitten_tech@fosstodon.org

Descendants

Written by Alaric Snell-Pym on 2024-11-14 at 22:57

Just look at the source of https://www.forms.service.gov.uk/ - see all those huge class names dwarfing every element's opening tag. All completely unnecessary, and just making it horrible to work with, and meaning the CSS and the HTML are completely coupled together. You can't try this CSS on some other site or vice versa; if you apply that CSS to a HTML page without class attributes it just looks like a completely unstyled HTML page.

Whyyy all this unnecessary complexity and coupling?

=> More informations about this toot | More toots from kitten_tech@fosstodon.org

Written by Alaric Snell-Pym on 2024-11-14 at 23:07

Is all this really necessary to work around flaws in CSS/HTML, or is this just the work of people who slather complexity onto things because they know no better? Or, more cynically, who layer complexity into things in order to make their jobs seem harder and more mysterious?

And don't get me started on the use of JS. At least these .gov.uk pages usually avoid THAT.

The mews the Web has become sickens me, because it's needless complexity that just makes HTML and browsers hard to write.

=> More informations about this toot | More toots from kitten_tech@fosstodon.org

Written by Alaric Snell-Pym on 2024-11-14 at 23:11

And now we have a world where a shrinking number of browser core engines exist, web sites are impractical for most humans to generate themselves, accessibility is an afterthought, every site has inconsistent layout and navigation because each site has to build all those basics from scratch - and what have we actually gained?

=> More informations about this toot | More toots from kitten_tech@fosstodon.org

Written by Phil Gyford on 2024-11-15 at 07:52

@kitten_tech Having said that, HTML is also still the same as it was 25 years ago, more or less, with some improvements. You can still use it without CSS and it'll look much the same as it always did.

=> More informations about this toot | More toots from philgyford@mastodon.social

Written by Alaric Snell-Pym on 2024-11-15 at 08:51

@philgyford my objection is to how it's being used, rather than the HTML/CSS specs themselves, which do indeed allow the creation of simple, usable, web pages . I am wondering if it was a mistake to not do more to require that, however :-)

=> More informations about this toot | More toots from kitten_tech@fosstodon.org

Written by Phil Gyford on 2024-11-15 at 08:54

@kitten_tech Yes and your objection to how it's being used suggests you have no idea what good CSS usage is.

=> More informations about this toot | More toots from philgyford@mastodon.social

Written by Alaric Snell-Pym on 2024-11-15 at 09:10

@philgyford good for whom? Stylesheets like the example I shared are a pain for HTML authors (who need to hang verbose class names on every element, specific to that precise stylesheet), and for users who can't override the CSS for their needs/preferences - which was originally touted as a feature of CSS over the tag (and to what extent the lack of browser support for that is cause or effect, I don't know).

=> More informations about this toot | More toots from kitten_tech@fosstodon.org

Written by Phil Gyford on 2024-11-15 at 09:15

@kitten_tech "HTML authors"? You mean Front End Developers? Who are expected to know HTML, CSS (including the pros and cons of different CSS methods), JS, etc?

If your complaint is "web development has become very complicated" I agree with you, but that's not specific to the front end.

=> More informations about this toot | More toots from philgyford@mastodon.social

Written by Alaric Snell-Pym on 2024-11-15 at 09:26

@philgyford you shouldn't need to know all that to write HTML. This is just creating an ivory tower, guarded against intruders unless they have the time to learn a whole lot of scary-looking stuff...

Things don't just get complicated; we make them complicated, by failing to take the time to think of simple ways to get what people need, then trying to bridge over the rough edges of that complexity with more complexity! (Oh, yes, I know where those long class names come from., SCSS/SASS...)

=> More informations about this toot | More toots from kitten_tech@fosstodon.org

Written by Phil Gyford on 2024-11-15 at 09:58

@kitten_tech lol have you seen the ivory towers constructed by every single bit of web development?

You don't need to know all that to write HTML. Plain HTML still works! But if you want to do front end dev on an even moderately-sized site, in a way that's manageable, understandable and expandable by other devs, and results in a well-designed, accessible, performant site that works across all devices, yes you need to know more.

=> More informations about this toot | More toots from philgyford@mastodon.social

Written by Alaric Snell-Pym on 2024-11-15 at 10:09

@philgyford yes! The ivory towers are a problem!

Browser default stylesheets are ugly, so if you just write plain HTML, it looks ugly. So (a) people need to learn CSS to get anywhere, and (b) there's no reason to improve the default stylesheet because it all gets reset anyway, nor create tools for users to configure them, nor libraries of cool theme CSS they can share to make their Web look like LCARS or have the contrast ratio that suits their eyes or whatever. It's a collective action trap!

=> More informations about this toot | More toots from kitten_tech@fosstodon.org

Written by Alaric Snell-Pym on 2024-11-15 at 10:19

@philgyford also, a site with no CSS or JS is performant, understandable by all the devs, works across all devices, is accessible (esp. with modern semantic elements like - I've only a passing familiarity with ARIA so I'm not certain if it can be dispensed with if you just use HTML as it was designed), etc - it's just ugly and a bit vertical-scroll heavy, because the default stylesheets are gross...

=> More informations about this toot | More toots from kitten_tech@fosstodon.org

Written by Phil Gyford on 2024-11-15 at 10:00

@kitten_tech There are so many things you could criticise front end development for! But "I don't understand CSS after ignoring the field for two decades" only proves the stereotype of "back end dev wades into front end and says it's all rubbish". You don't even know what you don't know, which is unusual for you :)

=> More informations about this toot | More toots from philgyford@mastodon.social

Written by Alaric Snell-Pym on 2024-11-15 at 10:25

@philgyford I didn't say I didn't understand CSS, just that I was sad about how it's being used... I feel like the community has forgotten why HTML and CSS are designed the way they are, and become so accustomed to trying to use it for things it's not meant for that doing everything the hard way has become second nature. Java went through a phase a bit like this in the late 90s/00s, but it largely passed because people became sick of writing verbose boilerplate and sought alternatives...

=> More informations about this toot | More toots from kitten_tech@fosstodon.org

Written by Phil Gyford on 2024-11-15 at 10:37

@kitten_tech It's not "corporate paymasters" who insist on this stuff, it's anyone who wants their site to look nice. It's called design.

I can't argue this any more because, sorry, you don't know what you're talking about.

=> More informations about this toot | More toots from philgyford@mastodon.social

Written by Alaric Snell-Pym on 2024-11-15 at 10:25

@philgyford I'd be interested to hear your criticisms of front end dev, though!

=> More informations about this toot | More toots from kitten_tech@fosstodon.org

Written by Phil Gyford on 2024-11-15 at 10:41

@kitten_tech e.g. using JS frameworks where they're not needed, using complicated build systems, using "utility styles" CSS like Tailwind...

I usually blame all of these on back end devs who don't understand front end development :)

=> More informations about this toot | More toots from philgyford@mastodon.social

Written by Ubik Savings and Loan on 2024-11-15 at 10:47

@kitten_tech @philgyford I was expecting something really awful from the way you described it, but that's pretty mild! There's actually a lot of redundancy in the way that's been coded up, for example every list item in a govuk-list is a govuk-list-item. This presumably derives from the author using a standardised stylesheet from GDS, and generating the final output with a components library which applies the classes to individual elements. If you were writing the stylesheet yourself, your list style would define how the items inside it appear.

=> More informations about this toot | More toots from hex@meemu.org

Written by Phil Gyford on 2024-11-15 at 10:52

@hex @kitten_tech Yeah, without looking very closely, it looks like typically decent gov.uk work to me, presumably using BEM or similar as a way to keep class names etc consistent and understandable.

Wait until Alaric sees some bad HTML/CSS!

=> More informations about this toot | More toots from philgyford@mastodon.social

Written by Ubik Savings and Loan on 2024-11-15 at 11:09

@philgyford @kitten_tech Yeah, I did some client work with the GovUK React components last year and this was immediately familiar. It's not fancy but very straightforward to work with which is the point! The output is also very un-gnarly compared to countless other ways of doing it. You could recreate this by hand, unlike something produced by CSS-in-JS libraries using auto-generated IDs for scoping, etc.

I know that Tailwind is a divisive topic but I'm firmly in the "that is not the way" camp. Talk about an example of a nightmare soup of class names... if I was new to all this and did view source on a project using it I would probably change careers on the spot.

=> More informations about this toot | More toots from hex@meemu.org

Written by Phil Gyford on 2024-11-15 at 11:13

@hex @kitten_tech Yeah, I like BEM-style but am open to any other sensible systems.

I can see Tailwind style being good for quick prototyping. But prototype stuff so often ends up being the real thing. I see it used a lot by Django devs who – I wildly assume – don't want to spend time learning how to use CSS well, and Tailwind makes more immediate sense to them. I pity anyone who has to use their front-end stuff in the future.

=> More informations about this toot | More toots from philgyford@mastodon.social

Written by handelaar on 2024-11-16 at 03:09

@philgyford @hex @kitten_tech I was from evolt.org, I sysadmined css-d for Eric. Tailwind is right and we were wrong. (And: the visual noise of your tailwind styles can be truncated into components once you've got it looking right.) The sheer fucking speed of making a new thing being increased by >1000% with a window looking at npm watch, and that you don't know that, is a big tell that you didn't try it yet 🙂

=> More informations about this toot | More toots from handelaar@mastodon.ie

Written by Phil Gyford on 2024-11-16 at 07:32

@handelaar @hex @kitten_tech You lost me at "npm".

=> More informations about this toot | More toots from philgyford@mastodon.social

Written by Alaric Snell-Pym on 2024-11-15 at 11:17

@philgyford @hex oh, I've seen worse, I picked that as a GOOD example to avoid the no-true-Scotsman fallacy 🤣

=> More informations about this toot | More toots from kitten_tech@fosstodon.org

Written by Phil Gyford on 2024-11-15 at 07:50

@kitten_tech Honestly? I don't think you know what you're talking about. Or you just think HTML should be something it hasn't been for like 25+ years?

=> More informations about this toot | More toots from philgyford@mastodon.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113483731512747447
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
439.681843 milliseconds
Gemini-to-HTML Time
11.408519 milliseconds

This content has been proxied by September (3851b).