Follow

Are you a JavaScript engineer who really ought to know some CSS but is avoiding it?
What are your main pain or confusion points?
I want to help you, but I need to understand the problem first.

@ppk Judging by the code:

1. Specificity, inheritance, and the cascade.
2. How tools like Sass and Less generate their output and affect the former.

In particular, I think the cascade is viewed as "global scope," and something to fight instead of work with.

@webinista Yes, the cascade is a clear pain point. But I'm not sure whether explaining it again would help; I need to understand what JS peeps expect.

@ppk Of my experience can only agree with @webinista: The expectation is, that the cascade should dissapear. Not possible.
A solution for not getting unwanted inheritage is, to make sure to use a unique class-name per component-element.

@webinista @ppk Immediately thought 1.) too. But 2.) is an interesting point which didn't come to my mind, yet.

@ppk My biggest gripe with CSS is all the side effects baked into the spec. Like how used values for "auto" change depending on context, or how setting opacity can change your layout. The cause-and-effect is difficult to trace, so you end up just playing with values until you get what you want. It's hardly an inspiring environment to work in.

I'm working on a Chrome extension that will hopefully help with this but it's not an easy road.

Sign in to participate in the conversation
Mastodon

Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!