Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Update CSS Code Hints pseudo-selectors #13345

Merged
merged 2 commits into from
May 3, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions src/extensions/default/CSSPseudoSelectorHints/PseudoSelectors.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
{
"selectors" :
"selectors":
{
"active": {"desc": "Selects the active link"},
"checked": {"desc": "Selects every checked <input> element"},
"default": {"desc": "Selects every UI element that is the default among a group of similar elements"},
"dir(direction)": {"desc": "Selects every element whose text direction is 'direction'", "text": "dir()"},
"disabled": {"desc": "Selects every disabled <input> element"},
"empty": {"desc": "Selects every element that has no children/text (including text nodes)"},
"enabled": {"desc": "Selects every enabled <input> element"},
"first-child": {"desc": "Selects every element that is the first child of its parent"},
"first-of-type": {"desc": "Selects every element that is the first element identified by 'type' of its parent"},
"focus": {"desc": "Selects the input element which has focus"},
"focus-within": {"desc": "Selects every element which or whose descendant has focus"},
"hover": {"desc": "Selects elements on mouse over"},
"in-range": {"desc": "Selects input elements with a value within a specified range"},
"indeterminate": {"desc": "Selects every indeterminate checkbox or radio button"},
"invalid": {"desc": "Selects all input elements with an invalid value"},
"lang(language)": {"desc": "Selects every element with a lang attribute equal to 'language'", "text":"lang()"},
"lang(language)": {"desc": "Selects every element with a lang attribute equal to 'language'", "text": "lang()"},
"last-child": {"desc": "Selects every element that is the last child of its parent"},
"last-of-type": {"desc": "Selects every element that is the last element of its parent"},
"link": {"desc": "Selects all unvisited links"},
"not(selector)": {"desc": "Selects every element that is not an element identified by 'selector'", "text":"not()"},
"nth-child(n)": {"desc": "Selects every element that is the second child of its parent", "text":"nth-child()"},
"nth-last-child(n)": {"desc": "Selects every element that is the second child of its parent, counting from the last child", "text":"nth-last-child()"},
"nth-last-of-type(n)": {"desc": "Selects every element that is the nth element of its parent, counting from the last child", "text":"nth-last-of-type()"},
"nth-of-type(n)": {"desc": "Selects every element that is the nth element of its parent", "text":"nth-of-type(n)"},
"only-of-type": {"desc": "Selects every element that is the only element of this type of its parent"},
"matches(selectors)": {"decs": "Selects every element that is matched by one or more selectors in the 'selectors' list"},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the spelling of description key.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add a 'text' field in the value with the insertion text as 'matches()'. Other wise user has to always delete selectors after hint selection.

"not(selector)": {"desc": "Selects every element that is not an element identified by 'selector'", "text": "not()"},
"nth-child(n)": {"desc": "Selects every element that is the second child of its parent", "text": "nth-child()"},
"nth-last-child(n)": {"desc": "Selects every element that is the second child of its parent, counting from the last child", "text": "nth-last-child()"},
"nth-last-of-type(n)": {"desc": "Selects every element that is the nth element of its parent, counting from the last child", "text": "nth-last-of-type()"},
"nth-of-type(n)": {"desc": "Selects every element that is the nth element of its parent", "text": "nth-of-type(n)"},
"only-child": {"desc": "Selects every element that is the only child of its parent"},
"only-of-type": {"desc": "Selects every element that is the only element of this type of its parent"},
"optional": {"desc": "Selects input elements with no 'required' attribute"},
"out-of-range": {"desc": "Selects input elements with a value outside a specified range"},
"placeholder-shown": {"desc": "Selects all <input> and <textarea> elements currently showing placeholder text"},
"read-only": {"desc": "Selects input elements with the 'readonly' attribute specified"},
"read-write": {"desc": "Selects input elements with the 'readonly' attribute NOT specified"},
"required": {"desc": "Selects input elements with the 'required' attribute specified"},
Expand All @@ -33,12 +39,13 @@
"valid": {"desc": "Selects all input elements with a valid value"},
"visited": {"desc": "Selects all visited links"}
},
"elements" :
"elements":
{
"after": {"desc": "Insert something after the content of each element identified by this selector"},
"before": {"desc": "Insert something before the content of each element identified by this selector"},
"first-letter": {"desc": "Selects the first letter of every element identified by this selector"},
"first-line": {"desc": "Selects the first line of every element identified by this selector"},
"placeholder": {"desc": "Selects the placeholder text of <input> and <textarea> elements"},
"selection": {"desc": "Selects the portion of an element identified by this selector that is selected by a user"}
}
}