diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-14 09:25:19 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-20 19:20:51 +0200 |
commit | 1dc76f2f6bb4a14ac4c33e03aec7ec99270246f4 (patch) | |
tree | 849cdfba7fb3c0994044427ca659975210625863 /core | |
parent | 26918e41033d08a5155b755dcf5319e98d9a17d0 (diff) | |
download | nextcloud-server-1dc76f2f6bb4a14ac4c33e03aec7ec99270246f4.tar.gz nextcloud-server-1dc76f2f6bb4a14ac4c33e03aec7ec99270246f4.zip |
More vars fixes
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/css/css-variables.scss | 3 | ||||
-rw-r--r-- | core/css/fonts.scss | 9 | ||||
-rw-r--r-- | core/css/icons.scss | 42 | ||||
-rw-r--r-- | core/css/inputs.scss | 8 | ||||
-rw-r--r-- | core/css/styles.scss | 2 | ||||
-rw-r--r-- | core/css/variables.scss | 32 |
6 files changed, 61 insertions, 35 deletions
diff --git a/core/css/css-variables.scss b/core/css/css-variables.scss index 0a12ac4b2a6..b1b7df3115f 100644 --- a/core/css/css-variables.scss +++ b/core/css/css-variables.scss @@ -34,5 +34,6 @@ --color-border: $color-border; --color-border-dark: $color-border-dark; --border-radius: $border-radius; -} + --font-face: $font-face; +} diff --git a/core/css/fonts.scss b/core/css/fonts.scss index f72aa2930cf..441b48f3856 100644 --- a/core/css/fonts.scss +++ b/core/css/fonts.scss @@ -4,7 +4,8 @@ font-family: 'Open Sans'; font-style: normal; font-weight: normal; - src: local('Open Sans'), local('OpenSans'), url('../fonts/OpenSans-Regular.woff') format('woff'); + src: local('Open Sans'), local('OpenSans'), + url('../fonts/OpenSans-Regular.woff') format('woff'); } } @@ -12,12 +13,14 @@ 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'); + 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'); + src: local('Open Sans Semibold'), local('OpenSans-Semibold'), + url('../fonts/OpenSans-Semibold.woff') format('woff'); } diff --git a/core/css/icons.scss b/core/css/icons.scss index c7c5bfe0c15..23d35b3742f 100644 --- a/core/css/icons.scss +++ b/core/css/icons.scss @@ -25,7 +25,12 @@ } /* LOADING ------------------------------------------------------------------ */ -.loading, .loading-small, .icon-loading, .icon-loading-dark, .icon-loading-small, .icon-loading-small-dark { +.loading, +.loading-small, +.icon-loading, +.icon-loading-dark, +.icon-loading-small, +.icon-loading-small-dark { position: relative; &:after { z-index: 2; @@ -42,15 +47,15 @@ -webkit-transform-origin: center; -ms-transform-origin: center; transform-origin: center; - border: 2px solid var(--color-loading-dark); - border-top-color: var(--color-loading-light); + border: 2px solid var(--color-loading-light); + border-top-color: var(--color-loading-dark); } } .icon-loading-dark:after, .icon-loading-small-dark:after { - border: 2px solid var(--color-loading-light); - border-top-color: var(--color-loading-dark); + border: 2px solid var(--color-loading-dark); + border-top-color: var(--color-loading-light); } .icon-loading-small:after, @@ -61,7 +66,7 @@ } /* Css replaced elements don't have ::after nor ::before */ -img, object, video, button, textarea, input, select, div[contenteditable=true] { +img, object, video, button, textarea, input, select, div[contenteditable='true'] { .icon-loading { background-image: url('../img/loading.gif'); } @@ -176,11 +181,13 @@ img, object, video, button, textarea, input, select, div[contenteditable=true] { .icon-delete { background-image: url('../img/actions/delete.svg?v=1'); &.no-permission { - &:hover, &:focus { + &:hover, + &:focus { background-image: url('../img/actions/delete.svg?v=1'); } } - &:hover, &:focus { + &:hover, + &:focus { background-image: url('../img/actions/delete-hover.svg?v=1'); filter: initial; } @@ -189,11 +196,13 @@ img, object, video, button, textarea, input, select, div[contenteditable=true] { .icon-delete-white { background-image: url('../img/actions/delete-white.svg?v=1'); &.no-permission { - &:hover, &:focus { + &:hover, + &:focus { background-image: url('../img/actions/delete-white.svg?v=1'); } } - &:hover, &:focus { + &:hover, + &:focus { background-image: url('../img/actions/delete-hover.svg?v=1'); } } @@ -375,14 +384,16 @@ img, object, video, button, textarea, input, select, div[contenteditable=true] { } .icon-starred { - &:hover, &:focus { + &:hover, + &:focus { background-image: url('../img/actions/star.svg?v=1'); } background-image: url('../img/actions/starred.svg?v=1'); } .icon-star { - &:hover, &:focus { + &:hover, + &:focus { background-image: url('../img/actions/starred.svg?v=1'); } } @@ -500,11 +511,13 @@ img, object, video, button, textarea, input, select, div[contenteditable=true] { background-image: url('../img/places/files-dark.svg?v=1'); } -.icon-file, .icon-filetype-text { +.icon-file, +.icon-filetype-text { background-image: url('../img/filetypes/text.svg?v=1'); } -.icon-folder, .icon-filetype-folder { +.icon-folder, +.icon-filetype-folder { background-image: url('../img/filetypes/folder.svg?v=1'); } @@ -614,4 +627,3 @@ img, object, video, button, textarea, input, select, div[contenteditable=true] { .icon-category-search { background-image: url('../img/actions/search.svg?v=1'); } - diff --git a/core/css/inputs.scss b/core/css/inputs.scss index 4d916e22f27..a3ff713d813 100644 --- a/core/css/inputs.scss +++ b/core/css/inputs.scss @@ -14,10 +14,10 @@ /* Specifically override browser styles */ input, textarea, select, button, div[contenteditable=true], div[contenteditable=false] { - font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; + font-family: var(--font-face) } .select2-container-multi .select2-choices .select2-search-field input, .select2-search input, .ui-widget { - font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif !important; + font-family: var(--font-face) !important; } /* Simple selector to allow easy overriding */ @@ -290,9 +290,11 @@ select, } /* Radio & Checkboxes */ -input { +input, label { --color-checkbox-radio-disabled: nc-darken($color-main-background, 27%); --color-checkbox-radio-border: nc-darken($color-main-background, 47%); +} +input { &[type='checkbox'], &[type='radio'] { &.radio, diff --git a/core/css/styles.scss b/core/css/styles.scss index 1acae23a545..3affa3d7096 100644 --- a/core/css/styles.scss +++ b/core/css/styles.scss @@ -87,7 +87,7 @@ body { font-weight: 400; font-size: .8em; line-height: 1.6em; - font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; + font-family: var(--font-face); color: var(--color-main-text); height: auto; } diff --git a/core/css/variables.scss b/core/css/variables.scss index 748ebd68725..c8fcc9f541e 100644 --- a/core/css/variables.scss +++ b/core/css/variables.scss @@ -1,16 +1,20 @@ -// SCSS darken/lighten function override -@function nc-darken($color, $value) { - @return darken($color, $value); +// SCSS darken/lighten function override +// if no exists +@if function-exists(nc-darken) == false { + @function nc-darken($color, $value) { + @return darken($color, $value); + } } - -@function nc-lighten($color, $value) { - @return lighten($color, $value); +@if function-exists(nc-lighten) == false { + @function nc-lighten($color, $value) { + @return lighten($color, $value); + } } // SCSS variables // DEPRECATED, please use CSS4 vars -$color-main-text: #000; -$color-main-background: #fff; +$color-main-text: #000 !default; +$color-main-background: #fff !default; // used for different active/disabled states $color-background-dark: nc-darken($color-main-background, 7%); @@ -18,7 +22,9 @@ $color-background-darker: nc-darken($color-main-background, 14%); $color-primary: #0082c9; $color-primary-text: #ffffff; -$color-primary-text-dark: nc-darken($color-primary-text, 7%); +// do not use nc-darken in case of overriding because +// primary-text is independent of color-main-text +$color-primary-text-dark: darken($color-primary-text, 7%); $color-primary-element: $color-primary; $color-primary-element-light: nc-lighten($color-primary-element, 15%); @@ -36,8 +42,8 @@ $color-text-lighter: nc-lighten($color-main-text, 30%); $image-logo: url('../img/logo.svg?v=1'); $image-login-background: url('../img/background.png?v=2'); -$color-loading-light: #777; -$color-loading-dark: #ccc; +$color-loading-light: #ccc !default; +$color-loading-dark: #777 !default; $color-box-shadow: rgba(nc-darken($color-main-background, 70%), 0.75); @@ -45,4 +51,6 @@ $color-box-shadow: rgba(nc-darken($color-main-background, 70%), 0.75); $color-border: nc-darken($color-main-background, 7%); // darker border like inputs or very visible elements $color-border-dark: nc-darken($color-main-background, 14%); -$border-radius: 3px; +$border-radius: 3px !default; + +$font-face: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif !default; |