CSS tag name lowercasing
See original GitHub issuePrettier 1.14.3 Playground link
--parser scss
Input:
Label {
font-size: 24;
}
Output:
label {
font-size: 24;
}
Expected behavior:
Label {
font-size: 24;
}
I am using prettier on a NativeScript project, which uses an Xml markup with some tag names similar to html but with uppercase names (like Label and Button). CSS is largely case-insensitive, so the styles still apply properly even with the incorrect lowercase tag names output by prettier, but it sure looks inconsistent when looking at the markup and the styles together.
Issue Analytics
- State:
- Created 5 years ago
- Comments:19 (12 by maintainers)
Top Results From Across the Web
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 >Why is "lower-case with dashes" the standard for HTML classes?
It's an acceptable naming convention, to help the author from confusing between his different languages. You can name your class names in ...
Read more >Summarized test results: Case sensitivity in selectors (CSS ...
If the name of an HTML title attribute value in a selector is uppercase and the attribute value is lowercase in the markup,...
Read more >CSS text-transform property - W3Schools
Property Values ; capitalize, Transforms the first character of each word to uppercase, Demo ❯ ; uppercase, Transforms all characters to uppercase, Demo...
Read more >Why does the tagName need to be in CAPS when using event ...
The older versions of HTML back when JavaScript was first created used all caps for tag names by convention instead of today's lowercase....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@chevallard maybe we can detect what you use css for html or for xml, do you use some declaration for this?
According to the CSS spec, the document that the CSS is being applied to determines case sensitivity. The CSS file has no indication of which type of document it is being applied to. This is an issue when we are using the supported CSS/Less/Sass.