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
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
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
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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@handelaar @hex @kitten_tech You lost me at "npm".
=> More informations about this toot | More toots from philgyford@mastodon.social
text/gemini
This content has been proxied by September (3851b).