|
|
|
|
|
by NiagaraThistle
817 days ago
|
|
Do developers really build basic websites / pages WITHOUT pure CSS when it's an option? I know there are times when you need to do something CSS can't (and shouldn't do of course. But I mean when the 'thing' is design/style only, aren't we all already using only CSS for those things? Or am I just so old I still practice the separation of concerns and no one else is. Also, while kudos to the OP for doing this, this is exactly a time when using CSS to do this is incorrect and using vanilla Javascript IS the right decision, as this is a behavior and not a style issue. NB4: Yes I do code sloppy when time dictates, but I still seperate my HTML, CSS, and JS as the norm, not the exception. |
|
Yes.
There are developers who have only styled websites using bootstrap classes. (or related css-frameworks, e.g foundation, bulma, etc...)
And there are developers who have only styled websites using tailwind classes. (or other related atomic css frameworks)
Both sets of developers lose out on some very powerful css features (e.g. page layouts using css-grid, container queries, light-dom web components, etc...) that can completely change the way you build websites.
------------------------------------------------------------
Bootstrap developers tend to use bootstrap instead of css because:
- They are entry/minor level front-end developers who are still becoming proficient with css. They tend to use only bootstrap at the beginning, then progressively use it less as their own knowledge improves.
- They aren't front-end developers and are using bootstrap as a crutch to get a front-end out for the system they are building
- They are older front-end developers who have been disincentivized to improve their skills. They have become stuck in a local maxima trap because they're relying on bootstrap to fill a knowledge hole, for example: How to code a responsive design (i.e. bootstrap classes -X> media queries -> reflowing rule based layouts -> container queries), how to build an accessible navigation, how/when to use js to build an interactive component, etc...
- An easy way to spot these kinds of developers is to see if they are:
1. using the BEM class naming scheme because they're coding a div soup instead of using fewer html elements and modern css selectors
2. using a js library to make something when a few lines of css will do the trick
------------------------------------------------------------
Tailwind developers tend to use tailwind because:
- They're using react, which doesn't have a good builtin way to keep component related styles close to the component itself. In css parlance, they don't know how to scope those styles to the component. They only know how to:
1. Put styles in a separate file like in regular page based websites. This method almost always fails because developers will change a style in an external file without realising that it affects more than one component, and they don't have sufficient visual-regression/snapshot testing to catch it.
2. Inline styles to each html element which turns the component into style soup. So they settle on tailwind to make class soup as a shorthand for the style soup. Instead they should be using a framework solution that scopes the css to the component (e.g. vue's `<style scoped>`) or scope the css to the component using web standards, or declare their styles in-component and yse their build system's asset bucketing system to dedupe the declarations.