From 0c22a6696703225baabd6a4afaad5759745da8c5 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 9 Mar 2017 15:36:03 -0600 Subject: Add more styles to the server.scss Signed-off-by: Morris Jobke --- core/css/fixes.css | 18 ----- core/css/fixes.scss | 18 +++++ core/css/fonts.css | 23 ------ core/css/fonts.scss | 23 ++++++ core/css/global.css | 50 ------------ core/css/global.scss | 50 ++++++++++++ core/css/mobile.css | 165 ---------------------------------------- core/css/mobile.scss | 165 ++++++++++++++++++++++++++++++++++++++++ core/css/server.scss | 9 +++ lib/private/legacy/template.php | 9 --- 10 files changed, 265 insertions(+), 265 deletions(-) delete mode 100644 core/css/fixes.css create mode 100644 core/css/fixes.scss delete mode 100644 core/css/fonts.css create mode 100644 core/css/fonts.scss delete mode 100644 core/css/global.css create mode 100644 core/css/global.scss delete mode 100644 core/css/mobile.css create mode 100644 core/css/mobile.scss diff --git a/core/css/fixes.css b/core/css/fixes.css deleted file mode 100644 index 3cb89c6599f..00000000000 --- a/core/css/fixes.css +++ /dev/null @@ -1,18 +0,0 @@ -/* ---- BROWSER-SPECIFIC FIXES ---- */ - -/* remove dotted outlines in Firefox */ -::-moz-focus-inner { - border: 0; -} - -/* fix height of select boxes for OS X */ -select { - height: 32px; -} - -/* deactivate show password toggle for IE. Does not work for 8 and 9+ have their own implementation. */ -.ie #show, .ie #show+label { - display: none; - visibility: hidden; -} - diff --git a/core/css/fixes.scss b/core/css/fixes.scss new file mode 100644 index 00000000000..3cb89c6599f --- /dev/null +++ b/core/css/fixes.scss @@ -0,0 +1,18 @@ +/* ---- BROWSER-SPECIFIC FIXES ---- */ + +/* remove dotted outlines in Firefox */ +::-moz-focus-inner { + border: 0; +} + +/* fix height of select boxes for OS X */ +select { + height: 32px; +} + +/* deactivate show password toggle for IE. Does not work for 8 and 9+ have their own implementation. */ +.ie #show, .ie #show+label { + display: none; + visibility: hidden; +} + diff --git a/core/css/fonts.css b/core/css/fonts.css deleted file mode 100644 index f72aa2930cf..00000000000 --- a/core/css/fonts.css +++ /dev/null @@ -1,23 +0,0 @@ -/* for low-res screens, use Regular font-weight instead of Light */ -@media (-webkit-max-device-pixel-ratio: 1.3), (max-resolution: 124.8dpi) { - @font-face { - font-family: 'Open Sans'; - font-style: normal; - font-weight: normal; - src: local('Open Sans'), local('OpenSans'), url('../fonts/OpenSans-Regular.woff') format('woff'); - } -} - -@font-face { - font-family: 'Open Sans'; - font-style: normal; - font-weight: 300; - src: local('Open Sans Light'), local('OpenSans-Light'), url('../fonts/OpenSans-Light.woff') format('woff'); -} - -@font-face { - font-family: 'Open Sans'; - font-style: normal; - font-weight: 600; - src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url('../fonts/OpenSans-Semibold.woff') format('woff'); -} diff --git a/core/css/fonts.scss b/core/css/fonts.scss new file mode 100644 index 00000000000..f72aa2930cf --- /dev/null +++ b/core/css/fonts.scss @@ -0,0 +1,23 @@ +/* for low-res screens, use Regular font-weight instead of Light */ +@media (-webkit-max-device-pixel-ratio: 1.3), (max-resolution: 124.8dpi) { + @font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: normal; + src: local('Open Sans'), local('OpenSans'), url('../fonts/OpenSans-Regular.woff') format('woff'); + } +} + +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 300; + src: local('Open Sans Light'), local('OpenSans-Light'), url('../fonts/OpenSans-Light.woff') format('woff'); +} + +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 600; + src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url('../fonts/OpenSans-Semibold.woff') format('woff'); +} diff --git a/core/css/global.css b/core/css/global.css deleted file mode 100644 index 9511d4324fa..00000000000 --- a/core/css/global.css +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (c) 2015, Raghu Nayyar, http://raghunayyar.com - This file is licensed under the Affero General Public License version 3 or later. - See the COPYING-README file. */ - -/* Global Components */ - -.pull-left { - float: left; -} - -.pull-right { - float: right; -} - -.clear-left { - clear: left; -} - -.clear-right { - clear: right; -} - -.clear-both { - clear: both; -} - -.hidden { - display: none; -} - -.hidden-visually { - position: absolute; - left:-10000px; - top: auto; - width: 1px; - height: 1px; - overflow: hidden; -} - -.bold { - font-weight:600; -} - -.center { - text-align:center; -} - -.inlineblock { - display: inline-block; -} \ No newline at end of file diff --git a/core/css/global.scss b/core/css/global.scss new file mode 100644 index 00000000000..9511d4324fa --- /dev/null +++ b/core/css/global.scss @@ -0,0 +1,50 @@ +/* Copyright (c) 2015, Raghu Nayyar, http://raghunayyar.com + This file is licensed under the Affero General Public License version 3 or later. + See the COPYING-README file. */ + +/* Global Components */ + +.pull-left { + float: left; +} + +.pull-right { + float: right; +} + +.clear-left { + clear: left; +} + +.clear-right { + clear: right; +} + +.clear-both { + clear: both; +} + +.hidden { + display: none; +} + +.hidden-visually { + position: absolute; + left:-10000px; + top: auto; + width: 1px; + height: 1px; + overflow: hidden; +} + +.bold { + font-weight:600; +} + +.center { + text-align:center; +} + +.inlineblock { + display: inline-block; +} \ No newline at end of file diff --git a/core/css/mobile.css b/core/css/mobile.css deleted file mode 100644 index b0f8421345c..00000000000 --- a/core/css/mobile.css +++ /dev/null @@ -1,165 +0,0 @@ -@media only screen and (max-width: 768px) { - -#body-login #header { - padding-top: 10px; -} - -#body-login .wrapper { - display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-pack: center; - -webkit-box-align: center; - - display: -webkit-flex; - -webkit-flex-direction: row; - -webkit-align-self: center; - -webkit-align-items: center; - - display: -moz-box; - -moz-box-orient: horizontal; - -moz-box-pack: center; - -moz-box-align: center; - - display: -ms-flexbox; - -ms-flex-direction: row; - -ms-flex-pack: center; - -ms-flex-align: center; - - display: flex; - flex-direction: row; - align-self: center; - align-items: center; -} - -/* on mobile public share, show only the icon of the logo, hide the text */ -#body-public #header .header-appname-container { - display: none; -} - -/* do not show update notification on mobile */ -#update-notification { - display: none !important; -} - -/* position share dropdown */ -#dropdown { - margin-right: 10% !important; - width: 80% !important; -} - -/* fix name autocomplete not showing on mobile */ -.ui-autocomplete { - z-index: 1000 !important; -} - -/* fix error display on smaller screens */ -.error-wide { - width: 100%; - margin-left: 0 !important; - box-sizing: border-box; -} - - -/* APP SIDEBAR TOGGLE and SWIPE ----------------------------------------------*/ - -#app-navigation, -#app-content { - position: absolute !important; - top: 0; - left: 0; - right: 0; - bottom: 0; -} - -#app-navigation { - width: 250px !important; -} - -#app-content { - width: 100% !important; - left: 0 !important; - background-color: #fff; - overflow-x: hidden !important; - z-index: 1000; -} - -/* allow horizontal scrollbar in settings - otherwise user management is not usable on mobile */ -#body-settings #app-content { - overflow-x: auto !important; -} - -#app-navigation-toggle { - position: fixed; - display: inline-block !important; - top: 45px; - left: 0; - width: 44px; - height: 44px; - z-index: 149; - background-color: rgba(255, 255, 255, .7); - cursor: pointer; - opacity: .6; -} -#app-navigation-toggle:hover, -#app-navigation-toggle:focus { - opacity: 1; -} - - -/* controls bar for mobile */ -#controls { - min-width: initial !important; - left: 0 !important; - padding-left: 0; -} -/* position controls for apps with app-navigation */ -#app-navigation+#app-content #controls { - padding-left: 44px; -} - -/* .viewer-mode is when text editor, PDF viewer, etc is open */ -#body-user .app-files.viewer-mode #controls { - padding-left: 0 !important; -} -.app-files.viewer-mode #app-navigation-toggle { - display: none !important; -} - -table.multiselect thead { - left: 0 !important; -} - - -/* prevent overflow in user management controls bar */ -#usersearchform { - display: none; -} -#body-settings #controls { - min-width: 768px !important; -} - - -/* do not show dates in filepicker */ -#oc-dialog-filepicker-content .filelist .filesize, -#oc-dialog-filepicker-content .filelist .date { - display: none; -} -#oc-dialog-filepicker-content .filelist .filename { - max-width: 80%; -} - - -/* fix controls bar jumping when navigation is slid out */ -.snapjs-left #app-navigation-toggle, -.snapjs-left #controls { - top: 0; -} -.snapjs-left table.multiselect thead { - top: 44px; -} - - - -/* end of media query */ -} diff --git a/core/css/mobile.scss b/core/css/mobile.scss new file mode 100644 index 00000000000..b0f8421345c --- /dev/null +++ b/core/css/mobile.scss @@ -0,0 +1,165 @@ +@media only screen and (max-width: 768px) { + +#body-login #header { + padding-top: 10px; +} + +#body-login .wrapper { + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-pack: center; + -webkit-box-align: center; + + display: -webkit-flex; + -webkit-flex-direction: row; + -webkit-align-self: center; + -webkit-align-items: center; + + display: -moz-box; + -moz-box-orient: horizontal; + -moz-box-pack: center; + -moz-box-align: center; + + display: -ms-flexbox; + -ms-flex-direction: row; + -ms-flex-pack: center; + -ms-flex-align: center; + + display: flex; + flex-direction: row; + align-self: center; + align-items: center; +} + +/* on mobile public share, show only the icon of the logo, hide the text */ +#body-public #header .header-appname-container { + display: none; +} + +/* do not show update notification on mobile */ +#update-notification { + display: none !important; +} + +/* position share dropdown */ +#dropdown { + margin-right: 10% !important; + width: 80% !important; +} + +/* fix name autocomplete not showing on mobile */ +.ui-autocomplete { + z-index: 1000 !important; +} + +/* fix error display on smaller screens */ +.error-wide { + width: 100%; + margin-left: 0 !important; + box-sizing: border-box; +} + + +/* APP SIDEBAR TOGGLE and SWIPE ----------------------------------------------*/ + +#app-navigation, +#app-content { + position: absolute !important; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +#app-navigation { + width: 250px !important; +} + +#app-content { + width: 100% !important; + left: 0 !important; + background-color: #fff; + overflow-x: hidden !important; + z-index: 1000; +} + +/* allow horizontal scrollbar in settings + otherwise user management is not usable on mobile */ +#body-settings #app-content { + overflow-x: auto !important; +} + +#app-navigation-toggle { + position: fixed; + display: inline-block !important; + top: 45px; + left: 0; + width: 44px; + height: 44px; + z-index: 149; + background-color: rgba(255, 255, 255, .7); + cursor: pointer; + opacity: .6; +} +#app-navigation-toggle:hover, +#app-navigation-toggle:focus { + opacity: 1; +} + + +/* controls bar for mobile */ +#controls { + min-width: initial !important; + left: 0 !important; + padding-left: 0; +} +/* position controls for apps with app-navigation */ +#app-navigation+#app-content #controls { + padding-left: 44px; +} + +/* .viewer-mode is when text editor, PDF viewer, etc is open */ +#body-user .app-files.viewer-mode #controls { + padding-left: 0 !important; +} +.app-files.viewer-mode #app-navigation-toggle { + display: none !important; +} + +table.multiselect thead { + left: 0 !important; +} + + +/* prevent overflow in user management controls bar */ +#usersearchform { + display: none; +} +#body-settings #controls { + min-width: 768px !important; +} + + +/* do not show dates in filepicker */ +#oc-dialog-filepicker-content .filelist .filesize, +#oc-dialog-filepicker-content .filelist .date { + display: none; +} +#oc-dialog-filepicker-content .filelist .filename { + max-width: 80%; +} + + +/* fix controls bar jumping when navigation is slid out */ +.snapjs-left #app-navigation-toggle, +.snapjs-left #controls { + top: 0; +} +.snapjs-left table.multiselect thead { + top: 44px; +} + + + +/* end of media query */ +} diff --git a/core/css/server.scss b/core/css/server.scss index 04f54c82d49..516220f2ad5 100644 --- a/core/css/server.scss +++ b/core/css/server.scss @@ -1,2 +1,11 @@ @import 'styles.scss'; @import 'inputs.scss'; +@import 'header.scss'; +@import 'icons.scss'; +@import 'fonts.scss'; +@import 'apps.scss'; +@import 'global.scss'; +@import 'fixes.scss'; +@import 'multiselect.scss'; +@import 'mobile.scss'; +@import 'tooltip.scss'; diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php index 41f481e74d9..8535e018879 100644 --- a/lib/private/legacy/template.php +++ b/lib/private/legacy/template.php @@ -106,17 +106,8 @@ class OC_Template extends \OC\Template\Base { } } - OC_Util::addStyle("tooltip",null,true); OC_Util::addStyle('jquery-ui-fixes',null,true); OC_Util::addVendorStyle('jquery-ui/themes/base/jquery-ui',null,true); - OC_Util::addStyle("mobile",null,true); - OC_Util::addStyle("multiselect",null,true); - OC_Util::addStyle("fixes",null,true); - OC_Util::addStyle("global",null,true); - OC_Util::addStyle("apps",null,true); - OC_Util::addStyle("fonts",null,true); - OC_Util::addStyle("icons",null,true); - OC_Util::addStyle("header",null,true); OC_Util::addStyle('server', null, true); // avatars -- cgit v1.2.3