X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/290d2a23085281e68fc3c21e9d1229f64bb84d38..6d9434e14d92a143d0bebe9cbadac72d1f2aa035:/app/assets/stylesheets/common.scss diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 5fc4da8d8..3055d87af 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1,5 +1,5 @@ @import "parameters"; -@import "bootstrap-custom"; +@import "bootstrap"; /* Styles common to large and small screens */ @@ -92,25 +92,6 @@ a { } } -/* General styles for tables */ - -table { - width: 100%; - margin-bottom: $lineheight; - th, td { - text-align: left; - padding: $lineheight/4; - line-height: $lineheight; - } - th { - font-weight: 600; - vertical-align: top; - } - td { - vertical-align: middle; - } -} - /* Utility for de-emphasizing content */ .deemphasize { @@ -190,6 +171,32 @@ nav.primary { .btn-outline-primary { @include button-outline-variant($green, $white); } + + .disabled { + .btn-outline-primary { + color: $grey; + cursor: default; + + .caret { + border-top-color: $grey; + } + + &:hover { + background-color: lighten($green, 30%); + } + } + } + + // Small tweaks to the toggle to stop the primary colour showing through + // when the menu is shown + .show > .btn-outline-primary.dropdown-toggle { + background-color: $green; + border-color: $green; + + &:focus { + box-shadow: 0 0 0 0.2rem fade-out($green, 0.5); + } + } } nav.secondary { @@ -214,8 +221,20 @@ nav.secondary { .user-menu { .btn-outline-secondary { @include button-outline-variant($darkgrey, $darkgrey, white, $darkgrey); - // @include button-outline-variant($grey, $grey, white, $grey); border-color: $grey; + &:hover { + border-color: $grey; + } + &:focus { + background-color: white; + box-shadow: none; + } + } + &.show .btn-outline-secondary { + background-color: white; + &:focus { + box-shadow: none; + } } } @@ -240,6 +259,15 @@ nav.secondary { } } +nav.primary, nav.secondary { + .dropdown-item { + &:hover, &:active { + background-color: $green; + color: white; + } + } +} + #compact-secondary-nav { display: none; } @@ -726,6 +754,7 @@ header .search_forms, input[type=text].overflow { border-right: none; + border-radius: 3px 0px 0px 3px; } input:focus { @@ -825,9 +854,6 @@ header .search_forms, margin-left: auto; margin-right: auto; } - td { - padding: 0 $lineheight/4 $lineheight/4 $lineheight/4; - } } /* Rules for search sidebar */ @@ -855,6 +881,7 @@ header .search_forms, padding: 5px 20px 10px 15px; width: 100%; border-collapse: separate; + border-spacing: 0; } div.direction { @@ -979,6 +1006,8 @@ tr.turn:hover { border-radius: 3px; table-layout: fixed; border-collapse: separate; + border-spacing: 0; + width: 100%; th, td { border-bottom: 1px solid $grey; @@ -1167,16 +1196,6 @@ tr.turn:hover { background: $lightgrey; } -.content-body { - h1, h2, h3, p, ul, ol { - margin-bottom: $lineheight; - } - - h1, h2, h3 { - margin-top: $lineheight/2; - } -} - .content-inner { position: relative; max-width: 900px; @@ -1250,18 +1269,6 @@ tr.turn:hover { float: right; } -/* Rules for the trace list shown by the traces tab etc */ - -#trace_list { - border-width: 0px; - text-align: right; - - .trace_summary { - font-size: 12px; - color: gray; - } -} - /* Rules for the new trace form */ #new_trace { @@ -1289,21 +1296,14 @@ tr.turn:hover { /* Rules for the user profile page */ #userinformation { - min-height: 100px; .userinformation-inner { float: left; } - h2 { - margin-top: 0; - } .user-description { width: 100%; clear: both; } - .deemphasize { - margin: 0; - } } .admin-user-info small { @@ -1574,43 +1574,21 @@ tr.turn:hover { /* Rules for messages pages */ .messages { - width: 100%; - border: 1px solid $grey; - input[type="submit"] { margin: auto; } - tbody tr { - border-top: 1px solid $grey; - } .inbox-row { background: $offwhite; } .inbox-row-unread { - background:#CBEEA7; + background: #CBEEA7; } .right { float: right; } - - tr td, - tr th { - padding: $lineheight/4; - } - p:last-child, - h2:last-child, - h3:last-child, - ol:last-child, - ul:last-child { - margin-bottom:0; - } - tr td { - height: 30px; - border-right: 1px solid $lightgrey; - } } .inbox-row .inbox-mark-read { @@ -1645,17 +1623,6 @@ tr.turn:hover { display: none; } -.messages-show .message-buttons { - margin-top: $lineheight; - margin-bottom: $lineheight * 1.5; - padding-top: $lineheight; - border-top: 1px solid $lightgrey; -} - -.messages-show .buttons .mark-unread-button { - border-radius: 0; -} - /* Rules for "flash" notice boxes shown at the top of the content area */ .flash { @@ -1998,16 +1965,11 @@ a.button { } } -/* Rules for doing distinct colour of alternate table rows */ - -.table0, -.item0 { - background: $offwhite; -} +/* Customise the background colour of striped tables */ -.table1, -.item1 { - background: #fff; +.table-striped > tbody > tr:nth-child(2n+1) > td, +.table-striped > tbody > tr:nth-child(2n+1) > th { + background-color: $offwhite; } /* Rules for OpenID logo */ @@ -2147,15 +2109,7 @@ input.richtext_title[type="text"] { .note_list { tr.creator { - background-color: $lightgrey; - } - - td { - padding: 3px; - } - - p { - margin-bottom: 0px; + background-color: $offwhite; } } @@ -2363,9 +2317,3 @@ input.richtext_title[type="text"] { background: $lightgrey; opacity: 0.7; } - -.issues-list { - td:nth-child(2) { - white-space: nowrap; - } -}