Changeset - a0da4cb92760
[Not reviewed]
default
0 1 0
domruf - 8 years ago 2017-10-29 23:27:19
dominikruf@gmail.com
less: clean up select2 style

- make select2 as big as form-controls
- move border: 0 to new .select2-container block
1 file changed with 15 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/public/less/kallithea-select2.less
Show inline comments
 
.branch-switcher,
 
.repo-switcher {
 
  .select2-choice {
 
    height: 100%;
 
    padding: 0;
 
  }
 
  .select2-container,
 
  .select2-choice,
 
  .select2-choice > span {
 
    background: transparent !important;
 
    border: 0 !important;
 
    box-shadow: none !important;
 
    color: #FFFFFF !important;
 
  }
 
  .select2-choice .select2-chosen {
 
    margin-right: 0;
 
    line-height: @line-height-computed;
 
  }
 
  .select2-arrow {
 
    display: none !important;
 
  }
 
}
 
.select2-container.form-control {
 
  padding: 0;
 
  border: none;
 
}
 
.branch-switcher-dropdown.select2-drop.select2-drop-active,
 
.repo-switcher-dropdown.select2-drop.select2-drop-active {
 
  box-shadow: none;
 
  background-color: #577632;
 
  border: 1px solid rgba(0, 0, 0, 0.15);
 
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
 
}
 
.repo-switcher-dropdown.select2-drop.select2-drop-active {
 
  color: black;
 
  .select2-result.select2-highlighted {
 
    color: @navbar-inverse-link-hover-color;
 
    background-color: @navbar-inverse-link-hover-bg;
 
  }
 
  .select2-result-label {
 
    color: white;
 
  }
 
}
 

	
 
/* fix padding of select2 entries in navbar to match .navbar-nav > li > a */
 
.navbar-inverse {
 
  .navbar-nav {
 
    > li > .select2-container a {
 
      padding: @nav-link-padding;
 
      padding-top:    @navbar-padding-vertical;
 
      padding-bottom: @navbar-padding-vertical;
 
    }
 
    li.active > .select2-container,
 
    .select2-container:hover,
 
    .select2-container:focus,
 
    .select2-container-active {
 
      color: @navbar-inverse-link-hover-color;
 
      background-color: @navbar-inverse-link-hover-bg;
 
    }
 
  }
 
}
 

	
 
.select2-container {
 
  /* select2 already has border and padding, remove bootstrap form-control border and padding */
 
  &.form-control {
 
    border: 0;
 
    padding: 0;
 
  }
 
  /* make select2 as big as form-controls */
 
  .select2-choice {
 
    height: 100%;
 
  }
 
  .select2-chosen {
 
    line-height: @input-height-base - 2; /* subtract border width */
 
  }
 
}
 

	
 
/* highlight query in user autocomplete search results */
 
.select2-results .match {
 
  font-weight: 700;
 
}
 

	
 
/* fix select2 input style if input-sm is used */
 
.select2-container.input-sm input {
 
  .input-sm;
 
}
0 comments (0 inline, 0 general)