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

Inconsistent use of :disabled and [disabled] #25316

Closed
MartijnCuppens opened this issue Jan 15, 2018 · 5 comments
Closed

Inconsistent use of :disabled and [disabled] #25316

MartijnCuppens opened this issue Jan 15, 2018 · 5 comments

Comments

@MartijnCuppens
Copy link
Member

MartijnCuppens commented Jan 15, 2018

As well :disabled as [disabled] are used.

&.disabled,
&:disabled {
color: color-yiq($background);
background-color: $background;
border-color: $border;
}
&:not([disabled]):not(.disabled):active,
&:not([disabled]):not(.disabled).active,

It would be a bit more consistent to use :disabled everywhere.

@patrickhlauke
Copy link
Member

patrickhlauke commented Jan 15, 2018

the :not() pseudo selector cannot contain another pseudo-selector https://developer.mozilla.org/en-US/docs/Web/CSS/:not#Syntax (unless SCSS allows for some fancy rewriting of the output to account for that?)

@MartijnCuppens
Copy link
Member Author

As far as I know, :disabled is not a pseudo-element but a pseudo-class which is allowed in the not() selector.

@patrickhlauke
Copy link
Member

ah, right you are, my mistake.

@patrickhlauke
Copy link
Member

@MartijnCuppens #25317

@patrickhlauke
Copy link
Member

agree that settling on :disabled looks cleaner, and it may remove the idea that you can just arbitrarily throw a disabled attribute on any old random element to have the styles kick in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants