News for hackers. Stuff that matters.
Re:CSS: The bad bits and how to avoid them by Someone1234 on Monday March 19, 2018 @05:04PM (#16623146)
> In my opinion, most CSS bad bits are a byproduct of bad use, not a problem of the language(?) itself.

I've seen far too many bad languages come and go to believe that anymore. People used to say that about PHP and VB6 too.

PHP eventually stopped with the "only bad programmers use me badly" and grew up, and VB6 died. A win in both cases.

CSS could be far better; and bad practices won't disappear until doing it the right way is easier than doing it the wrong way.

Re:CSS: The bad bits and how to avoid them by talmand on Monday March 19, 2018 @05:30PM (#16623380)
The ability for good practices is already there, just too many people would rather complain about their bad practices to bother learning the good practices and blame the language.
Re:CSS: The bad bits and how to avoid them by sharpercoder on Monday March 19, 2018 @09:31PM (#16625192)
-it is not possible to decrease scope

-tooling is hard e.g. to detect unused styles

-scope problems are a pain to debug

-some constructs are awkward (e.g. tooltips with :before and positioning styles)

-vertical text behaves unexpected wrt box model

-variables are suboptimal

There are probably a lot more.

Re:CSS: The bad bits and how to avoid them by talmand on Wednesday March 21, 2018 @05:57PM (#16642814)
1. I require more of an explanation as to what you mean by decrease scope. I could interpret that in different ways.

2. Sure, I understand the discipline necessary to prevent that is difficult in a team setting. I would say that likely at reaching that point something went wrong before then. That seems a tooling problem, not a language problem. How many languages provide features out-of-the-box that assist with discovering unused code without some form of third-party exploring that space?

3. In what way? What scope problems? I can think of several bad practices that lead to scope problems. I can think of examples of two people following two different best practices creating such problems.

4. I know it's not exactly a fair thing to say, but I don't have those issues with the example you provide. I'm sure there's plenty of examples of showing how to do it.

5. Flex. But, granted, old practices didn't handle vertical issues well because originally HTML wasn't intended for that.

6. In what way? Do you mean variables from a pre-processor or CSS custom properties?

I'm sure there are more, just like almost all languages have their quirks and issues that make it difficult to address if not understood. Do you have any other examples that we could discuss? Are there any specific use cases where you are having difficulties that I might be able to help out with?

Re:CSS: The bad bits and how to avoid them by Retra on Tuesday March 20, 2018 @01:43AM (#16626286)
If the language were better, they would have learned the good practices while they learned the language, and they wouldn't even be able to express bad practices without extra effort.