CSS colors lower vs upper case, and possibly length

See original GitHub issue

After I ran prettier on my .scss files I see some colors written in upper case and some in lower case. Some are 3 chars long, others 6. Is there a way prettier would standardize the way colors are written? I personally prefer 6 chars lower case.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
vjeuxcommented, Jun 19, 2017

If someone is interested in sending a pr to lowercase hexadecimal colors, that would be very welcomed

1reaction
lydellcommented, Jul 1, 2017

Yes, case matters! By enforcing case, Prettier takes away yet one item from pointless code style debates between programmers. Besides, Prettier already enforces case for hexadecimal numbers in JS, as an example. What a minifier can and can’t do has nothing to do with prettier.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a reason to use uppercase letters for hexadecimal ...
Here is another reason to prefer lower case to UPPER CASE : the risk of confusing numbers with letters, notably 8 versus B,...
Read more >
Upper- or lowercase hex codes in CSS? - Robert's talk
Uppercase is more asthetically pleasing and it's how hexadecimal is supposed to be written. I use uppercase for all hex for colours (<code>#FFF< ......
Read more >
CSS Color Module Level 4 - W3C
In certain cases, a color can have one or more missing color components . In this specification, this happens automatically due to hue-based ......
Read more >
text-transform - CSS: Cascading Style Sheets - MDN Web Docs
The text-transform CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or ......
Read more >
Design for readability - Harvard's Digital Accessibility Services
Readability is reduced with all caps because all words have a uniform ... use text along with CSS to apply styling (such as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found