bootstrap-source/bootstrap-3.0.3/less Kopie/navs.less
author stetrabby <info@trabucchi.de>
Fri, 20 Dec 2013 22:49:16 +0100
changeset 54 0ded9d7748b7
permissions -rwxr-xr-x
initial less based on the pymove3d.css
info@54
     1
//
info@54
     2
// Navs
info@54
     3
// --------------------------------------------------
info@54
     4
info@54
     5
info@54
     6
// Base class
info@54
     7
// --------------------------------------------------
info@54
     8
info@54
     9
.nav {
info@54
    10
  margin-bottom: 0;
info@54
    11
  padding-left: 0; // Override default ul/ol
info@54
    12
  list-style: none;
info@54
    13
  .clearfix();
info@54
    14
info@54
    15
  > li {
info@54
    16
    position: relative;
info@54
    17
    display: block;
info@54
    18
info@54
    19
    > a {
info@54
    20
      position: relative;
info@54
    21
      display: block;
info@54
    22
      padding: @nav-link-padding;
info@54
    23
      &:hover,
info@54
    24
      &:focus {
info@54
    25
        text-decoration: none;
info@54
    26
        background-color: @nav-link-hover-bg;
info@54
    27
      }
info@54
    28
    }
info@54
    29
info@54
    30
    // Disabled state sets text to gray and nukes hover/tab effects
info@54
    31
    &.disabled > a {
info@54
    32
      color: @nav-disabled-link-color;
info@54
    33
info@54
    34
      &:hover,
info@54
    35
      &:focus {
info@54
    36
        color: @nav-disabled-link-hover-color;
info@54
    37
        text-decoration: none;
info@54
    38
        background-color: transparent;
info@54
    39
        cursor: not-allowed;
info@54
    40
      }
info@54
    41
    }
info@54
    42
  }
info@54
    43
info@54
    44
  // Open dropdowns
info@54
    45
  .open > a {
info@54
    46
    &,
info@54
    47
    &:hover,
info@54
    48
    &:focus {
info@54
    49
      background-color: @nav-link-hover-bg;
info@54
    50
      border-color: @link-color;
info@54
    51
    }
info@54
    52
  }
info@54
    53
info@54
    54
  // Nav dividers (deprecated with v3.0.1)
info@54
    55
  //
info@54
    56
  // This should have been removed in v3 with the dropping of `.nav-list`, but
info@54
    57
  // we missed it. We don't currently support this anywhere, but in the interest
info@54
    58
  // of maintaining backward compatibility in case you use it, it's deprecated.
info@54
    59
  .nav-divider {
info@54
    60
    .nav-divider();
info@54
    61
  }
info@54
    62
info@54
    63
  // Prevent IE8 from misplacing imgs
info@54
    64
  //
info@54
    65
  // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
info@54
    66
  > li > a > img {
info@54
    67
    max-width: none;
info@54
    68
  }
info@54
    69
}
info@54
    70
info@54
    71
info@54
    72
// Tabs
info@54
    73
// -------------------------
info@54
    74
info@54
    75
// Give the tabs something to sit on
info@54
    76
.nav-tabs {
info@54
    77
  border-bottom: 1px solid @nav-tabs-border-color;
info@54
    78
  > li {
info@54
    79
    float: left;
info@54
    80
    // Make the list-items overlay the bottom border
info@54
    81
    margin-bottom: -1px;
info@54
    82
info@54
    83
    // Actual tabs (as links)
info@54
    84
    > a {
info@54
    85
      margin-right: 2px;
info@54
    86
      line-height: @line-height-base;
info@54
    87
      border: 1px solid transparent;
info@54
    88
      border-radius: @border-radius-base @border-radius-base 0 0;
info@54
    89
      &:hover {
info@54
    90
        border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;
info@54
    91
      }
info@54
    92
    }
info@54
    93
info@54
    94
    // Active state, and it's :hover to override normal :hover
info@54
    95
    &.active > a {
info@54
    96
      &,
info@54
    97
      &:hover,
info@54
    98
      &:focus {
info@54
    99
        color: @nav-tabs-active-link-hover-color;
info@54
   100
        background-color: @nav-tabs-active-link-hover-bg;
info@54
   101
        border: 1px solid @nav-tabs-active-link-hover-border-color;
info@54
   102
        border-bottom-color: transparent;
info@54
   103
        cursor: default;
info@54
   104
      }
info@54
   105
    }
info@54
   106
  }
info@54
   107
  // pulling this in mainly for less shorthand
info@54
   108
  &.nav-justified {
info@54
   109
    .nav-justified();
info@54
   110
    .nav-tabs-justified();
info@54
   111
  }
info@54
   112
}
info@54
   113
info@54
   114
info@54
   115
// Pills
info@54
   116
// -------------------------
info@54
   117
.nav-pills {
info@54
   118
  > li {
info@54
   119
    float: left;
info@54
   120
info@54
   121
    // Links rendered as pills
info@54
   122
    > a {
info@54
   123
      border-radius: @nav-pills-border-radius;
info@54
   124
    }
info@54
   125
    + li {
info@54
   126
      margin-left: 2px;
info@54
   127
    }
info@54
   128
info@54
   129
    // Active state
info@54
   130
    &.active > a {
info@54
   131
      &,
info@54
   132
      &:hover,
info@54
   133
      &:focus {
info@54
   134
        color: @nav-pills-active-link-hover-color;
info@54
   135
        background-color: @nav-pills-active-link-hover-bg;
info@54
   136
      }
info@54
   137
    }
info@54
   138
  }
info@54
   139
}
info@54
   140
info@54
   141
info@54
   142
// Stacked pills
info@54
   143
.nav-stacked {
info@54
   144
  > li {
info@54
   145
    float: none;
info@54
   146
    + li {
info@54
   147
      margin-top: 2px;
info@54
   148
      margin-left: 0; // no need for this gap between nav items
info@54
   149
    }
info@54
   150
  }
info@54
   151
}
info@54
   152
info@54
   153
info@54
   154
// Nav variations
info@54
   155
// --------------------------------------------------
info@54
   156
info@54
   157
// Justified nav links
info@54
   158
// -------------------------
info@54
   159
info@54
   160
.nav-justified {
info@54
   161
  width: 100%;
info@54
   162
info@54
   163
  > li {
info@54
   164
    float: none;
info@54
   165
     > a {
info@54
   166
      text-align: center;
info@54
   167
      margin-bottom: 5px;
info@54
   168
    }
info@54
   169
  }
info@54
   170
info@54
   171
  > .dropdown .dropdown-menu {
info@54
   172
    top: auto;
info@54
   173
    left: auto;
info@54
   174
  }
info@54
   175
info@54
   176
  @media (min-width: @screen-sm-min) {
info@54
   177
    > li {
info@54
   178
      display: table-cell;
info@54
   179
      width: 1%;
info@54
   180
      > a {
info@54
   181
        margin-bottom: 0;
info@54
   182
      }
info@54
   183
    }
info@54
   184
  }
info@54
   185
}
info@54
   186
info@54
   187
// Move borders to anchors instead of bottom of list
info@54
   188
//
info@54
   189
// Mixin for adding on top the shared `.nav-justified` styles for our tabs
info@54
   190
.nav-tabs-justified {
info@54
   191
  border-bottom: 0;
info@54
   192
info@54
   193
  > li > a {
info@54
   194
    // Override margin from .nav-tabs
info@54
   195
    margin-right: 0;
info@54
   196
    border-radius: @border-radius-base;
info@54
   197
  }
info@54
   198
info@54
   199
  > .active > a,
info@54
   200
  > .active > a:hover,
info@54
   201
  > .active > a:focus {
info@54
   202
    border: 1px solid @nav-tabs-justified-link-border-color;
info@54
   203
  }
info@54
   204
info@54
   205
  @media (min-width: @screen-sm-min) {
info@54
   206
    > li > a {
info@54
   207
      border-bottom: 1px solid @nav-tabs-justified-link-border-color;
info@54
   208
      border-radius: @border-radius-base @border-radius-base 0 0;
info@54
   209
    }
info@54
   210
    > .active > a,
info@54
   211
    > .active > a:hover,
info@54
   212
    > .active > a:focus {
info@54
   213
      border-bottom-color: @nav-tabs-justified-active-link-border-color;
info@54
   214
    }
info@54
   215
  }
info@54
   216
}
info@54
   217
info@54
   218
info@54
   219
// Tabbable tabs
info@54
   220
// -------------------------
info@54
   221
info@54
   222
// Hide tabbable panes to start, show them when `.active`
info@54
   223
.tab-content {
info@54
   224
  > .tab-pane {
info@54
   225
    display: none;
info@54
   226
  }
info@54
   227
  > .active {
info@54
   228
    display: block;
info@54
   229
  }
info@54
   230
}
info@54
   231
info@54
   232
info@54
   233
// Dropdowns
info@54
   234
// -------------------------
info@54
   235
info@54
   236
// Specific dropdowns
info@54
   237
.nav-tabs .dropdown-menu {
info@54
   238
  // make dropdown border overlap tab border
info@54
   239
  margin-top: -1px;
info@54
   240
  // Remove the top rounded corners here since there is a hard edge above the menu
info@54
   241
  .border-top-radius(0);
info@54
   242
}
Impressum Datenschutzerklärung