From 315dbadb23120edb2bf316405abb6c7f21f52626 Mon Sep 17 00:00:00 2001 From: verpixelt Date: Tue, 17 Nov 2015 11:07:34 +0100 Subject: [PATCH] Reduce nesting, rewrite selectors --- src/main/less/screen.less | 199 +++++++++++++++++++------------------- 1 file changed, 98 insertions(+), 101 deletions(-) diff --git a/src/main/less/screen.less b/src/main/less/screen.less index 356fbb9a..6e7a26b7 100644 --- a/src/main/less/screen.less +++ b/src/main/less/screen.less @@ -1,147 +1,144 @@ + + @import 'src/main/less/highlight_default.less'; @import 'src/main/less/specs.less'; @import 'src/main/less/auth.less'; .swagger-section { -.access { - float: right; -} + .access { float: right; } -.auth { - float: right; -} + .auth { float: right; } -.api-ic { + .api-ic { height: 18px; vertical-align: middle; display: inline-block; background: url(../images/explorer_icons.png) no-repeat; - .api_information_panel { - position: relative; - margin-top: 20px; - margin-left: -5px; - background: #FFF; - border: 1px solid #ccc; - border-radius: 5px; - display: none; - font-size: 13px; - max-width: 300px; - line-height: 30px; - color: black; - padding: 5px; - p { - .api-msg-enabled { - color: green; - } - .api-msg-disabled { - color: red; - } - } - } -} + } -.api-ic:hover { - .api_information_panel { - position: absolute; - display: block; - } -} + .api-ic .api_information_panel { + position: relative; + margin-top: 20px; + margin-left: -5px; + background: #FFF; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + max-width: 300px; + line-height: 30px; + color: black; + padding: 5px; + } -.ic-info { + .api-ic .api_information_panel p .api-msg-enabled { color: green; } + .api-ic .api_information_panel p .api-msg-disabled { color: red; } + + .api-ic:hover .api_information_panel { + position: absolute; + display: block; + } + + .ic-info { background-position: 0 0; width: 18px; margin-top: -6px; margin-left: 4px; -} -.ic-warning { + } + + .ic-warning { background-position: -60px 0; width: 18px; margin-top: -6px; margin-left: 4px; -} -.ic-error { + } + + .ic-error { background-position: -30px 0; width: 18px; margin-top: -6px; margin-left: 4px; -} -.ic-off { + } + + .ic-off { background-position: -90px 0; width: 58px; margin-top: -4px; cursor: pointer; -} -.ic-on { + } + + .ic-on { background-position: -160px 0; width: 58px; margin-top: -4px; cursor: pointer; -} + } -#header { + #header { background-color: #89bf04; padding: 14px; - a#logo { - font-size: 1.5em; - font-weight: bold; - text-decoration: none; - background: transparent url(../images/logo_small.png) no-repeat left center; - padding: 20px 0 20px 40px; - color: white; - } - form#api_selector { - display: block; - clear: none; - float: right; - .input { - display: block; - clear: none; - float: left; - margin: 0 10px 0 0; - input#input_apiKey { - width: 200px; - } - input#input_baseUrl { - width: 400px; - } - a#explore { - display: block; - text-decoration: none; - font-weight: bold; - padding: 6px 8px; - font-size: 0.9em; - color: white; - background-color: #547f00; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - -o-border-radius: 4px; - -ms-border-radius: 4px; - -khtml-border-radius: 4px; - border-radius: 4px; - } - a#explore:hover { - background-color: #547f00; - } - input { - font-size: 0.9em; - padding: 3px; - margin: 0; - } - } - } -} + } -#content_message { + #input_baseUrl { width: 400px; } + + #api_selector { + display: block; + clear: none; + float: right; + } + + #api_selector .input { + display: block; + clear: none; + float: left; + margin: 0 10px 0 0; + } + + #api_selector input { + font-size: 0.9em; + padding: 3px; + margin: 0; + } + + #input_apiKey { width: 200px; } + + #explore { + display: block; + text-decoration: none; + font-weight: bold; + padding: 6px 8px; + font-size: 0.9em; + color: white; + background-color: #547f00; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + -ms-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + + &:hover { background-color: #547f00; } + } + + #header a#logo { + font-size: 1.5em; + font-weight: bold; + text-decoration: none; + background: transparent url(../images/logo_small.png) no-repeat left center; + padding: 20px 0 20px 40px; + color: white; + } + + #content_message { margin: 10px 15px; font-style: italic; color: #999999; -} + } -#message-bar { + #message-bar { min-height: 30px; text-align: center; padding-top: 10px; -} - + } }