Skip to content

Commit

Permalink
Converted dynamic inline CSS to external static CSS using CSS variabl…
Browse files Browse the repository at this point in the history
…es. #157 #93
  • Loading branch information
mustafaabughazy authored and fabiocaccamo committed Mar 9, 2022
1 parent d2b680e commit 8fe7178
Show file tree
Hide file tree
Showing 17 changed files with 691 additions and 555 deletions.
440 changes: 440 additions & 0 deletions admin_interface/static/admin_interface/css/admin-interface.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,127 @@ backward compatibility:

/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
.ui-helper-hidden {
display: none;
}

.ui-helper-hidden-accessible {
position: absolute;
left: -99999999px;
}

.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none;
}

.ui-helper-clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

.ui-helper-clearfix {
display: inline-block;
}

/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
.ui-state-disabled { cursor: default !important; }
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
* html .ui-helper-clearfix {
height: 1%;
}

.ui-helper-clearfix {
display: block;
}

.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter: Alpha(Opacity=0);
}

.ui-state-disabled {
cursor: default !important;
}

.ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}

/* http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/base/jquery.ui.tabs.css */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
.ui-tabs .ui-tabs-nav li.ui-tabs-active, .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
.ui-widget-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

.ui-tabs {
position: relative;
padding: .2em;
zoom: 1;
}

/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav {
margin: 0;
padding: .2em .2em 0;
}

.ui-tabs .ui-tabs-nav li {
list-style: none;
float: left;
position: relative;
top: 1px;
margin: 0 .2em 1px 0;
border-bottom: 0 !important;
padding: 0;
white-space: nowrap;
}

.ui-tabs .ui-tabs-nav li a {
float: left;
padding: .5em 1em;
text-decoration: none;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-active, .ui-tabs .ui-tabs-nav li.ui-tabs-selected {
margin-bottom: 0;
padding-bottom: 1px;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a {
cursor: text;
}

.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a {
cursor: pointer;
}

/* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel {
display: block;
border-width: 0;
padding: 1em 1.4em;
background: none;
}

.ui-tabs .ui-tabs-hide {
position: absolute;
display: none;
Expand All @@ -55,12 +155,15 @@ backward compatibility:
padding: 10px 0 0 10px;
border-bottom: none;
}

.admin-interface .ui-tabs .ui-tabs-nav li {
margin: 0 0 0 -1px;
}

.admin-interface .ui-tabs .ui-tabs-nav li.required {
font-weight: bold;
}

.admin-interface .ui-tabs .ui-tabs-nav li a {
border: 1px solid #eeeeee;
background-color: #f8f8f8;
Expand All @@ -86,7 +189,7 @@ backward compatibility:
margin-bottom: -1px;
font-weight: bold;
background-color: #FFFFFF;
color: {{ theme.css_module_background_color }};
color: var(--admin-interface-module-background-color);
border-bottom: 1px solid #FFFFFF;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,24 @@ https://github.com/jmrivas86/django-json-widget
*/

.admin-interface div.jsoneditor {
border: 1px solid {{ theme.css_module_background_color }};
{% if theme.css_module_rounded_corners %}
border-radius: 4px;
overflow: hidden;
{% endif %}
border: 1px solid var(--admin-interface-module-background-color);
border-radius: var(--admin-interface-jsoneditor-border-radius);
overflow: var(--admin-interface-jsoneditor-overflow);
}

.admin-interface div.jsoneditor-menu {
background-color: {{ theme.css_module_background_color }};
border-bottom: 1px solid {{ theme.css_module_background_color }};
background-color: var(--admin-interface-module-background-color);
border-bottom: 1px solid var(--admin-interface-module-background-color);
}

.admin-interface div.jsoneditor-menu a.jsoneditor-poweredBy {
color: {{ theme.css_module_link_color }};
color: var(--admin-interface-module-link-color);
}

.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected,
.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected:focus,
.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected:hover {
background-color: {{ theme.css_module_background_selected_color }};
background-color: var(--admin-interface-module-background-selected-color);
color: #000000;
font-weight: bold;
}
13 changes: 13 additions & 0 deletions admin_interface/static/admin_interface/css/recent-actions.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.admin-interface.dashboard #content {
max-width: 600px;
margin-right: auto;
margin-left: auto;
}

.admin-interface.dashboard #content #recent-actions-module {
display: none;
}

.admin-interface.dashboard #content {
width: auto;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ related modal + magnific popup customization
https://github.com/dimsemenov/Magnific-Popup
*/
.admin-interface .related-modal.mfp-bg {
background-color: {{ theme.related_modal_background_color }};
opacity: {{ theme.related_modal_background_opacity }};
background-color: var(--admin-interface-related-modal-background-color);
opacity: var(--admin-interface-related-modal-background-opacity);
}

.admin-interface .related-modal .mfp-content {
height: 100%;
-webkit-box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.2);
-moz-box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.2);
box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.2);
-webkit-box-shadow: 0px 5px 30px 0px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 5px 30px 0px rgba(0, 0, 0, 0.2);
box-shadow: 0px 5px 30px 0px rgba(0, 0, 0, 0.2);
}

.admin-interface .related-modal .mfp-container {
Expand All @@ -22,20 +22,22 @@ https://github.com/dimsemenov/Magnific-Popup
padding: 40px 80px 40px 80px;
}

@media (max-width:640px){
@media (max-width: 640px) {
.admin-interface .related-modal .mfp-container {
padding: 80px 20px 80px 20px;
}

.admin-interface .related-modal__nested .mfp-container {
padding: 40px 40px 40px 40px;
}
}

@media (max-height:640px){
@media (max-height: 640px) {
.admin-interface .related-modal .mfp-container {
padding-top: 20px;
padding-bottom: 20px;
}

.admin-interface .related-modal__nested .mfp-container {
padding: 40px 40px 40px 40px;
}
Expand All @@ -48,9 +50,7 @@ https://github.com/dimsemenov/Magnific-Popup
position: relative;
z-index: 100;
overflow: hidden;
{% if theme.related_modal_rounded_corners %}
border-radius: 4px;
{% endif %}
border-radius: var(--admin-interface-related-modal-border-radius);
}

.admin-interface .related-modal #related-modal-iframe {
Expand All @@ -72,9 +72,7 @@ https://github.com/dimsemenov/Magnific-Popup
height: 40px;
opacity: 1.0;
color: rgba(0, 0, 0, 0.4);
{% if not theme.related_modal_close_button_visible %}
display: none;
{% endif %}
display: var(--admin-interface-related-modal-close-button-display);
}

.admin-interface .related-modal .mfp-close:hover,
Expand Down
Loading

0 comments on commit 8fe7178

Please sign in to comment.