bootstrap-source/bootstrap-3.0.3/less Kopie/navbar.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
// Navbars
info@54
     3
// --------------------------------------------------
info@54
     4
info@54
     5
info@54
     6
// Wrapper and base class
info@54
     7
//
info@54
     8
// Provide a static navbar from which we expand to create full-width, fixed, and
info@54
     9
// other navbar variations.
info@54
    10
info@54
    11
.navbar {
info@54
    12
  position: relative;
info@54
    13
  min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
info@54
    14
  margin-bottom: @navbar-margin-bottom;
info@54
    15
  border: 1px solid transparent;
info@54
    16
info@54
    17
  // Prevent floats from breaking the navbar
info@54
    18
  .clearfix();
info@54
    19
info@54
    20
  @media (min-width: @grid-float-breakpoint) {
info@54
    21
    border-radius: @navbar-border-radius;
info@54
    22
  }
info@54
    23
}
info@54
    24
info@54
    25
info@54
    26
// Navbar heading
info@54
    27
//
info@54
    28
// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
info@54
    29
// styling of responsive aspects.
info@54
    30
info@54
    31
.navbar-header {
info@54
    32
  .clearfix();
info@54
    33
info@54
    34
  @media (min-width: @grid-float-breakpoint) {
info@54
    35
    float: left;
info@54
    36
  }
info@54
    37
}
info@54
    38
info@54
    39
info@54
    40
// Navbar collapse (body)
info@54
    41
//
info@54
    42
// Group your navbar content into this for easy collapsing and expanding across
info@54
    43
// various device sizes. By default, this content is collapsed when <768px, but
info@54
    44
// will expand past that for a horizontal display.
info@54
    45
//
info@54
    46
// To start (on mobile devices) the navbar links, forms, and buttons are stacked
info@54
    47
// vertically and include a `max-height` to overflow in case you have too much
info@54
    48
// content for the user's viewport.
info@54
    49
info@54
    50
.navbar-collapse {
info@54
    51
  max-height: 340px;
info@54
    52
  overflow-x: visible;
info@54
    53
  padding-right: @navbar-padding-horizontal;
info@54
    54
  padding-left:  @navbar-padding-horizontal;
info@54
    55
  border-top: 1px solid transparent;
info@54
    56
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
info@54
    57
  .clearfix();
info@54
    58
  -webkit-overflow-scrolling: touch;
info@54
    59
info@54
    60
  &.in {
info@54
    61
    overflow-y: auto;
info@54
    62
  }
info@54
    63
info@54
    64
  @media (min-width: @grid-float-breakpoint) {
info@54
    65
    width: auto;
info@54
    66
    border-top: 0;
info@54
    67
    box-shadow: none;
info@54
    68
info@54
    69
    &.collapse {
info@54
    70
      display: block !important;
info@54
    71
      height: auto !important;
info@54
    72
      padding-bottom: 0; // Override default setting
info@54
    73
      overflow: visible !important;
info@54
    74
    }
info@54
    75
info@54
    76
    &.in {
info@54
    77
      overflow-y: visible;
info@54
    78
    }
info@54
    79
info@54
    80
    // Undo the collapse side padding for navbars with containers to ensure
info@54
    81
    // alignment of right-aligned contents.
info@54
    82
    .navbar-fixed-top &,
info@54
    83
    .navbar-static-top &,
info@54
    84
    .navbar-fixed-bottom & {
info@54
    85
      padding-left: 0;
info@54
    86
      padding-right: 0;
info@54
    87
    }
info@54
    88
  }
info@54
    89
}
info@54
    90
info@54
    91
info@54
    92
// Both navbar header and collapse
info@54
    93
//
info@54
    94
// When a container is present, change the behavior of the header and collapse.
info@54
    95
info@54
    96
.container > .navbar-header,
info@54
    97
.container > .navbar-collapse {
info@54
    98
  margin-right: -@navbar-padding-horizontal;
info@54
    99
  margin-left:  -@navbar-padding-horizontal;
info@54
   100
info@54
   101
  @media (min-width: @grid-float-breakpoint) {
info@54
   102
    margin-right: 0;
info@54
   103
    margin-left:  0;
info@54
   104
  }
info@54
   105
}
info@54
   106
info@54
   107
info@54
   108
//
info@54
   109
// Navbar alignment options
info@54
   110
//
info@54
   111
// Display the navbar across the entirety of the page or fixed it to the top or
info@54
   112
// bottom of the page.
info@54
   113
info@54
   114
// Static top (unfixed, but 100% wide) navbar
info@54
   115
.navbar-static-top {
info@54
   116
  z-index: @zindex-navbar;
info@54
   117
  border-width: 0 0 1px;
info@54
   118
info@54
   119
  @media (min-width: @grid-float-breakpoint) {
info@54
   120
    border-radius: 0;
info@54
   121
  }
info@54
   122
}
info@54
   123
info@54
   124
// Fix the top/bottom navbars when screen real estate supports it
info@54
   125
.navbar-fixed-top,
info@54
   126
.navbar-fixed-bottom {
info@54
   127
  position: fixed;
info@54
   128
  right: 0;
info@54
   129
  left: 0;
info@54
   130
  z-index: @zindex-navbar-fixed;
info@54
   131
info@54
   132
  // Undo the rounded corners
info@54
   133
  @media (min-width: @grid-float-breakpoint) {
info@54
   134
    border-radius: 0;
info@54
   135
  }
info@54
   136
}
info@54
   137
.navbar-fixed-top {
info@54
   138
  top: 0;
info@54
   139
  border-width: 0 0 1px;
info@54
   140
}
info@54
   141
.navbar-fixed-bottom {
info@54
   142
  bottom: 0;
info@54
   143
  margin-bottom: 0; // override .navbar defaults
info@54
   144
  border-width: 1px 0 0;
info@54
   145
}
info@54
   146
info@54
   147
info@54
   148
// Brand/project name
info@54
   149
info@54
   150
.navbar-brand {
info@54
   151
  float: left;
info@54
   152
  padding: @navbar-padding-vertical @navbar-padding-horizontal;
info@54
   153
  font-size: @font-size-large;
info@54
   154
  line-height: @line-height-computed;
info@54
   155
info@54
   156
  &:hover,
info@54
   157
  &:focus {
info@54
   158
    text-decoration: none;
info@54
   159
  }
info@54
   160
info@54
   161
  @media (min-width: @grid-float-breakpoint) {
info@54
   162
    .navbar > .container & {
info@54
   163
      margin-left: -@navbar-padding-horizontal;
info@54
   164
    }
info@54
   165
  }
info@54
   166
}
info@54
   167
info@54
   168
info@54
   169
// Navbar toggle
info@54
   170
//
info@54
   171
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
info@54
   172
// JavaScript plugin.
info@54
   173
info@54
   174
.navbar-toggle {
info@54
   175
  position: relative;
info@54
   176
  float: right;
info@54
   177
  margin-right: @navbar-padding-horizontal;
info@54
   178
  padding: 9px 10px;
info@54
   179
  .navbar-vertical-align(34px);
info@54
   180
  background-color: transparent;
info@54
   181
  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
info@54
   182
  border: 1px solid transparent;
info@54
   183
  border-radius: @border-radius-base;
info@54
   184
info@54
   185
  // Bars
info@54
   186
  .icon-bar {
info@54
   187
    display: block;
info@54
   188
    width: 22px;
info@54
   189
    height: 2px;
info@54
   190
    border-radius: 1px;
info@54
   191
  }
info@54
   192
  .icon-bar + .icon-bar {
info@54
   193
    margin-top: 4px;
info@54
   194
  }
info@54
   195
info@54
   196
  @media (min-width: @grid-float-breakpoint) {
info@54
   197
    display: none;
info@54
   198
  }
info@54
   199
}
info@54
   200
info@54
   201
info@54
   202
// Navbar nav links
info@54
   203
//
info@54
   204
// Builds on top of the `.nav` components with it's own modifier class to make
info@54
   205
// the nav the full height of the horizontal nav (above 768px).
info@54
   206
info@54
   207
.navbar-nav {
info@54
   208
  margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;
info@54
   209
info@54
   210
  > li > a {
info@54
   211
    padding-top:    10px;
info@54
   212
    padding-bottom: 10px;
info@54
   213
    line-height: @line-height-computed;
info@54
   214
  }
info@54
   215
info@54
   216
  @media (max-width: @grid-float-breakpoint-max) {
info@54
   217
    // Dropdowns get custom display when collapsed
info@54
   218
    .open .dropdown-menu {
info@54
   219
      position: static;
info@54
   220
      float: none;
info@54
   221
      width: auto;
info@54
   222
      margin-top: 0;
info@54
   223
      background-color: transparent;
info@54
   224
      border: 0;
info@54
   225
      box-shadow: none;
info@54
   226
      > li > a,
info@54
   227
      .dropdown-header {
info@54
   228
        padding: 5px 15px 5px 25px;
info@54
   229
      }
info@54
   230
      > li > a {
info@54
   231
        line-height: @line-height-computed;
info@54
   232
        &:hover,
info@54
   233
        &:focus {
info@54
   234
          background-image: none;
info@54
   235
        }
info@54
   236
      }
info@54
   237
    }
info@54
   238
  }
info@54
   239
info@54
   240
  // Uncollapse the nav
info@54
   241
  @media (min-width: @grid-float-breakpoint) {
info@54
   242
    float: left;
info@54
   243
    margin: 0;
info@54
   244
info@54
   245
    > li {
info@54
   246
      float: left;
info@54
   247
      > a {
info@54
   248
        padding-top:    @navbar-padding-vertical;
info@54
   249
        padding-bottom: @navbar-padding-vertical;
info@54
   250
      }
info@54
   251
    }
info@54
   252
info@54
   253
    &.navbar-right:last-child {
info@54
   254
      margin-right: -@navbar-padding-horizontal;
info@54
   255
    }
info@54
   256
  }
info@54
   257
}
info@54
   258
info@54
   259
info@54
   260
// Component alignment
info@54
   261
//
info@54
   262
// Repurpose the pull utilities as their own navbar utilities to avoid specificity
info@54
   263
// issues with parents and chaining. Only do this when the navbar is uncollapsed
info@54
   264
// though so that navbar contents properly stack and align in mobile.
info@54
   265
info@54
   266
@media (min-width: @grid-float-breakpoint) {
info@54
   267
  .navbar-left  { .pull-left(); }
info@54
   268
  .navbar-right { .pull-right(); }
info@54
   269
}
info@54
   270
info@54
   271
info@54
   272
// Navbar form
info@54
   273
//
info@54
   274
// Extension of the `.form-inline` with some extra flavor for optimum display in
info@54
   275
// our navbars.
info@54
   276
info@54
   277
.navbar-form {
info@54
   278
  margin-left: -@navbar-padding-horizontal;
info@54
   279
  margin-right: -@navbar-padding-horizontal;
info@54
   280
  padding: 10px @navbar-padding-horizontal;
info@54
   281
  border-top: 1px solid transparent;
info@54
   282
  border-bottom: 1px solid transparent;
info@54
   283
  @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
info@54
   284
  .box-shadow(@shadow);
info@54
   285
info@54
   286
  // Mixin behavior for optimum display
info@54
   287
  .form-inline();
info@54
   288
info@54
   289
  .form-group {
info@54
   290
    @media (max-width: @grid-float-breakpoint-max) {
info@54
   291
      margin-bottom: 5px;
info@54
   292
    }
info@54
   293
  }
info@54
   294
info@54
   295
  // Vertically center in expanded, horizontal navbar
info@54
   296
  .navbar-vertical-align(@input-height-base);
info@54
   297
info@54
   298
  // Undo 100% width for pull classes
info@54
   299
  @media (min-width: @grid-float-breakpoint) {
info@54
   300
    width: auto;
info@54
   301
    border: 0;
info@54
   302
    margin-left: 0;
info@54
   303
    margin-right: 0;
info@54
   304
    padding-top: 0;
info@54
   305
    padding-bottom: 0;
info@54
   306
    .box-shadow(none);
info@54
   307
info@54
   308
    // Outdent the form if last child to line up with content down the page
info@54
   309
    &.navbar-right:last-child {
info@54
   310
      margin-right: -@navbar-padding-horizontal;
info@54
   311
    }
info@54
   312
  }
info@54
   313
}
info@54
   314
info@54
   315
info@54
   316
// Dropdown menus
info@54
   317
info@54
   318
// Menu position and menu carets
info@54
   319
.navbar-nav > li > .dropdown-menu {
info@54
   320
  margin-top: 0;
info@54
   321
  .border-top-radius(0);
info@54
   322
}
info@54
   323
// Menu position and menu caret support for dropups via extra dropup class
info@54
   324
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
info@54
   325
  .border-bottom-radius(0);
info@54
   326
}
info@54
   327
info@54
   328
// Right aligned menus need alt position
info@54
   329
.navbar-nav.pull-right > li > .dropdown-menu,
info@54
   330
.navbar-nav > li > .dropdown-menu.pull-right {
info@54
   331
  left: auto;
info@54
   332
  right: 0;
info@54
   333
}
info@54
   334
info@54
   335
info@54
   336
// Buttons in navbars
info@54
   337
//
info@54
   338
// Vertically center a button within a navbar (when *not* in a form).
info@54
   339
info@54
   340
.navbar-btn {
info@54
   341
  .navbar-vertical-align(@input-height-base);
info@54
   342
info@54
   343
  &.btn-sm {
info@54
   344
    .navbar-vertical-align(@input-height-small);
info@54
   345
  }
info@54
   346
  &.btn-xs {
info@54
   347
    .navbar-vertical-align(22);
info@54
   348
  }
info@54
   349
}
info@54
   350
info@54
   351
info@54
   352
// Text in navbars
info@54
   353
//
info@54
   354
// Add a class to make any element properly align itself vertically within the navbars.
info@54
   355
info@54
   356
.navbar-text {
info@54
   357
  .navbar-vertical-align(@line-height-computed);
info@54
   358
info@54
   359
  @media (min-width: @grid-float-breakpoint) {
info@54
   360
    float: left;
info@54
   361
    margin-left: @navbar-padding-horizontal;
info@54
   362
    margin-right: @navbar-padding-horizontal;
info@54
   363
info@54
   364
    // Outdent the form if last child to line up with content down the page
info@54
   365
    &.navbar-right:last-child {
info@54
   366
      margin-right: 0;
info@54
   367
    }
info@54
   368
  }
info@54
   369
}
info@54
   370
info@54
   371
// Alternate navbars
info@54
   372
// --------------------------------------------------
info@54
   373
info@54
   374
// Default navbar
info@54
   375
.navbar-default {
info@54
   376
  background-color: @navbar-default-bg;
info@54
   377
  border-color: @navbar-default-border;
info@54
   378
info@54
   379
  .navbar-brand {
info@54
   380
    color: @navbar-default-brand-color;
info@54
   381
    &:hover,
info@54
   382
    &:focus {
info@54
   383
      color: @navbar-default-brand-hover-color;
info@54
   384
      background-color: @navbar-default-brand-hover-bg;
info@54
   385
    }
info@54
   386
  }
info@54
   387
info@54
   388
  .navbar-text {
info@54
   389
    color: @navbar-default-color;
info@54
   390
  }
info@54
   391
info@54
   392
  .navbar-nav {
info@54
   393
    > li > a {
info@54
   394
      color: @navbar-default-link-color;
info@54
   395
info@54
   396
      &:hover,
info@54
   397
      &:focus {
info@54
   398
        color: @navbar-default-link-hover-color;
info@54
   399
        background-color: @navbar-default-link-hover-bg;
info@54
   400
      }
info@54
   401
    }
info@54
   402
    > .active > a {
info@54
   403
      &,
info@54
   404
      &:hover,
info@54
   405
      &:focus {
info@54
   406
        color: @navbar-default-link-active-color;
info@54
   407
        background-color: @navbar-default-link-active-bg;
info@54
   408
      }
info@54
   409
    }
info@54
   410
    > .disabled > a {
info@54
   411
      &,
info@54
   412
      &:hover,
info@54
   413
      &:focus {
info@54
   414
        color: @navbar-default-link-disabled-color;
info@54
   415
        background-color: @navbar-default-link-disabled-bg;
info@54
   416
      }
info@54
   417
    }
info@54
   418
  }
info@54
   419
info@54
   420
  .navbar-toggle {
info@54
   421
    border-color: @navbar-default-toggle-border-color;
info@54
   422
    &:hover,
info@54
   423
    &:focus {
info@54
   424
      background-color: @navbar-default-toggle-hover-bg;
info@54
   425
    }
info@54
   426
    .icon-bar {
info@54
   427
      background-color: @navbar-default-toggle-icon-bar-bg;
info@54
   428
    }
info@54
   429
  }
info@54
   430
info@54
   431
  .navbar-collapse,
info@54
   432
  .navbar-form {
info@54
   433
    border-color: @navbar-default-border;
info@54
   434
  }
info@54
   435
info@54
   436
  // Dropdown menu items
info@54
   437
  .navbar-nav {
info@54
   438
    // Remove background color from open dropdown
info@54
   439
    > .open > a {
info@54
   440
      &,
info@54
   441
      &:hover,
info@54
   442
      &:focus {
info@54
   443
        background-color: @navbar-default-link-active-bg;
info@54
   444
        color: @navbar-default-link-active-color;
info@54
   445
      }
info@54
   446
    }
info@54
   447
info@54
   448
    @media (max-width: @grid-float-breakpoint-max) {
info@54
   449
      // Dropdowns get custom display when collapsed
info@54
   450
      .open .dropdown-menu {
info@54
   451
        > li > a {
info@54
   452
          color: @navbar-default-link-color;
info@54
   453
          &:hover,
info@54
   454
          &:focus {
info@54
   455
            color: @navbar-default-link-hover-color;
info@54
   456
            background-color: @navbar-default-link-hover-bg;
info@54
   457
          }
info@54
   458
        }
info@54
   459
        > .active > a {
info@54
   460
          &,
info@54
   461
          &:hover,
info@54
   462
          &:focus {
info@54
   463
            color: @navbar-default-link-active-color;
info@54
   464
            background-color: @navbar-default-link-active-bg;
info@54
   465
          }
info@54
   466
        }
info@54
   467
        > .disabled > a {
info@54
   468
          &,
info@54
   469
          &:hover,
info@54
   470
          &:focus {
info@54
   471
            color: @navbar-default-link-disabled-color;
info@54
   472
            background-color: @navbar-default-link-disabled-bg;
info@54
   473
          }
info@54
   474
        }
info@54
   475
      }
info@54
   476
    }
info@54
   477
  }
info@54
   478
info@54
   479
info@54
   480
  // Links in navbars
info@54
   481
  //
info@54
   482
  // Add a class to ensure links outside the navbar nav are colored correctly.
info@54
   483
info@54
   484
  .navbar-link {
info@54
   485
    color: @navbar-default-link-color;
info@54
   486
    &:hover {
info@54
   487
      color: @navbar-default-link-hover-color;
info@54
   488
    }
info@54
   489
  }
info@54
   490
info@54
   491
}
info@54
   492
info@54
   493
// Inverse navbar
info@54
   494
info@54
   495
.navbar-inverse {
info@54
   496
  background-color: @navbar-inverse-bg;
info@54
   497
  border-color: @navbar-inverse-border;
info@54
   498
info@54
   499
  .navbar-brand {
info@54
   500
    color: @navbar-inverse-brand-color;
info@54
   501
    &:hover,
info@54
   502
    &:focus {
info@54
   503
      color: @navbar-inverse-brand-hover-color;
info@54
   504
      background-color: @navbar-inverse-brand-hover-bg;
info@54
   505
    }
info@54
   506
  }
info@54
   507
info@54
   508
  .navbar-text {
info@54
   509
    color: @navbar-inverse-color;
info@54
   510
  }
info@54
   511
info@54
   512
  .navbar-nav {
info@54
   513
    > li > a {
info@54
   514
      color: @navbar-inverse-link-color;
info@54
   515
info@54
   516
      &:hover,
info@54
   517
      &:focus {
info@54
   518
        color: @navbar-inverse-link-hover-color;
info@54
   519
        background-color: @navbar-inverse-link-hover-bg;
info@54
   520
      }
info@54
   521
    }
info@54
   522
    > .active > a {
info@54
   523
      &,
info@54
   524
      &:hover,
info@54
   525
      &:focus {
info@54
   526
        color: @navbar-inverse-link-active-color;
info@54
   527
        background-color: @navbar-inverse-link-active-bg;
info@54
   528
      }
info@54
   529
    }
info@54
   530
    > .disabled > a {
info@54
   531
      &,
info@54
   532
      &:hover,
info@54
   533
      &:focus {
info@54
   534
        color: @navbar-inverse-link-disabled-color;
info@54
   535
        background-color: @navbar-inverse-link-disabled-bg;
info@54
   536
      }
info@54
   537
    }
info@54
   538
  }
info@54
   539
info@54
   540
  // Darken the responsive nav toggle
info@54
   541
  .navbar-toggle {
info@54
   542
    border-color: @navbar-inverse-toggle-border-color;
info@54
   543
    &:hover,
info@54
   544
    &:focus {
info@54
   545
      background-color: @navbar-inverse-toggle-hover-bg;
info@54
   546
    }
info@54
   547
    .icon-bar {
info@54
   548
      background-color: @navbar-inverse-toggle-icon-bar-bg;
info@54
   549
    }
info@54
   550
  }
info@54
   551
info@54
   552
  .navbar-collapse,
info@54
   553
  .navbar-form {
info@54
   554
    border-color: darken(@navbar-inverse-bg, 7%);
info@54
   555
  }
info@54
   556
info@54
   557
  // Dropdowns
info@54
   558
  .navbar-nav {
info@54
   559
    > .open > a {
info@54
   560
      &,
info@54
   561
      &:hover,
info@54
   562
      &:focus {
info@54
   563
        background-color: @navbar-inverse-link-active-bg;
info@54
   564
        color: @navbar-inverse-link-active-color;
info@54
   565
      }
info@54
   566
    }
info@54
   567
info@54
   568
    @media (max-width: @grid-float-breakpoint-max) {
info@54
   569
      // Dropdowns get custom display
info@54
   570
      .open .dropdown-menu {
info@54
   571
        > .dropdown-header {
info@54
   572
          border-color: @navbar-inverse-border;
info@54
   573
        }
info@54
   574
        .divider {
info@54
   575
          background-color: @navbar-inverse-border;
info@54
   576
        }
info@54
   577
        > li > a {
info@54
   578
          color: @navbar-inverse-link-color;
info@54
   579
          &:hover,
info@54
   580
          &:focus {
info@54
   581
            color: @navbar-inverse-link-hover-color;
info@54
   582
            background-color: @navbar-inverse-link-hover-bg;
info@54
   583
          }
info@54
   584
        }
info@54
   585
        > .active > a {
info@54
   586
          &,
info@54
   587
          &:hover,
info@54
   588
          &:focus {
info@54
   589
            color: @navbar-inverse-link-active-color;
info@54
   590
            background-color: @navbar-inverse-link-active-bg;
info@54
   591
          }
info@54
   592
        }
info@54
   593
        > .disabled > a {
info@54
   594
          &,
info@54
   595
          &:hover,
info@54
   596
          &:focus {
info@54
   597
            color: @navbar-inverse-link-disabled-color;
info@54
   598
            background-color: @navbar-inverse-link-disabled-bg;
info@54
   599
          }
info@54
   600
        }
info@54
   601
      }
info@54
   602
    }
info@54
   603
  }
info@54
   604
info@54
   605
  .navbar-link {
info@54
   606
    color: @navbar-inverse-link-color;
info@54
   607
    &:hover {
info@54
   608
      color: @navbar-inverse-link-hover-color;
info@54
   609
    }
info@54
   610
  }
info@54
   611
info@54
   612
}
Impressum Datenschutzerklärung