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

Inconsistency in variable naming pattern V4 #22414

Closed
pat270 opened this issue Apr 11, 2017 · 7 comments
Closed

Inconsistency in variable naming pattern V4 #22414

pat270 opened this issue Apr 11, 2017 · 7 comments
Labels
Milestone

Comments

@pat270
Copy link
Contributor

pat270 commented Apr 11, 2017

In most places variables are named using the pattern $(component)-(state)-(css property)-(size) except in tables and inputs where it follows $(component)-(css property)-(size)-(state). I think it should be consistent across your variable api. I prefer the pattern in tables and inputs since it's easier to order alphabetically, $(component)-(css property)-(size)-(state), but realize it's easier to change it according to the first pattern.

@mdo
Copy link
Member

mdo commented Jun 7, 2017

I think you've submitted some PRs for this recently that we merged. Have any other areas you'd like to see addressed?

@pat270
Copy link
Contributor Author

pat270 commented Jun 9, 2017

@mdo Yes! Some variables I would like to see changed for consistency are:

$font-size-h1                                   =>      $h1-font-size
$font-size-h2                                   =>      $h2-font-size
$font-size-h3                                   =>      $h3-font-size
$font-size-h4                                   =>      $h4-font-size
$font-size-h5                                   =>      $h5-font-size
$font-size-h6                                   =>      $h6-font-size
$table-sm-cell-padding                          =>      $table-cell-padding-sm
$table-bg-accent                                =>      $table-accent-bg
$table-bg-hover                                 =>      $table-hover-bg
$table-bg-active                                =>      $table-active-bg
$table-inverse-bg-accent                        =>      $table-inverse-accent-bg
$table-inverse-bg-hover                         =>      $table-inverse-hover-bg
$input-bg-disabled                              =>      $input-disabled-bg
$input-bg-focus                                 =>      $input-focus-bg
$input-border-color-focus                       =>      $input-focus-border-color
$input-box-shadow-focus                         =>      $input-focus-box-shadow
$input-color-focus                              =>      $input-focus-color
$input-color-placeholder                        =>      $input-placeholder-color
$custom-control-disabled-indicator-bg           =>      $custom-control-indicator-disabled-bg
$custom-control-disabled-description-color      =>      $custom-control-description-disabled-color
$custom-control-checked-indicator-color         =>      $custom-control-indicator-checked-color
$custom-control-checked-indicator-bg            =>      $custom-control-indicator-checked-bg
$custom-control-checked-indicator-box-shadow    =>      $custom-control-indicator-checked-box-shadow
$custom-control-focus-indicator-box-shadow      =>      $custom-control-indicator-focus-box-shadow
$custom-control-active-indicator-color          =>      $custom-control-indicator-active-color
$custom-control-active-indicator-bg             =>      $custom-control-indicator-active-bg
$custom-control-active-indicator-box-shadow     =>      $custom-control-indicator-active-box-shadow
$custom-checkbox-checked-icon                   =>      $custom-checkbox-icon-checked
$custom-checkbox-indeterminate-indicator-color  =>      $custom-checkbox-indicator-indeterminate-color
$custom-checkbox-indeterminate-icon             =>      $custom-checkbox-icon-indeterminate
$custom-radio-checked-icon                      =>      $custom-radio-icon-checked
$custom-select-sm-font-size                     =>      $custom-select-font-size-sm
$nav-disabled-link-color                        =>      $nav-link-disabled-color
$nav-tabs-active-link-color                     =>      $nav-tabs-link-active-color
$nav-tabs-active-link-bg                        =>      $nav-tabs-link-active-bg
$nav-tabs-active-link-border-color              =>      $nav-tabs-link-active-border-color
$nav-pills-active-link-color                    =>      $nav-pills-link-active-color
$nav-pills-active-link-bg                       =>      $nav-pills-link-active-bg
$modal-dialog-sm-up-margin-y                    =>      $modal-dialog-margin-y-sm-up
$modal-content-xs-box-shadow                    =>      $modal-content-box-shadow-xs
$modal-content-sm-up-box-shadow                 =>      $modal-content-box-shadow-sm-up

This list isn't comprehensive (I probably missed some). Let me know if this is something worth merging, I can send a pull with changes.

@mdo
Copy link
Member

mdo commented Jun 12, 2017

Whoa, that's a big list lol. Separate PRs would be fantastic if you can manage.

@pat270
Copy link
Contributor Author

pat270 commented Jun 12, 2017

Not a problem, I'll try and send everything this week.

pat270 added a commit to pat270/bootstrap that referenced this issue Jun 13, 2017
pat270 added a commit to pat270/bootstrap that referenced this issue Jun 13, 2017
…`$table-bg-hover`, `$table-bg-active`, `$table-inverse-bg-accent`, `$table-inverse-bg-hover` to `$table-cell-padding-sm`, `$table-accent-bg`, `$table-hover-bg`, `$table-active-bg`, `$table-inverse-accent-bg`, `$table-inverse-hover-bg`, respectively (twbs#22414)
pat270 added a commit to pat270/bootstrap that referenced this issue Jun 13, 2017
…focus`, `$input-border-color-focus`, `$input-box-shadow-focus`, `$input-color-focus`, `$input-color-placeholder` to `$input-disabled-bg`, `$input-focus-bg`, `$input-focus-border-color`, `$input-focus-box-shadow`, `$input-focus-color`, `$input-placeholder-color`, respectively
pat270 added a commit to pat270/bootstrap that referenced this issue Jun 13, 2017
…or-bg`, `$custom-control-disabled-description-color`, `$custom-control-checked-indicator-color`, `$custom-control-checked-indicator-bg`, `$custom-control-checked-indicator-box-shadow`, `$custom-control-focus-indicator-box-shadow`, `$custom-control-active-indicator-color`, `$custom-control-active-indicator-bg`, `$custom-control-active-indicator-box-shadow` to `$custom-control-indicator-disabled-bg`, `$custom-control-description-disabled-color`, `$custom-control-indicator-checked-color`, `$custom-control-indicator-checked-bg`, `$custom-control-indicator-checked-box-shadow`, `$custom-control-indicator-focus-box-shadow`, `$custom-control-indicator-active-color`, `$custom-control-indicator-active-bg`, `$custom-control-indicator-active-box-shadow`, respectively
pat270 added a commit to pat270/bootstrap that referenced this issue Jun 13, 2017
…v-tabs-active-link-color`, `$nav-tabs-active-link-bg`, `$nav-tabs-active-link-border-color`, `$nav-pills-active-link-color`, `$nav-pills-active-link-bg` to `$nav-link-disabled-color`, `$nav-tabs-link-active-color`, `$nav-tabs-link-active-bg`, `$nav-tabs-link-active-border-color`, `$nav-pills-link-active-color`, `$nav-pills-link-active-bg`, respectively
pat270 added a commit to pat270/bootstrap that referenced this issue Jun 13, 2017
…`$modal-content-xs-box-shadow`, `$modal-content-sm-up-box-shadow`, to `$modal-dialog-margin-y-sm-up`, `$modal-content-box-shadow-xs`, `$modal-content-box-shadow-sm-up`, respectively
@mdo
Copy link
Member

mdo commented Jun 13, 2017

Lol wow, so amazing to see those PRs coming in. I was staring at the /pulls page and thinking what the hell just happened!? <3

@mdo mdo added this to the v4.0.0-beta milestone Jun 13, 2017
mdo pushed a commit that referenced this issue Jun 13, 2017
…dal-content-xs-box-shadow`, `$modal-content-sm-up-box-shadow`, to `$modal-dialog-margin-y-sm-up`, `$modal-content-box-shadow-xs`, `$modal-content-box-shadow-sm-up`, respectively
mdo pushed a commit that referenced this issue Jun 13, 2017
…bs-active-link-color`, `$nav-tabs-active-link-bg`, `$nav-tabs-active-link-border-color`, `$nav-pills-active-link-color`, `$nav-pills-active-link-bg` to `$nav-link-disabled-color`, `$nav-tabs-link-active-color`, `$nav-tabs-link-active-bg`, `$nav-tabs-link-active-border-color`, `$nav-pills-link-active-color`, `$nav-pills-link-active-bg`, respectively
mdo pushed a commit that referenced this issue Jun 13, 2017
…g`, `$custom-control-disabled-description-color`, `$custom-control-checked-indicator-color`, `$custom-control-checked-indicator-bg`, `$custom-control-checked-indicator-box-shadow`, `$custom-control-focus-indicator-box-shadow`, `$custom-control-active-indicator-color`, `$custom-control-active-indicator-bg`, `$custom-control-active-indicator-box-shadow` to `$custom-control-indicator-disabled-bg`, `$custom-control-description-disabled-color`, `$custom-control-indicator-checked-color`, `$custom-control-indicator-checked-bg`, `$custom-control-indicator-checked-box-shadow`, `$custom-control-indicator-focus-box-shadow`, `$custom-control-indicator-active-color`, `$custom-control-indicator-active-bg`, `$custom-control-indicator-active-box-shadow`, respectively
mdo pushed a commit that referenced this issue Jun 13, 2017
…s`, `$input-border-color-focus`, `$input-box-shadow-focus`, `$input-color-focus`, `$input-color-placeholder` to `$input-disabled-bg`, `$input-focus-bg`, `$input-focus-border-color`, `$input-focus-box-shadow`, `$input-focus-color`, `$input-placeholder-color`, respectively
mdo pushed a commit that referenced this issue Jun 13, 2017
…`$table-bg-hover`, `$table-bg-active`, `$table-inverse-bg-accent`, `$table-inverse-bg-hover` to `$table-cell-padding-sm`, `$table-accent-bg`, `$table-hover-bg`, `$table-active-bg`, `$table-inverse-accent-bg`, `$table-inverse-hover-bg`, respectively (#22414)
@mdo
Copy link
Member

mdo commented Jun 13, 2017

Ready for the next batch lol!

@mdo mdo mentioned this issue Jun 13, 2017
pat270 added a commit to pat270/bootstrap that referenced this issue Jun 13, 2017
…`$custom-checkbox-checked-icon`, `$custom-checkbox-indeterminate-indicator-color`, `$custom-checkbox-indeterminate-icon`, `$custom-radio-radius`, `$custom-radio-checked-icon`, `$custom-select-sm-font-size`, to `$custom-checkbox-border-radius`, `$custom-checkbox-icon-checked`, `$custom-checkbox-indicator-indeterminate-color`, `$custom-checkbox-icon-indeterminate`, `$custom-radio-border-radius`, `$custom-radio-icon-checked`, `$custom-select-font-size-sm` respectively
@mdo mdo closed this as completed in d786737 Jun 14, 2017
pat270 added a commit to pat270/bootstrap that referenced this issue Jun 17, 2017
mdo pushed a commit that referenced this issue Jun 17, 2017
pat270 added a commit to pat270/bootstrap that referenced this issue Jul 14, 2017
… `$custom-checkbox-icon-checked`, `$custom-checkbox-indeterminate-bg`, `$custom-checkbox-icon-indeterminate`, `$custom-checkbox-indeterminate-box-shadow`, `$custom-radio-border-radius`, `$custom-radio-icon-checked` to `$custom-checkbox-indicator-border-radius`, `$custom-checkbox-indicator-icon-checked`, `$custom-checkbox-indicator-indeterminate-bg`, `$custom-checkbox-indicator-icon-indeterminate`, `$custom-checkbox-indicator-indeterminate-box-shadow`, `$custom-radio-indicator-border-radius`, `$custom-radio-indicator-icon-checked`, respectively
mdo pushed a commit that referenced this issue Jul 16, 2017
…ustom-checkbox-icon-checked`, `$custom-checkbox-indeterminate-bg`, `$custom-checkbox-icon-indeterminate`, `$custom-checkbox-indeterminate-box-shadow`, `$custom-radio-border-radius`, `$custom-radio-icon-checked` to `$custom-checkbox-indicator-border-radius`, `$custom-checkbox-indicator-icon-checked`, `$custom-checkbox-indicator-indeterminate-bg`, `$custom-checkbox-indicator-icon-indeterminate`, `$custom-checkbox-indicator-indeterminate-box-shadow`, `$custom-radio-indicator-border-radius`, `$custom-radio-indicator-icon-checked`, respectively
pat270 added a commit to pat270/bootstrap that referenced this issue Jul 31, 2017
pat270 added a commit to pat270/bootstrap that referenced this issue Aug 19, 2017
…cent-bg`, `$table-inverse-hover-bg`, `$table-inverse-border-color`, `$table-inverse-color` to `$table-dark-bg`, `$table-dark-accent-bg`, `$table-dark-hover-bg`, `$table-dark-border-color`, `$table-dark-color` for consistency
mdo pushed a commit that referenced this issue Aug 22, 2017
…-bg`, `$table-inverse-hover-bg`, `$table-inverse-border-color`, `$table-inverse-color` to `$table-dark-bg`, `$table-dark-accent-bg`, `$table-dark-hover-bg`, `$table-dark-border-color`, `$table-dark-color` for consistency
@vvpanchenko
Copy link

vvpanchenko commented Jan 31, 2018

Extended list of changes, faced during upgrade: Bootstrap 4 Alpha 6 -> Bootstrap 4.0.0:

$brand-primary                                  =>      $primary    // theme-color("primary")
$brand-secondary                                =>      $secondary  // theme-color("secondary")
$brand-success                                  =>      $success    // theme-color("success")
$brand-info                                     =>      $info       // theme-color("info")
$brand-warning                                  =>      $warning    // theme-color("warning")
$brand-danger                                   =>      $danger     // theme-color("danger")
$brand-inverse                                  =>      $dark       // theme-color("dark")

$card-border-radius-inner                       =>      $card-inner-border-radius
$card-link-hover-color                          =>      $card-inverse-link-hover-color
$card-columns-sm-up-column-gap                  =>      $card-columns-gap

$carousel-icon-width                            =>      $carousel-control-icon-width

$custom-control-disabled-indicator-bg           =>      $custom-control-indicator-disabled-bg
$custom-control-disabled-description-color      =>      $custom-control-description-disabled-color
$custom-control-checked-indicator-color         =>      $custom-control-indicator-checked-color
$custom-control-checked-indicator-bg            =>      $custom-control-indicator-checked-bg
$custom-control-checked-indicator-box-shadow    =>      $custom-control-indicator-checked-box-shadow
$custom-control-focus-indicator-box-shadow      =>      $custom-control-indicator-focus-box-shadow
$custom-control-active-indicator-color          =>      $custom-control-indicator-active-color
$custom-control-active-indicator-bg             =>      $custom-control-indicator-active-bg
$custom-control-active-indicator-box-shadow     =>      $custom-control-indicator-active-box-shadow
$custom-checkbox-checked-icon                   =>      $custom-checkbox-icon-checked
$custom-checkbox-indeterminate-indicator-color  =>      $custom-checkbox-indicator-indeterminate-color
$custom-checkbox-indeterminate-icon             =>      $custom-checkbox-icon-indeterminate
$custom-radio-checked-icon                      =>      $custom-radio-icon-checked
$custom-select-sm-font-size                     =>      $custom-select-font-size-sm

$dropdown-margin-top                            =>      $dropdown-spacer

$font-size-h1                                   =>      $h1-font-size
$font-size-h2                                   =>      $h2-font-size
$font-size-h3                                   =>      $h3-font-size
$font-size-h4                                   =>      $h4-font-size
$font-size-h5                                   =>      $h5-font-size
$font-size-h6                                   =>      $h6-font-size

$input-bg-disabled                              =>      $input-disabled-bg
$input-bg-focus                                 =>      $input-focus-bg
$input-border-color-focus                       =>      $input-focus-border-color
$input-box-shadow-focus                         =>      $input-focus-box-shadow
$input-color-focus                              =>      $input-focus-color
$input-color-placeholder                        =>      $input-placeholder-color

$list-group-link-color                          =>      $list-group-action-color
$list-group-link-hover-color                    =>      $list-group-action-hover-color
$list-group-link-active-color                   =>      $list-group-action-active-color
$list-group-link-active-bg                      =>      $list-group-action-active-bg

$nav-disabled-link-color                        =>      $nav-link-disabled-color
$nav-tabs-active-link-color                     =>      $nav-tabs-link-active-color
$nav-tabs-active-link-bg                        =>      $nav-tabs-link-active-bg
$nav-tabs-active-link-border-color              =>      $nav-tabs-link-active-border-color
$nav-pills-active-link-color                    =>      $nav-pills-link-active-color
$nav-pills-active-link-bg                       =>      $nav-pills-link-active-bg

$navbar-inverse-color                           =>      $navbar-dark-color
$navbar-inverse-hover-color                     =>      $navbar-dark-hover-color
$navbar-inverse-active-color                    =>      $navbar-dark-active-color
$navbar-inverse-disabled-color                  =>      $navbar-dark-disabled-color
$navbar-inverse-toggler-bg                      =>      $navbar-inverse-toggler-icon-bg
$navbar-inverse-toggler-icon-bg                 =>      $navbar-dark-toggler-icon-bg
$navbar-inverse-toggler-border-color            =>      $navbar-dark-toggler-border-color
$navbar-light-toggler-bg                        =>      $navbar-light-toggler-icon-bg

$modal-dialog-sm-up-margin-y                    =>      $modal-dialog-margin-y-sm-up
$modal-content-xs-box-shadow                    =>      $modal-content-box-shadow-xs
$modal-content-sm-up-box-shadow                 =>      $modal-content-box-shadow-sm-up

$popover-content-color                          =>      $popover-body-color
$popover-content-padding-y                      =>      $popover-body-padding-y
$popover-content-padding-x                      =>      $popover-body-padding-x
$popover-title-bg                               =>      $popover-header-bg
$popover-title-color                            =>      $popover-header-color
$popover-title-padding-y                        =>      $popover-header-padding-y
$popover-title-padding-x                        =>      $popover-header-padding-x

$table-sm-cell-padding                          =>      $table-cell-padding-sm
$table-bg-accent                                =>      $table-accent-bg
$table-bg-hover                                 =>      $table-hover-bg
$table-bg-active                                =>      $table-active-bg

$table-inverse-bg                               =>      $table-dark-bg
$table-inverse-bg-accent                        =>      $table-inverse-accent-bg      =>      $table-dark-accent-bg
$table-inverse-bg-hover                         =>      $table-inverse-hover-bg       =>      $table-dark-hover-bg
$table-inverse-border-color                     =>      $table-dark-border-color
$table-inverse-color                            =>      $table-dark-color

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

No branches or pull requests

4 participants