Skip to content

Fix form-validation-state() for unknown pseudo classes#27409

Closed
tkrotoff wants to merge 2 commits intotwbs:v4-devfrom
tkrotoff:fix-form-validation-state-mixin
Closed

Fix form-validation-state() for unknown pseudo classes#27409
tkrotoff wants to merge 2 commits intotwbs:v4-devfrom
tkrotoff:fix-form-validation-state-mixin

Conversation

@tkrotoff
Copy link
Copy Markdown
Contributor

@tkrotoff tkrotoff commented Oct 13, 2018

Fix #23371, see also Stack Overflow - Bootstrap 4, is-pending form validation state

Make things like @include form-validation-state("warning", ...) possible:
$state can now be anything not just valid and invalid.

It changes nothing for valid and invalid: the CSS output is exactly the same.


Output for @include form-validation-state("warning", ...):

  • before (:warning is an unknown pseudo class => the browser will ignore the whole line)
.was-validated .form-control:warning, .form-control.is-warning {
  ...
}
  • after (:warning replaced by .is-warning => no impact)
.was-validated .form-control.is-warning, .form-control.is-warning {
  ...
}

@tkrotoff
Copy link
Copy Markdown
Contributor Author

tkrotoff commented Oct 13, 2018

@mdo
Copy link
Copy Markdown
Member

mdo commented Oct 20, 2018

Thanks, but still inclined to leave this out of v4. I still don't see enough value in warning users of something that's not invalid and not valid. Other states just seem like they'd add confusion. Thanks again though!

@mdo mdo closed this Oct 20, 2018
@tkrotoff
Copy link
Copy Markdown
Contributor Author

Other states just seem like they'd add confusion

It's not about adding other states to Bootstrap itself. It's about removing a limitation for the ecosystem.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants