In defense of functional CSS
mikecr.it
In defense of functional CSS
1–10 of 246 posts
Re: In defense of functional CSS
#2Re: In defense of functional CSS
#3Re: In defense of functional CSS
#4For building things out and prototyping it was amazing though.
On the plus side our css file was so tiny.
Re: In defense of functional CSS
#5Font + colour scheme made this article unreadable.
Re: In defense of functional CSS
#6The obvious result is that you would end up with similar objects with different styles. A button with "main" role should have a consistent style across instances, not be green in one place and grey in another because you forgot to add the "green" class. Also changing the color of "main" buttons from green to blue should not entail changing each usage of the "green" class to a usage of a "blue" class.
Re: In defense of functional CSS
#7Found myself in agreement up until the concept of "semantic CSS class names". If you want semantic markup, then CSS is absolutely not the place to implement it IMHO.
Re: In defense of functional CSS
#8This seems to misunderstand the basics of why we have CSS in the first place, to separate "how something appears" from "what something is", and suggests to mix the two. The obvious result is that you would end up with similar objects with different styles. A button with "main" role should have a consistent style across instances, not be green in one place and grey in another because you forgot to add the "green" clas…
Re: In defense of functional CSS
#9>You never have to deal with one instance of a thing needing a slightly different style than the other instances, which screws up your reusable classes.
...what I found was that just as often, I'd need a new Atomic class different in a subtle way from existing ones, and this was annoying to implement because
a) it expands the kludge-dictionary of short class names you have to memorize, but often in a way that's too situational for anyone to actually memorize it, meaning the next time someone runs into the same problem they will re-invent the same solution rather than reread the entire list of Atomic classes to see if one exists, and
b) the whole point of Atomic is that I shouldn't have to be writing CSS, and I was, all the time.
Re: In defense of functional CSS
#10Something like "const FIVE = 5" doesn't seem to capture the essence of functional programming either?