X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/13d650e2dcbe2467a82253097e10d58dddf9d9d2..bcba0e11296b1c41e95b892e13ee8eff6dfde0fe:/app/assets/stylesheets/common.scss diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index ff16ad66b..bb0e6f0d4 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -15,9 +15,15 @@ fieldset,img { border: 0; } legend { color: #000; } -sup { vertical-align: text-top; } +sup { + vertical-align: super; + font-size: smaller; +} -sub { vertical-align: text-bottom; } +sub { + vertical-align: sub; + font-size: smaller; +} table { border-collapse: collapse; @@ -145,13 +151,14 @@ small, aside { /* Rules for icons */ .icon { - display:inline-block; - vertical-align:top; - width:20px; - height:20px; - background:transparent image-url("sprite.png") no-repeat 0 0; - text-indent:-9999px; - overflow:hidden; + display: inline-block; + vertical-align: top; + width: 20px; + height: 20px; + background: transparent image-url("sprite.png") no-repeat 0 0; + background-image: image-url("sprite.svg"); + text-indent: -9999px; + overflow: hidden; } .icon.search { background-position: 0 0; } @@ -166,9 +173,11 @@ small, aside { .icon.clipboard { background-position: -160px 0; } .icon.link { background-position: -180px 0; } .icon.close { background-position: -200px 0; } +.close-wrap:hover .icon.close, .icon.close:hover { background-position: -200px -20px; } .icon.check { background-position: -220px 0; } .icon.note { background-position: -240px 0; } +.icon.note.grey { background-position: -240px -20px; } .icon.query { background-position: -260px 0; } /* Rules for links */ @@ -222,7 +231,7 @@ table { /* Rules for the header */ -#menu-icon { +#menu-icon { display: none !important; float: right; background: image-url("menu-icon.png") no-repeat; @@ -284,7 +293,7 @@ nav.primary { > li { border-right: $border; float: left; - &:last-child { + &:last-child { border-right: 0; } > a:hover { background: lighten($green, 30%); } @@ -365,12 +374,12 @@ nav.secondary { > li { border-right: $border; float: left; - &:last-child { + &:last-child { border-right: 0; > a { border-radius: 0 $border-radius $border-radius 0; - } + } } &:first-child > a { border-radius: $border-radius 0 0 $border-radius; } &:hover a { background: lighten($darkgrey, 30%); } @@ -438,7 +447,7 @@ nav.secondary { } } -@media only screen and (max-width:960px) { +body.compact { #compact-secondary-nav { display: inline-block; } @@ -466,90 +475,6 @@ nav.secondary { margin-top: 50px; } -/* Rules for bootstrap tooltips */ - -.tooltip { - position: absolute; - display: none; - color: #333; - text-align: left; - font-size: 12px; - max-width: 250px; -} - -.tooltip.in { - opacity: 0.8; - z-index: 1030; - height: auto; - display: block; -} - -.tooltip.top { - margin-top: -10px; - text-align: center; -} - -.tooltip.right { - margin-left: 10px; -} - -.tooltip.bottom { - margin-top: 10px; - text-align: center; -} - -.tooltip.left { - margin-left: -10px; - text-align: right; -} - -.tooltip-inner { - display: inline-block; - padding: 10px; - font-weight: normal; - background-color: white; -} - -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.tooltip.top .tooltip-arrow { - bottom: -5px; - left: 50%; - margin-left: -5px; - border-top-color: white; - border-width: 5px 5px 0; -} - -.tooltip.right .tooltip-arrow { - top: 50%; - left: -5px; - margin-top: -5px; - border-right-color: white; - border-width: 5px 5px 5px 0; -} - -.tooltip.left .tooltip-arrow { - top: 50%; - right: -5px; - margin-top: -5px; - border-left-color: white; - border-width: 5px 0 5px 5px; -} - -.tooltip.bottom .tooltip-arrow { - top: -5px; - left: 50%; - margin-left: -5px; - border-bottom-color: white; - border-width: 0 5px 5px; -} - /* Rules for Leaflet maps */ .leaflet-control .control-button { @@ -566,7 +491,8 @@ nav.secondary { background-color: black; } - &.disabled { + &.disabled, + &.leaflet-disabled { background-color: #333; background-color: rgba(0,0,0,.5); cursor: default; @@ -622,6 +548,13 @@ nav.secondary { background: #fff; font-size: 12px; + > div { + position: relative; + float: left; + clear: both; + width: 100%; + } + h2 { padding: $lineheight $lineheight $lineheight/2; } @@ -632,31 +565,54 @@ nav.secondary { font-size: 13px; } + .close-wrap { + cursor: pointer; + position: absolute; + top: 0; + right: 0; + width: 60px; + height: 60px; + + .icon.close { + pointer-events: none; + position: absolute; + right: 20px; + top: 20px; + } + } + .icon.close { float: right; cursor: pointer; } - } - .welcome { - display: none; + p.error { + background-color: #ff7070; + padding: 10px; + font-weight: bold; + } } .overlay-sidebar #sidebar { position: absolute; z-index: 1000; height: auto; - border-bottom-right-radius: 5px; overflow: hidden; + + #banner, .welcome { display: block; } + #sidebar_content { display: none; } } .welcome { + display: none; + padding-bottom: 5px; + p { padding: $lineheight/2 $lineheight $lineheight; font-size: 110%; @@ -677,6 +633,15 @@ nav.secondary { } } + #banner { + display: none; + + img { + display: block; + width: $sidebarWidth; + } + } + #map { height: 100%; overflow: hidden; @@ -688,6 +653,10 @@ nav.secondary { &.query-disabled { cursor: not-allowed; } + + .leaflet-marker-draggable { + cursor: move; + } } #map-ui { @@ -745,7 +714,7 @@ nav.secondary { margin-bottom: 8px; position: relative; transition: border-color 0.08s ease-in; - + label { position: absolute; top: 0; @@ -757,7 +726,7 @@ nav.secondary { font-size: 16px; text-stroke: 2px #fff; background: rgba(255,255,255,.9); - z-index: 2; // For IE9 + z-index: 1000; input[type="radio"] { display: none; } @@ -789,6 +758,7 @@ nav.secondary { text-decoration: none; background-color: $lightblue; padding: 5px 10px; + border-right: 1px solid #fff; } a:first-child { @@ -797,7 +767,6 @@ nav.secondary { } a:last-child { - border-left: 1px solid #fff; border-radius: 0 4px 4px 0; } @@ -857,6 +826,10 @@ nav.secondary { #attribution { display: none; + + table { + width: 100% + } } .attribution_license, @@ -877,10 +850,10 @@ nav.secondary { padding: $lineheight/2 $lineheight; // background: $offwhite; // border-bottom: 1px solid #ccc; - > .close { + > .close { float: right; margin-top: 2px; - cursor: pointer; + cursor: pointer; } } @@ -898,10 +871,15 @@ nav.secondary { #sidebar { #sidebar_loader, + .search_more { + width: 100%; + margin: $lineheight auto; + } + .loader, .load_more { text-align: center; - margin: $lineheight auto; + margin: auto; width: 40px; display: block; } @@ -990,10 +968,28 @@ header .search_forms, margin: 0px 0px 5px 25px; } + input.routing_go { + min-width: 100px; + float: right; + } + + div.header { + width: 100%; + height: 30px; + } + div.line { width: 100%; margin: 0px 0px 5px 0px; } + + div.loader_copy { + display: none; + + img { + vertical-align: middle; + } + } } /* Rules for the map key which appears in the popout sidebar */ @@ -1030,6 +1026,7 @@ header .search_forms, .search_results_error { color: #f00; + padding: 10px 20px; } /* Rules for routing */ @@ -1046,8 +1043,8 @@ div.direction { height: 20px; background-repeat: no-repeat; } -@for $i from 1 through 17 { -div.direction.i#{$i} { background-position: #{($i)*-20+20}px 0px; } +@for $i from 0 through 25 { +div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; } } p#routing_summary { @@ -1071,7 +1068,7 @@ tr.turn:hover { background: $list-highlight; } .routing_engines, #route_from, #route_to { margin-left: 25px; } -.routing_marker { width: 15px; position: absolute; } +.routing_marker { width: 15px; position: absolute; cursor: move; } /* Rules for entity history */ @@ -1104,6 +1101,15 @@ tr.turn:hover { color: #000; } } + + .comments { + float: right; + color: #999; + } + + .comments-0 { + opacity: 0.5; + } } /* Rules for the browse sidebar */ @@ -1176,6 +1182,7 @@ tr.turn:hover { width: 50%; padding: 6px 10px; word-wrap: break-word; + white-space: pre-wrap; } .browse-tag-k { @@ -1341,7 +1348,7 @@ tr.turn:hover { .content-heading { background: $lightgrey; - + h1 { font-size: 22px; } } @@ -1369,6 +1376,11 @@ tr.turn:hover { .user-terms { .content-body .content-inner { padding: 0; + + .message { + margin-top: 80px; + padding: 20px; + } } } @@ -1622,10 +1634,6 @@ tr.turn:hover { float: left; display: block; } - - ul.secondary-actions { - display: inline-block; - } } .content-heading .hide_unless_logged_in { // hacky selector, better to just add a new class to this div @@ -1674,13 +1682,20 @@ tr.turn:hover { float: left; } + +.diary-subscribe-buttons { + position:relative; + top: -30px; + left: 130px; +} + /* Rules for the log in page */ -#login_openid_buttons { +#login_auth_buttons { margin-bottom: 0; } -#login_openid_buttons li { +#login_auth_buttons li { float: left; padding: $lineheight/4 $lineheight/2; } @@ -1839,19 +1854,39 @@ tr.turn:hover { /* Rules for "flash" notice boxes shown at the top of the content area */ -.error { +.flash { padding: $lineheight; - background-color: #ff7070; -} -.warning { - padding: $lineheight; - background-color: #ffe0cc; -} + &.error { + background-color: #ff7070; + } -.notice { - padding: $lineheight; - background-color: #CBEEA7; + &.warning { + background-color: #ffe0cc; + } + + &.notice { + background-color: #CBEEA7; + } + + div.message { + display: inline-block; + margin-left: $lineheight / 2; + vertical-align: middle; + + p { + margin-top: $lineheight * 0.5; + margin-bottom: $lineheight * 0.5; + + &:first-child { + margin-top: 0px; + } + + &:last-child { + margin-bottom: 0px; + } + } + } } /* Rules for highlighting fields with rails validation errors */ @@ -1930,7 +1965,7 @@ tr.turn:hover { padding-top: $lineheight; border-top: 1px solid $lightgrey; } - .horizontal-list .form-row { + .horizontal-list .form-row { float: left; padding-right: 10px; } @@ -1968,6 +2003,7 @@ input[type="email"], input[type="url"], input[type="password"], textarea { + color: #222; background-color: #fff; border: 1px solid #ccc; padding: 2px 5px; @@ -2497,7 +2533,7 @@ input.richtext_title[type="text"] { .site-welcome, .site-fixthemap { .center { text-align: center; - .sprite { + .sprite { float: none; margin: auto; } @@ -2510,7 +2546,7 @@ input.richtext_title[type="text"] { float: left; } - .icon-list { + .icon-list { padding-bottom: 20px; div { margin-bottom: 10px; @@ -2553,6 +2589,10 @@ input.richtext_title[type="text"] { background-position: -300px 0; } + .sprite.rules { + background-position: -350px 0; + } + .start-mapping { margin: auto; cursor: pointer; @@ -2703,6 +2743,7 @@ input.richtext_title[type="text"] { &.open { background-position: 0px -80px; } &.partners { background-position: 0px -120px; } &.infringement { background-position: 0px -160px; } + &.legal { background-position: -45px -160px; } } } @@ -2713,4 +2754,3 @@ input.richtext_title[type="text"] { display: none; } } -