sindresorhus/refined-github

Add `postcss-preset-env` to build #3258

fregante posted onGitHub

I feel that nested selectors and @custom-selector could help us organize our code better. I think it's worth adding postcss-preset-env to our build, as long as it doesn't slow it down considerably.

Exploration need, PR welcome to figure this one out.

Might also be worth picking only a couple of transforms from: https://github.com/csstools/postcss-preset-env/blob/master/src/lib/plugins-by-id.js, like custom-selectors nesting selector-matches


Here's a demo:

Before: https://github.com/sindresorhus/refined-github/blob/c75403e2292282f9907307f1d479673a7e59571d/source/features/dim-bots.css After: https://github.com/sindresorhus/refined-github/blob/da78f3d261d115adf2c201370eb29b798cd19a35/source/features/dim-bots.css

The code required is not considerably shortened, but it's more mantainable and can be followed more easily, without many comments

posted by fregante almost 5 years ago

I changed my mind. dim-bot is the exception, most features are rather light on CSS. Weird CSS syntax would just make them less contributable

posted by fregante about 4 years ago

Fund this Issue

$0.00
Funded

Pull requests