I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
With component-based solutions, you lose the ability to make global changes. While you only have one place to change your media object, if your company's colour scheme changes or the site gets a holiday makeover, you're back to making changes in a million places again - and that sort of thing happens a lot.
In this example, I would change tailwind.config.js directly and update the colour class that was used. They work in the same way as variables, so if I had a class called bg-brand-primary, I could update the colour named brand-primary in the config, and this would be reflected everywhere brand-primary is used. In this way, your config file is where you can easily make global changes.
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
The problem is, that if you run a takeover on your site - for instance, you have a sale in your shop and everything has little fairies waving wands at prices, and the boxes are all double the size they normally are - these are multiple changes. Yes, you could make everything a variable and put it in your config, but that's unmanageable for anything more complicated than a few simple things.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
With component-based solutions, you lose the ability to make global changes. While you only have one place to change your media object, if your company's colour scheme changes or the site gets a holiday makeover, you're back to making changes in a million places again - and that sort of thing happens a lot.
Thanks for your comment!
In this example, I would change tailwind.config.js directly and update the colour class that was used. They work in the same way as variables, so if I had a class called bg-brand-primary, I could update the colour named brand-primary in the config, and this would be reflected everywhere brand-primary is used. In this way, your config file is where you can easily make global changes.
You could name them the same as you would regular CSS variables: css-tricks.com/what-do-you-name-co...
Hope that clears it up, let me know if I've understood you wrong.
The problem is, that if you run a takeover on your site - for instance, you have a sale in your shop and everything has little fairies waving wands at prices, and the boxes are all double the size they normally are - these are multiple changes. Yes, you could make everything a variable and put it in your config, but that's unmanageable for anything more complicated than a few simple things.