Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement UI states selectors (:checked, :enabled and :disabled) #206

Merged
merged 2 commits into from Mar 30, 2016

Conversation

kwkbtr
Copy link
Contributor

@kwkbtr kwkbtr commented Mar 30, 2016

Issue: #197

This implementation simply uses attributes on the source DOM node to judge the UI state. Specifically, :checked matches if the element has checked or selected attribute and its value is true, and :enabled/:disabled matches if the element has disabled attribute and its value is false/true. The selectors do not match an element without UI states (such as a p element), even if it has disabled or selected content attribute, for such an element does not have disabled or selected DOM property.

This implementation simply uses attributes on the source DOM node to judge the UI state. Specifically, `:checked` matches if the element has `checked` or `selected` attribute and its value is true, and `:enabled`/`:disabled` matches if the element has `disabled` attribute and its value is false/true. The selectors do not match an element without UI states (such as a `p` element), even if it has `disabled` or `selected` content attribute, for such an element does not have `disabled` or `selected` DOM property.
@kwkbtr kwkbtr merged commit 6f1621a into master Mar 30, 2016
@kwkbtr kwkbtr deleted the ui_state_selectors-r#162 branch March 30, 2016 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant