This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Fix tag names interfering with property names #243
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.
Requirements
Description of the Change
This is another attempt to fix tag names incorrectly always receiving priority over property names. It changes property name matching to look for a colon on the same line and then makes it higher priority than selectors. While having a colon on a separate line is not forbidden in CSS, I think this is the closest that we can get to a comprehensive fix.
Alternate Designs
There's quite a few alternatives, such as changing the selectors begin pattern instead of properties'. I like this alternative the best because if first-mate supported multiline regex patterns then this pattern would be a complete fix.
Benefits
Tag names will no longer always override property names.
Possible Drawbacks
Unforeseen bugs such as #237.
Applicable Issues
Fixes #226
/cc @dsifford