From 315dbadb23120edb2bf316405abb6c7f21f52626 Mon Sep 17 00:00:00 2001 From: verpixelt Date: Tue, 17 Nov 2015 11:07:34 +0100 Subject: [PATCH 1/4] 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; -} - + } } From 0a7fa0cd8283c744ff7b7b3d4b6beff35b489710 Mon Sep 17 00:00:00 2001 From: verpixelt Date: Tue, 17 Nov 2015 11:09:49 +0100 Subject: [PATCH 2/4] Remove element selector --- src/main/less/screen.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/less/screen.less b/src/main/less/screen.less index 6e7a26b7..af0edd1c 100644 --- a/src/main/less/screen.less +++ b/src/main/less/screen.less @@ -121,7 +121,7 @@ &:hover { background-color: #547f00; } } - #header a#logo { + #header #logo { font-size: 1.5em; font-weight: bold; text-decoration: none; From e6336a3f5ef2fbae99b9eac5a91d6ef682b83e4b Mon Sep 17 00:00:00 2001 From: verpixelt Date: Tue, 17 Nov 2015 12:43:18 +0100 Subject: [PATCH 3/4] Rewrite Less file --- src/main/less/auth.less | 93 ++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 52 deletions(-) diff --git a/src/main/less/auth.less b/src/main/less/auth.less index 5fbe0ef1..b4de1adc 100644 --- a/src/main/less/auth.less +++ b/src/main/less/auth.less @@ -1,83 +1,72 @@ + + .swagger-section { -.title { - font-style: bold; -} + .title { font-style: bold; } -.secondary_form { - display: none; -} + .secondary_form { display: none; } -.main_image { - display: block; - margin-left: auto; - margin-right: auto; -} + .main_image { + display: block; + margin-left: auto; + margin-right: auto; + } -.oauth_body { - margin-left: 100px; - margin-right: 100px; -} + .oauth_body { + margin-left: 100px; + margin-right: 100px; + } -.oauth_submit { - text-align: center; -} + .oauth_submit { text-align: center; } -.api-popup-dialog { - z-index: 10000; - position: absolute; - width: 500px; - background: #FFF; - padding: 20px; - border: 1px solid #ccc; - border-radius: 5px; - display: none; - font-size: 13px; - color: #777; + .api-popup-dialog { + z-index: 10000; + position: absolute; + width: 500px; + background: #FFF; + padding: 20px; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + color: #777; + } - .api-popup-title{ + .api-popup-dialog .api-popup-title { font-size: 24px; padding: 10px 0; } - .api-popup-title{ + .api-popup-dialog .api-popup-title { font-size: 24px; padding: 10px 0; } - - p.error-msg { + .api-popup-dialog .error-msg { padding-left: 5px; padding-bottom: 5px; } - button.api-popup-authbtn { - height: 30px; - } - button.api-popup-cancel { - height: 30px; - } -} + .api-popup-dialog .api-popup-authbtn { height: 30px; } -.api-popup-scopes { - padding: 10px 20px; + .api-popup-dialog .api-popup-cancel { height: 30px; } - li { + .api-popup-scopes { padding: 10px 20px; } + + .api-popup-scopes li { padding: 5px 0; line-height: 20px; } - .api-scope-desc { - padding-left: 20px; - font-style: italic; - } - li input { + .api-popup-scopes li input { position: relative; top: 2px; } -} -.api-popup-actions { - padding-top: 10px; -} + .api-popup-scopes .api-scope-desc { + padding-left: 20px; + font-style: italic; + } + + .api-popup-actions { padding-top: 10px; } } From 20c2454438aef79ef8574aa1d0e1e91357da0781 Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Fri, 27 Nov 2015 18:21:04 -0800 Subject: [PATCH 4/4] rebuilt after merge with master --- dist/css/print.css | 14 +++++----- dist/css/screen.css | 52 ++++++++++++++++++------------------ src/main/html/css/print.css | 14 +++++----- src/main/html/css/screen.css | 52 ++++++++++++++++++------------------ 4 files changed, 66 insertions(+), 66 deletions(-) diff --git a/dist/css/print.css b/dist/css/print.css index c90e9f56..3523f7e2 100644 --- a/dist/css/print.css +++ b/dist/css/print.css @@ -1124,14 +1124,14 @@ font-size: 24px; padding: 10px 0; } -.swagger-section .api-popup-dialog p.error-msg { +.swagger-section .api-popup-dialog .error-msg { padding-left: 5px; padding-bottom: 5px; } -.swagger-section .api-popup-dialog button.api-popup-authbtn { +.swagger-section .api-popup-dialog .api-popup-authbtn { height: 30px; } -.swagger-section .api-popup-dialog button.api-popup-cancel { +.swagger-section .api-popup-dialog .api-popup-cancel { height: 30px; } .swagger-section .api-popup-scopes { @@ -1141,14 +1141,14 @@ padding: 5px 0; line-height: 20px; } -.swagger-section .api-popup-scopes .api-scope-desc { - padding-left: 20px; - font-style: italic; -} .swagger-section .api-popup-scopes li input { position: relative; top: 2px; } +.swagger-section .api-popup-scopes .api-scope-desc { + padding-left: 20px; + font-style: italic; +} .swagger-section .api-popup-actions { padding-top: 10px; } diff --git a/dist/css/screen.css b/dist/css/screen.css index 96f54548..a37146db 100644 --- a/dist/css/screen.css +++ b/dist/css/screen.css @@ -1124,14 +1124,14 @@ font-size: 24px; padding: 10px 0; } -.swagger-section .api-popup-dialog p.error-msg { +.swagger-section .api-popup-dialog .error-msg { padding-left: 5px; padding-bottom: 5px; } -.swagger-section .api-popup-dialog button.api-popup-authbtn { +.swagger-section .api-popup-dialog .api-popup-authbtn { height: 30px; } -.swagger-section .api-popup-dialog button.api-popup-cancel { +.swagger-section .api-popup-dialog .api-popup-cancel { height: 30px; } .swagger-section .api-popup-scopes { @@ -1141,14 +1141,14 @@ padding: 5px 0; line-height: 20px; } -.swagger-section .api-popup-scopes .api-scope-desc { - padding-left: 20px; - font-style: italic; -} .swagger-section .api-popup-scopes li input { position: relative; top: 2px; } +.swagger-section .api-popup-scopes .api-scope-desc { + padding-left: 20px; + font-style: italic; +} .swagger-section .api-popup-actions { padding-top: 10px; } @@ -1222,32 +1222,29 @@ background-color: #89bf04; padding: 14px; } -.swagger-section #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; +.swagger-section #input_baseUrl { + width: 400px; } -.swagger-section #header form#api_selector { +.swagger-section #api_selector { display: block; clear: none; float: right; } -.swagger-section #header form#api_selector .input { +.swagger-section #api_selector .input { display: block; clear: none; float: left; margin: 0 10px 0 0; } -.swagger-section #header form#api_selector .input input#input_apiKey { +.swagger-section #api_selector input { + font-size: 0.9em; + padding: 3px; + margin: 0; +} +.swagger-section #input_apiKey { width: 200px; } -.swagger-section #header form#api_selector .input input#input_baseUrl { - width: 400px; -} -.swagger-section #header form#api_selector .input a#explore { +.swagger-section #explore { display: block; text-decoration: none; font-weight: bold; @@ -1262,13 +1259,16 @@ -khtml-border-radius: 4px; border-radius: 4px; } -.swagger-section #header form#api_selector .input a#explore:hover { +.swagger-section #explore:hover { background-color: #547f00; } -.swagger-section #header form#api_selector .input input { - font-size: 0.9em; - padding: 3px; - margin: 0; +.swagger-section #header #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; } .swagger-section #content_message { margin: 10px 15px; diff --git a/src/main/html/css/print.css b/src/main/html/css/print.css index c90e9f56..3523f7e2 100644 --- a/src/main/html/css/print.css +++ b/src/main/html/css/print.css @@ -1124,14 +1124,14 @@ font-size: 24px; padding: 10px 0; } -.swagger-section .api-popup-dialog p.error-msg { +.swagger-section .api-popup-dialog .error-msg { padding-left: 5px; padding-bottom: 5px; } -.swagger-section .api-popup-dialog button.api-popup-authbtn { +.swagger-section .api-popup-dialog .api-popup-authbtn { height: 30px; } -.swagger-section .api-popup-dialog button.api-popup-cancel { +.swagger-section .api-popup-dialog .api-popup-cancel { height: 30px; } .swagger-section .api-popup-scopes { @@ -1141,14 +1141,14 @@ padding: 5px 0; line-height: 20px; } -.swagger-section .api-popup-scopes .api-scope-desc { - padding-left: 20px; - font-style: italic; -} .swagger-section .api-popup-scopes li input { position: relative; top: 2px; } +.swagger-section .api-popup-scopes .api-scope-desc { + padding-left: 20px; + font-style: italic; +} .swagger-section .api-popup-actions { padding-top: 10px; } diff --git a/src/main/html/css/screen.css b/src/main/html/css/screen.css index 96f54548..a37146db 100644 --- a/src/main/html/css/screen.css +++ b/src/main/html/css/screen.css @@ -1124,14 +1124,14 @@ font-size: 24px; padding: 10px 0; } -.swagger-section .api-popup-dialog p.error-msg { +.swagger-section .api-popup-dialog .error-msg { padding-left: 5px; padding-bottom: 5px; } -.swagger-section .api-popup-dialog button.api-popup-authbtn { +.swagger-section .api-popup-dialog .api-popup-authbtn { height: 30px; } -.swagger-section .api-popup-dialog button.api-popup-cancel { +.swagger-section .api-popup-dialog .api-popup-cancel { height: 30px; } .swagger-section .api-popup-scopes { @@ -1141,14 +1141,14 @@ padding: 5px 0; line-height: 20px; } -.swagger-section .api-popup-scopes .api-scope-desc { - padding-left: 20px; - font-style: italic; -} .swagger-section .api-popup-scopes li input { position: relative; top: 2px; } +.swagger-section .api-popup-scopes .api-scope-desc { + padding-left: 20px; + font-style: italic; +} .swagger-section .api-popup-actions { padding-top: 10px; } @@ -1222,32 +1222,29 @@ background-color: #89bf04; padding: 14px; } -.swagger-section #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; +.swagger-section #input_baseUrl { + width: 400px; } -.swagger-section #header form#api_selector { +.swagger-section #api_selector { display: block; clear: none; float: right; } -.swagger-section #header form#api_selector .input { +.swagger-section #api_selector .input { display: block; clear: none; float: left; margin: 0 10px 0 0; } -.swagger-section #header form#api_selector .input input#input_apiKey { +.swagger-section #api_selector input { + font-size: 0.9em; + padding: 3px; + margin: 0; +} +.swagger-section #input_apiKey { width: 200px; } -.swagger-section #header form#api_selector .input input#input_baseUrl { - width: 400px; -} -.swagger-section #header form#api_selector .input a#explore { +.swagger-section #explore { display: block; text-decoration: none; font-weight: bold; @@ -1262,13 +1259,16 @@ -khtml-border-radius: 4px; border-radius: 4px; } -.swagger-section #header form#api_selector .input a#explore:hover { +.swagger-section #explore:hover { background-color: #547f00; } -.swagger-section #header form#api_selector .input input { - font-size: 0.9em; - padding: 3px; - margin: 0; +.swagger-section #header #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; } .swagger-section #content_message { margin: 10px 15px;