Repository navigation
Don't lowercase element names and attribute names in selectors - #3317
Merged
Merged
Conversation
lydell
commented
Nov 25, 2017
| .Keep (@Keep) WHEN (lightness(@Keep) >= Keep12PX) AND (@Keep > @Keep12E5) {} | ||
| .Keep (@Keep) when (lightness(@Keep) >= 12PX) and (@Keep > 0) {} | ||
| .Keep (@Keep) when (lightness(@Keep) != '12PX') and (@Keep != "12PX") {} | ||
| .Keep (@Keep) when (lightness(@Keep) >= Keep12PX) and (@Keep > @Keep12E5) {} |
Member
Author
There was a problem hiding this comment.
As far as I understand, Less only accepts when and and lowercase.
lydell
commented
Nov 25, 2017
| @keyframes KeepAnimationName { | ||
| from { | ||
| FROM { |
Member
Author
There was a problem hiding this comment.
from and to could technically be lowercased in @keyframes, but I don’t think it is worth the trouble.
azz
approved these changes
Nov 25, 2017
| // - The case should always be preserved for element names and attribute names | ||
| // in selectors, as well as function names and property keywords. | ||
| // - Other things should mostly be lowercase. | ||
| // - The \`/*:*/\` comments are just to bust the \`isLikelySCSS\` check. |
Member
There was a problem hiding this comment.
Unrelated to this PR, but can we use parser: "less" instead of the comments now?
https://www.w3.org/TR/css3-selectors/#casesens > All Selectors syntax is case-insensitive within the ASCII range (i.e. > [a-z] and [A-Z] are equivalent), except for parts that are not under the > control of Selectors. The case sensitivity of document language element > names, attribute names, and attribute values in selectors depends on the > document language. For example, in HTML, element names are > case-insensitive, but in XML, they are case-sensitive. Fixes prettier#3304.
suchipi
approved these changes
Nov 25, 2017
lydell
commented
Nov 25, 2017
| #{$KeepInterpolationVar}, | ||
| #{$Keep + 15px}, | ||
| #{$Keep + 15PX}, |
Member
Author
There was a problem hiding this comment.
Oops, I didn't see this one when looking through the diff before. Need to lowercase that "PX".
Member
|
Good to merge? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://www.w3.org/TR/css3-selectors/#casesens
Fixes #3304.