Changeset 115267 in spip-zone


Ignore:
Timestamp:
May 7, 2019, 3:46:07 PM (2 weeks ago)
Author:
cedric@…
Message:

Fix button & form : la combinaison du :not(.btn-link) et des .btn:not() cibles par le @extend cassaient certains selecteurs
Cette variante est plus saine et evite de produire plein de code superflu par combinaisons multiples des selecteurs css etendus

Location:
_plugins_/bootstrap/trunk/bootstrap2spip/css
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/bootstrap/trunk/bootstrap2spip/css/_buttons.scss

    r114879 r115267  
    11@import "bootstrap/css/_buttons";
     2
     3// for simple .btn extension : copy of native .btn to avoid an expensive @extend .btn
     4%btn-base {
     5  display: inline-block;
     6  font-family: $btn-font-family;
     7  font-weight: $btn-font-weight;
     8  color: $body-color;
     9  text-align: center;
     10  vertical-align: middle;
     11  user-select: none;
     12  background-color: transparent;
     13  border: $btn-border-width solid transparent;
     14  @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
     15  @include transition($btn-transition);
     16
     17  @include hover {
     18    color: $body-color;
     19    text-decoration: none;
     20  }
     21
     22  &:focus,
     23  &.focus {
     24    outline: 0;
     25    box-shadow: $btn-focus-box-shadow;
     26  }
     27
     28  // Disabled comes first so active can properly restyle
     29  &.disabled,
     30  &:disabled {
     31    opacity: $btn-disabled-opacity;
     32    @include box-shadow(none);
     33  }
     34
     35  &:not(:disabled):not(.disabled):active,
     36  &:not(:disabled):not(.disabled).active {
     37    @include box-shadow($btn-active-box-shadow);
     38
     39    &:focus {
     40      @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
     41    }
     42  }
     43}
    244
    345/* boutons admin forum */
    446.boutons.modererforum .submit {
    5   @extend .btn;
     47  @extend %btn-base;
    648  @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
    749  font-size: 0.7rem;
  • _plugins_/bootstrap/trunk/bootstrap2spip/css/_forms.scss

    r114917 r115267  
    5353
    5454input.submit, .formulaire_spip button.submit:not(.btn-link) {
    55         @extend .btn;
    56 }
     55        @extend %btn-base;
     56}
     57
    5758body {
    5859        input.submit, .formulaire_spip button.submit:not(.btn-link) {
Note: See TracChangeset for help on using the changeset viewer.