From b9d894985c7f7c3843a2d75ae4d58fb7f4b17d14 Mon Sep 17 00:00:00 2001 From: Diana Whitten Date: Tue, 22 Dec 2015 09:42:14 -0700 Subject: [PATCH] Clean up horizon.scss - _debt.scss A major part of the css reorg is a better organization of the css styles themselves. horizon.scss should be a global import level file. _debt.scss: Styles that need to be researched and/or removed or moved. It's difficult to tell at this time if they are still used. Change-Id: I68bc26a2cff081c258a2ed9320dc05a1b73c3279 Partially-Implements: blueprint horizon-theme-css-reorg --- .../static/dashboard/scss/_debt.scss | 269 ++++++++++++++++++ .../static/dashboard/scss/horizon.scss | 264 +---------------- 2 files changed, 272 insertions(+), 261 deletions(-) create mode 100644 openstack_dashboard/static/dashboard/scss/_debt.scss diff --git a/openstack_dashboard/static/dashboard/scss/_debt.scss b/openstack_dashboard/static/dashboard/scss/_debt.scss new file mode 100644 index 0000000000..6a4bad1190 --- /dev/null +++ b/openstack_dashboard/static/dashboard/scss/_debt.scss @@ -0,0 +1,269 @@ +/* The styles in this file need to be researched and/or removed when possible */ + +#create_container_form .modal-footer { + margin-top: 190px; +} + +#usage { + margin-bottom: 25px; + height: 125px; +} + +#actions.single { + width: 90px; +} + +ul { + list-style: none; + margin: 0; +} + +// Disc-styled list. This list should be used to build bullet-items lists. +.list-bullet { + list-style: disc; +} + +dt { + font-weight: bold; +} + +.static_page { + float: left; //should be removed (jtomasek) + background-color: $body-bg; //should be removed (jtomasek) + > form { + margin-bottom: 0; + } +} + +// should be removed and replaced by row + col-sm-6 in template +.left, .right { + @extend .col-sm-6; +} + +// Fixes issue with bootstrap positioning of modal container +// Note (hurgleburgler) Is this really still an issue? Further research needed +.modal { + top: 0 !important; +} + +// Note (hurgleburgler) Whatever is using these styles should be using alerts +.has-error .help-block, .dynamic-error { + padding: 10px; +} + +.dynamic-error { + background: $body-bg; + border: 1px solid $border-color; + color: $brand-danger; + margin-bottom: 0.5em; +} + +// See Project/Volume --> Manage Volume Attachments, weird +.no_split { + margin-top: -60px; +} + +/* Styling for inline object creation buttons */ +.btn-inline { + margin-bottom: 9px; +} +.modal-body fieldset .form-field select[data-add-item-url] { + width: 275px; + margin-right: 2px; +} + +/* Styling for draged network object */ +#networkListSortContainer { + display: none; +} +.networklist { + padding: 6px; + background: #eee; + border: 1px solid $border-color; + min-height: 2em; + width: auto !important; + @include box-sizing(border-box); + li { + width: 80%; + list-style-type: none; + margin: 6px auto; + padding: 3px; + background: $body-bg; + border: 1px solid #aaa; + line-height: 18px; + border-radius: 3px; + cursor: move; + padding-left: 23px; + background: $body-bg url(../img/drag.png) no-repeat 11px 50%; + em { + font-size: 0.5em; + line-height: 1em; + color:#999; + font-style: normal; + margin-left: 0.8em; + } + i { + margin-right: 5px; + vertical-align: middle; + } + a.btn { + @include box-sizing(border-box); + font-size: 11px; + line-height: 12px; + padding: 2px 5px 3px; + margin-right: 1px; + width: 18px; + text-align: center; + right:5px; + vertical-align: middle; + float: right; + &:before { + content: "+"; + } + } + } + li.ui-sortable-helper { + background-color: #def; + } + li.ui-state-highlight { + border: 1px dotted $gray-light; + background: #efefef; + height: 0.5em; + } + li:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; + } +} +#selected_network { + margin-bottom: 1.5em; + counter-reset:v1 0; + background: #edf9ff; + border:1px solid #c0d9e4; + li { + position: relative; + a.btn:before { + content: "-"; + } + } + li:before { + content:"NIC:"counter(v1); + counter-increment:v1; + display: inline-block; + margin-right: 5px; + background: $gray; + color: $body-bg; + font-size: 90%; + padding: 0px 4px; + vertical-align: middle; + border-radius: 2px; + position: absolute; + left: -2em; + } + &.dragging { + li:before { + content:"NIC:"; + background-color:rgba(102,102,102,0.5); + padding-right: 10px; + } + li.ui-state-highlight:before { + content:""; + background:transparent; + } + } + +} + +div.input input[type="checkbox"] { + float: left; + width: 25px; +} + +.javascript_disabled_alert { + @extend .alert-danger; + border-bottom-style: solid; + border-bottom-width: 1px; + padding: 8px; + text-align: center; +} + +iframe { + border: none; +} + +.item_detail ul li label { + color: $text-color; + font-weight: bold; + display: block; + margin-top: 5px; +} + +.progress_bar { + height: 100%; + width: 100%; + border: 1px solid $gray-light; + background-color: $gray-light; +} + +.progress_bar_fill, +.progress_bar_selected { + height: 100%; + float: left; +} + +.progress_bar_fill { + background-color: $gray; +} + +.progress_bar_selected { + background-color: $brand-primary; + width: 0; +} + +.progress_bar_over { + background-color: $brand-danger; +} + +/* Fix for password fields reveal icon */ +.form-group span.form-control-feedback.fa { + line-height: 32px; +} +.has-feedback .form-control-feedback { + top: 0; +} + +/* ============ */ +/* Known issues */ +/* ============ */ + +/* Tables */ +/* This works around a known bug in Bootstrap, the + wrapping of button groups within the cell of a table: + https://github.com/twbs/bootstrap/issues/3130 +*/ +td .btn-group { + white-space: nowrap; + + // We want the actions column to be a small button, but + // we can't get to the class attribute yet to customize + // that outside of every action, including table header + .btn { + @extend .btn-sm; + } + + & > .btn-group, + & > .btn { + float: none; + } +} + +/* Note: (hurgleburgler) this issue is closed. This might be fixed. +/* Fix tooltip z-index to show above modals. Bootstrap bug 582*/ +.tooltip { + z-index: 12000; + word-wrap: break-word; +} \ No newline at end of file diff --git a/openstack_dashboard/static/dashboard/scss/horizon.scss b/openstack_dashboard/static/dashboard/scss/horizon.scss index 74130f0403..d87f1eb0a6 100644 --- a/openstack_dashboard/static/dashboard/scss/horizon.scss +++ b/openstack_dashboard/static/dashboard/scss/horizon.scss @@ -40,6 +40,9 @@ // Contrib stuff @import "contrib"; +// Debt +@import "debt"; + /* new clearfix */ .clearfix:after { visibility: hidden; @@ -71,20 +74,6 @@ a:focus { text-decoration: underline; } -ul { - list-style: none; - margin: 0; -} - -// Disc-styled list. This list should be used to build bullet-items lists. -.list-bullet { - list-style: disc; -} - -dt { - font-weight: bold; -} - .page-header { margin: 0 0 5px 0; padding: 10px 0 5px 0; @@ -102,11 +91,6 @@ h2 { font-weight: normal; } -#create_container_form .modal-footer{ - margin-top: 190px; -} - - /* Tenant Dropdown */ a.current_item { @@ -124,11 +108,6 @@ a.current_item:hover h4 { border-radius: 4px; } -#usage { - margin-bottom: 25px; - height: 125px; -} - .main_nav { list-style: none; width: 222px; @@ -150,10 +129,6 @@ a.current_item:hover h4 { border-bottom-color: #ccc; } -#actions.single { - width: 90px; -} - .inspect { float: left; display: block; @@ -215,19 +190,6 @@ a.current_item:hover h4 { margin-bottom: 0; } -.static_page { - float: left; //should be removed (jtomasek) - background-color: $body-bg; //should be removed (jtomasek) - > form { - margin-bottom: 0; - } -} - -// should be removed and replaced by row + col-sm-6 in template -.left, .right { - @extend .col-sm-6; -} - .clear { clear: both; width: 0; @@ -236,11 +198,6 @@ a.current_item:hover h4 { margin: 0; } -// Fixes issue with bootstrap positioning of modal container -.modal { - top: 0 !important; -} - .modal-footer { input { width: auto; @@ -318,31 +275,6 @@ a.current_item:hover h4 { } /* Tables */ -/* This works around a known bug in Bootstrap, the - wrapping of button groups within the cell of a table: - https://github.com/twbs/bootstrap/issues/3130 -*/ -td .btn-group { - white-space: nowrap; - - // We want the actions column to be a small button, but - // we can't get to the class attribute yet to customize - // that outside of every action, including table header - .btn { - @extend .btn-sm; - } - - & > .btn-group, - & > .btn { - float: none; - } -} - -div.input input[type="checkbox"] { - float: left; - width: 25px; -} - tr.deleted { color: #999999; } @@ -351,63 +283,10 @@ tr.deleted { min-width: $main-content-min-width; } -.javascript_disabled_alert { - @extend .alert-danger; - border-bottom-style: solid; - border-bottom-width: 1px; - padding: 8px; - text-align: center; -} - .tab_wrapper { padding-top: 50px; } -/* Fix tooltip z-index to show above modals. Bootstrap bug 582*/ -.tooltip { - z-index: 12000; - word-wrap: break-word; -} - -/* Region selector in header */ - -iframe { - border: none; -} - -.item_detail ul li label { - color: $text-color; - font-weight: bold; - display: block; - margin-top: 5px; -} - -.progress_bar { - height: 100%; - width: 100%; - border: 1px solid $gray-light; - background-color: $gray-light; -} - -.progress_bar_fill, -.progress_bar_selected { - height: 100%; - float: left; -} - -.progress_bar_fill { - background-color: $gray; -} - -.progress_bar_selected { - background-color: $brand-primary; - width: 0; -} - -.progress_bar_over { - background-color: $brand-danger; -} - div .flavor_table { border: 1px solid $table-border-color; width: 100%; @@ -432,16 +311,6 @@ div .flavor_table { margin-right: 50px; } -.has-error .help-block, .dynamic-error { - padding: 10px; -} -.dynamic-error { - background: $body-bg; - border: 1px solid $border-color; - color: $brand-danger; - margin-bottom: 0.5em; -} - label.log-length { line-height: 28px; margin-right: 10px; @@ -511,10 +380,6 @@ label.log-length { } } -.no_split { - margin-top: -60px; -} - /* Membership widget UI */ .membership { min-height: 200px; @@ -716,121 +581,6 @@ label.log-length { float: left; } -/* Styling for inline object creation buttons */ -.btn-inline { - margin-bottom: 9px; -} -.modal-body fieldset .form-field select[data-add-item-url] { - width: 275px; - margin-right: 2px; -} - -/* Styling for draged network object */ -#networkListSortContainer { - display: none; -} -.networklist { - padding: 6px; - background: #eee; - border: 1px solid $border-color; - min-height: 2em; - width: auto !important; - @include box-sizing(border-box); - li { - width: 80%; - list-style-type: none; - margin: 6px auto; - padding: 3px; - background: $body-bg; - border: 1px solid #aaa; - line-height: 18px; - border-radius: 3px; - cursor: move; - padding-left: 23px; - background: $body-bg url(../img/drag.png) no-repeat 11px 50%; - em { - font-size: 0.5em; - line-height: 1em; - color:#999; - font-style: normal; - margin-left: 0.8em; - } - i { - margin-right: 5px; - vertical-align: middle; - } - a.btn { - @include box-sizing(border-box); - font-size: 11px; - line-height: 12px; - padding: 2px 5px 3px; - margin-right: 1px; - width: 18px; - text-align: center; - right:5px; - vertical-align: middle; - float: right; - &:before { - content: "+"; - } - } - } - li.ui-sortable-helper { - background-color: #def; - } - li.ui-state-highlight { - border: 1px dotted $gray-light; - background: #efefef; - height: 0.5em; - } - li:after { - visibility: hidden; - display: block; - font-size: 0; - content: " "; - clear: both; - height: 0; - } -} -#selected_network { - margin-bottom: 1.5em; - counter-reset:v1 0; - background: #edf9ff; - border:1px solid #c0d9e4; - li { - position: relative; - a.btn:before { - content: "-"; - } - } - li:before { - content:"NIC:"counter(v1); - counter-increment:v1; - display: inline-block; - margin-right: 5px; - background: $gray; - color: $body-bg; - font-size: 90%; - padding: 0px 4px; - vertical-align: middle; - border-radius: 2px; - position: absolute; - left: -2em; - } - &.dragging { - li:before { - content:"NIC:"; - background-color:rgba(102,102,102,0.5); - padding-right: 10px; - } - li.ui-state-highlight:before { - content:""; - background:transparent; - } - } - -} - /**** Resource Topology CSS ****/ .link { stroke: #999; @@ -1127,14 +877,6 @@ a.link-popover { cursor: default; } a:hover.link-popover { text-decoration: none; } -/* Fix for password fields reveal icon */ -.form-group span.form-control-feedback.fa { - line-height: 32px; -} -.has-feedback .form-control-feedback { - top: 0; -} - input::-ms-clear, input::-ms-reveal { display: none; }