Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #12731
Closed
Open
Issue created Feb 13, 2014 by Administrator@rootContributor

forms.less - "has-" functions using wrong variables

Created by: Tickthokk

I submitted this first to the SASS repository and was redirected here. I reviewed the LESS files and the issue is the same there. While I reference specific lines in .scss files, from what I saw they are practically identical in their corresponding .less files.

My syntax will obviously be wrong when talking about LESS, but the suggestion is just to change the second instance of text to border, so I didn't convert my code. Then obviously this resolution will need ported to your SASS repository as well.

Thanks!


Original SASS issue: https://github.com/twbs/bootstrap-sass/issues/531


For the three has- classes (success, warning, error), the function call is currently using the -text color variable in the first two passes, but I believe the second should be the -border color variable. This would seem to be a correct fix based on the variable definitions in mixins.scss on line 857.

As it exists now (forms.scss line 272)

.has-success {
  @include form-control-validation($state-success-text, $state-success-text, $state-success-bg);
}
.has-warning {
  @include form-control-validation($state-warning-text, $state-warning-text, $state-warning-bg);
}
.has-error {
  @include form-control-validation($state-danger-text, $state-danger-text, $state-danger-bg);
}

Suggested change:

.has-success {
  @include form-control-validation($state-success-text, $state-success-border, $state-success-bg);
}
.has-warning {
  @include form-control-validation($state-warning-text, $state-warning-border, $state-warning-bg);
}
.has-error {
  @include form-control-validation($state-danger-text, $state-danger-border, $state-danger-bg);
}
Assignee
Assign to
Time tracking