Also convert template body-background-image to var()

And cleanup more CSS
This commit is contained in:
djmaze 2021-02-05 15:31:42 +01:00
parent d9bece04b2
commit 5e9941d58f
15 changed files with 46 additions and 207 deletions

View file

@ -54,7 +54,7 @@
background-color: #333; background-color: #333;
background-color: rgba(0,0,0,0.8) !important; background-color: rgba(0,0,0,0.8) !important;
.close, .close-custom, .minimize-custom { .close, .minimize-custom {
opacity: 1; opacity: 1;
color: #fff; color: #fff;
border-color: #eee; border-color: #eee;
@ -145,44 +145,6 @@
color: red; color: red;
font-weight: bold; font-weight: bold;
} }
.b-appachments {
.b-attacment {
line-height: 20px;
padding-bottom: 10px;
}
.b-attacment-in-process {
line-height: 20px;
padding-bottom: 10px;
.uploading {
display: none;
padding-right: 5px;
}
&.uploading .uploading {
display: inline;
}
.upload-progress {
font-weight: bold;
}
&.error .namedStr {
color: #888;
}
.error {
color: red;
}
.close, .close-custom {
float: left;
padding-right: 13px;
}
}
}
} }
.cke_chrome { .cke_chrome {

View file

@ -40,7 +40,7 @@
background-color: #333; background-color: #333;
background-color: rgba(0,0,0,0.8) !important; background-color: rgba(0,0,0,0.8) !important;
.close, .close-custom { .close {
color: #fff; color: #fff;
opacity: 1; opacity: 1;
} }

View file

@ -6,13 +6,24 @@
background-position: center; background-position: center;
} }
#rl-center, #rl-top, #rl-bottom, #rl-left, #rl-right {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: 0;
margin: 0;
border: 0;
z-index: 0;
}
#rl-content { #rl-content {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
#rl-center { #rl-center {
.g-ui-absolute-reset;
min-width: 600px; min-width: 600px;
min-height: 400px; min-height: 400px;
} }
@ -34,21 +45,16 @@ html.rl-mobile {
} }
#rl-top { #rl-top {
.g-ui-absolute-reset;
bottom: auto; bottom: auto;
z-index: 2; z-index: 2;
} }
#rl-bottom { #rl-bottom {
.g-ui-absolute-reset;
top: auto; top: auto;
z-index: 1; z-index: 1;
} }
#rl-left { #rl-left {
.g-ui-absolute-reset;
width: @rlLeftWidth; width: @rlLeftWidth;
min-width: 60px; min-width: 60px;
} }
@ -117,8 +123,6 @@ html:not(.rl-left-panel-disabled) #rl-left.resizable > .resizer,
} }
#rl-right { #rl-right {
.g-ui-absolute-reset;
z-index: 1; z-index: 1;
left: @rlLeftWidth; left: @rlLeftWidth;
} }

View file

@ -117,11 +117,11 @@
} }
.e-mobile-switcher { .e-mobile-switcher {
color: var(--powered-color, #333); color: var(--login-switch-color, #333);
margin-top: 8px; margin-top: 8px;
text-align: center; text-align: center;
a { a {
color: var(--powered-color, #333); color: var(--login-switch-color, #333);
text-decoration: underline; text-decoration: underline;
&:hover { &:hover {
filter: brightness(1.5); filter: brightness(1.5);

View file

@ -1,13 +1,21 @@
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html, body { html, body {
font-family: Arial, Verdana, Geneva, sans-serif; font-family: Arial, Verdana, Geneva, sans-serif;
height: 100%; height: 100%;
margin: 0; margin: 0;
overflow: hidden; overflow: hidden;
padding: 0; padding: 0;
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
} }
body { body {
background-color: var(--main-bg-color, #e3e3e3); background-color: var(--main-bg-color, #e3e3e3);
background-image: var(--main-bg-image);
background-size: var(--main-bg-size); background-size: var(--main-bg-size);
color: var(--main-color, #000); color: var(--main-color, #000);
@ -29,14 +37,10 @@ option:disabled {
cursor: not-allowed; cursor: not-allowed;
} }
* { *, select:focus {
outline: none; outline: none;
} }
select:focus {
outline: none;
}
html.mobile *, html.rl-mobile * { html.mobile *, html.rl-mobile * {
-webkit-tap-highlight-color: rgba(0,0,0,0); -webkit-tap-highlight-color: rgba(0,0,0,0);
} }

View file

@ -514,32 +514,6 @@ html.rl-no-preview-pane {
} }
} }
/*
&.hasParentMessage {
background-color: #ecf0f1;
.sidebarParent {
background-color: #bdc3c7;
}
&.focused .sidebarParent {
background-color: darken(#bdc3c7, 10%) !important;
}
&.unseen {
background-color: darken(#ecf0f1, 5%);
.sidebarParent {
background-color: darken(#bdc3c7, 30%);
}
&.focused .sidebarParent {
background-color: darken(#bdc3c7, 40%) !important;
}
}
}
*/
&.checked { &.checked {
.sidebarParent { .sidebarParent {
background-color: lighten(#398CF2, 10%) !important; background-color: lighten(#398CF2, 10%) !important;

View file

@ -7,7 +7,7 @@
} }
.g-ui-link { .g-ui-link {
color: #336699; color: #369;
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
padding: 2px; padding: 2px;
@ -22,18 +22,6 @@
min-height: 300px; min-height: 300px;
} }
.g-ui-absolute-reset {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: 0;
margin: 0;
border: 0;
z-index: 0;
}
.g-ui-menu { .g-ui-menu {
max-height: 400px; max-height: 400px;
max-width: 300px; max-width: 300px;
@ -167,7 +155,6 @@
} }
} }
html.mobile .hide-mobile, html.mobile .hide-mobile {
.command.command-disabled.hide-on-disabled-command {
display:none; display:none;
} }

View file

@ -7,18 +7,6 @@ label.inline, span.inline {
display: inline-block; display: inline-block;
} }
.close-custom {
.close;
}
button.close-custom {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
}
.minimize-custom { .minimize-custom {
border: 0 solid #333; border: 0 solid #333;
border-bottom-width: 3px; border-bottom-width: 3px;
@ -274,18 +262,6 @@ select {
color: #555; color: #555;
} }
.modal.loginContent .modal-body, .modal.loginAdminContent .modal-body {
background-color: transparent !important;
}
.picker.modal-dialog-bg, .picker.picker-dialog-bg {
z-index: 2000 !important;
}
.picker.modal-dialog, .picker.picker-dialog {
z-index: 2001 !important;
}
.form-horizontal.long-label .control-group { .form-horizontal.long-label .control-group {
.control-label { .control-label {
width: 160px; width: 160px;

View file

@ -668,14 +668,7 @@ END;
if (0 < \strlen($sValue) && !static::IsAscii($sValue)) if (0 < \strlen($sValue) && !static::IsAscii($sValue))
{ {
if (!empty($_SERVER['HTTP_USER_AGENT']) && 0 < \strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) $sValue = static::AttributeRfc2231Encode($sAttrName, $sValue);
{
$sValue = $sAttrName.'="'.\preg_replace('/[+\s]+/', '%20', \urlencode($sValue)).'"';
}
else
{
$sValue = static::AttributeRfc2231Encode($sAttrName, $sValue);
}
} }
else else
{ {

View file

@ -630,9 +630,9 @@ class ServiceActions
if (\is_file($sThemeFile) && \is_file($sThemeTemplateFile) && \is_file($sThemeValuesFile)) if (\is_file($sThemeFile) && \is_file($sThemeTemplateFile) && \is_file($sThemeValuesFile))
{ {
$aResult[] = '@base: "'. $aResult[] = '@base: "'
($bCustomTheme ? Utils::WebPath() : Utils::WebVersionPath()). . ($bCustomTheme ? Utils::WebPath() : Utils::WebVersionPath())
'themes/'.$sRealTheme.'/";'; . 'themes/'.$sRealTheme.'/";';
$aResult[] = \file_get_contents($sThemeValuesFile); $aResult[] = \file_get_contents($sThemeValuesFile);
$aResult[] = \file_get_contents($sThemeFile); $aResult[] = \file_get_contents($sThemeFile);

View file

@ -300,7 +300,11 @@ class Utils
public static function WebPath() : string public static function WebPath() : string
{ {
$sAppPath = ''; static $sAppPath;
if (!$sAppPath) {
$sAppPath = \preg_replace('#index\\.php.*$#D', '$1', $_SERVER['SCRIPT_NAME']);
// $sAppPath = Api::Config()->Get('labs', 'app_default_path', '');
}
return $sAppPath; return $sAppPath;
} }

View file

@ -5,17 +5,18 @@
background-repeat: repeat-x !important; background-repeat: repeat-x !important;
} }
.thm-body-background-image(@value) when (isstring(@value)) { .thm-main-bg-image(@value) when (isstring(@value)) {
background-image: url("@{base}@{value}"); --main-bg-image: url("@{base}@{value}");
} }
.thm-body-background-image(@value) when not (isstring(@value)) { .thm-main-bg-image(@value) when not (isstring(@value)) {
background-image: @value; --main-bg-image: @value;
} }
// --- mixins // --- mixins
:root { :root {
--main-bg-color: @main-background-color; --main-bg-color: @main-background-color;
--main-bg-size: @main-background-size; --main-bg-size: @main-background-size;
.thm-main-bg-image(@main-background-image);
--main-color: @main-color; --main-color: @main-color;
--loading-color: @loading-color; --loading-color: @loading-color;
@ -26,8 +27,7 @@
--login-border-radius: @login-border-radius; --login-border-radius: @login-border-radius;
--login-box-shadow: @login-box-shadow; --login-box-shadow: @login-box-shadow;
--login-color: @login-color; --login-color: @login-color;
--login-switch-color: @powered-color;
--powered-color: @powered-color;
--spinner-bg: @spinner-background; --spinner-bg: @spinner-background;
--spinner-color: @spinner-color; --spinner-color: @spinner-color;
@ -60,10 +60,6 @@
--settings-menu-selected-color: @settings-menu-selected-color; --settings-menu-selected-color: @settings-menu-selected-color;
} }
body {
.thm-body-background-image(@main-background-image);
}
.thm-login { .thm-login {
.thm-linear-gradient-mixin(@login-gradient-start, @login-gradient-end); .thm-linear-gradient-mixin(@login-gradient-start, @login-gradient-end);
} }

View file

@ -10,7 +10,7 @@
<div class="modal-body"> <div class="modal-body">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="alert" data-bind="visible: '' !== submitError()"> <div class="alert" data-bind="visible: '' !== submitError()">
<button type="button" class="close-custom" data-bind="click: function () { submitError('') }">×</button> <button type="button" class="close" data-bind="click: function () { submitError('') }">×</button>
<span data-bind="text: submitError"></span> <span data-bind="text: submitError"></span>
<div data-bind="visible: submitErrorAdditional"> <div data-bind="visible: submitErrorAdditional">
<br /> <br />

View file

@ -9,7 +9,7 @@
<span class="i18n btn-text hide-on-mobile" data-i18n="GLOBAL/SAVE"></span> <span class="i18n btn-text hide-on-mobile" data-i18n="GLOBAL/SAVE"></span>
</a> </a>
<a class="close-custom" data-bind="click: tryToClosePopup, tooltip: 'GLOBAL/CANCEL'">×</a> <a class="close" data-bind="click: tryToClosePopup, tooltip: 'GLOBAL/CANCEL'">×</a>
<a class="minimize-custom" data-bind="click: skipCommand, tooltip: 'COMPOSE/BUTTON_MINIMIZE'"></a> <a class="minimize-custom" data-bind="click: skipCommand, tooltip: 'COMPOSE/BUTTON_MINIMIZE'"></a>
<a class="btn btn-danger button-delete button-delete-transitions" data-bind="command: deleteCommand"> <a class="btn btn-danger button-delete button-delete-transitions" data-bind="command: deleteCommand">

View file

@ -3,27 +3,6 @@
/* Document /* Document
========================================================================== */ ========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/** /**
* Correct the font size and margin on `h1` elements within `section` and * Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari. * `article` contexts in Chrome, Firefox, and Safari.
@ -61,7 +40,7 @@ pre {
/** /**
* 1. Remove the bottom border in Chrome 57- * 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. * 2. Add the correct text decoration in Chrome, Edge, Opera, and Safari.
*/ */
abbr[title] { abbr[title] {
@ -139,7 +118,7 @@ textarea {
} }
/** /**
* Remove the inheritance of text transform in Edge, Firefox, and IE. * Remove the inheritance of text transform in Edge, Firefox.
* 1. Remove the inheritance of text transform in Firefox. * 1. Remove the inheritance of text transform in Firefox.
*/ */
@ -183,33 +162,12 @@ button:-moz-focusring,
} }
/** /**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 3. Remove the padding so developers are not caught out when they zero out * 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers. * `fieldset` elements in all browsers.
*/ */
legend { legend {
box-sizing: border-box; /* 1 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */ padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
} }
/** /**
@ -248,22 +206,3 @@ progress {
-webkit-appearance: button; /* 1 */ -webkit-appearance: button; /* 1 */
font: inherit; /* 2 */ font: inherit; /* 2 */
} }
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}