This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Distinguishing words that are both selectors and properties#266
Open
cssinate wants to merge 1 commit intoatom:masterfrom
cssinate:fix-overlapping-keywords
Open
Distinguishing words that are both selectors and properties#266cssinate wants to merge 1 commit intoatom:masterfrom cssinate:fix-overlapping-keywords
cssinate wants to merge 1 commit intoatom:masterfrom
cssinate:fix-overlapping-keywords
Conversation
|
Thanks @cssinate! I see from the issue you mentioned:
Though a maintainer might take a look here, the best place to get help with test issues is probably the Atom Slack. There are a bunch of helpful folks there that should be willing to help. |
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.
Description of the Change
The words "content" "cursor" "filter" "font" and "mask" are all words that have been identified as selectors (https://github.com/atom/language-css/blob/master/grammars/css.cson#L2056) and property names (https://github.com/atom/language-css/blob/master/grammars/css.cson#L1488).
This code change targets specifically those words. In this change, these words are considered property names by default, but once they're followed by a curly brace, pseudo-element or pseudo-selector, they resolve to selectors.
Alternate Designs
This was attempted previously in #234, but that caused other issues.
Benefits
Syntax highlighters will now properly highlight this words.
Possible Drawbacks
The only one I could find is that if you type one of these words in the main body of the CSS file, it will first assume it's a property name, and only update it to a selector after the curly brace gets added, contrary to how other selectors are added.
Applicable Issues
#226