Open stonecrusher opened 4 years ago
Sounds like you're ready to use a proper CSS post-processor and maybe even a standalone editor with cool CSS features. Not sure this would be useful in Stylus. For example I dislike 8-digit hex now and would usually prefer hsla
which is especially awesome when you want to work with slight variations of the same color e.g. keep hue/saturation but only change lightness.
I'm open to that. Can you recommend one? Atm I still heavily use Notepad++ and the editor of stylus-addon. No node.js. Regarding hsla, you're right. Personally I just use the stylus-lang color functions doing the same job.
hsla (who even uses that?)
I do, almost exclusively. Easiest to tweak shades on the fly, as tophf mentioned.
As for unifying color format on beautification, it might make for an interesting option if it converted every format to the desired format, and it would also need to be disabled by default.
Depends on difficulty vs demand. Not sure about the difficulty, but I imagine the demand would be pretty low.
Leaving my $0.0002 Consider such syntax:
:root {
--theme-color-accent-hue: 215;
--theme-color-accent-100: hsla(var(--theme-color-accent-hue, 215), 100%, 55%, 1);
}
html, body {
background-color: var(--theme-color-accent-100, hsla(0, 0%, 100%, 1));
}
I think its really bad idea to hard-code HEX and i would not support such feature request.
This is about "cleaning" and beautifying code snippets from elsewhere (mostly the original site's CSS or other userstyles) to a uniform format. No HEX-compulsion, don't worry.
When beautifying CSS it would be a cool feature to automatically convert the often present mess of different color formats to one preferred scheme.
So if 8-digit HEX is preferred:
To make it easier to implement I'd only allow
So no "downconversion".