Skip to content

Commit

Permalink
More vars fixes
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Jun 14, 2018
1 parent 89e0e96 commit 1415877
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 62 deletions.
3 changes: 2 additions & 1 deletion core/css/css-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@
--color-border: $color-border;
--color-border-dark: $color-border-dark;
--border-radius: $border-radius;
}

--font-face: $font-face;
}
9 changes: 6 additions & 3 deletions core/css/fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
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');
}
}

@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');
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');
}
42 changes: 27 additions & 15 deletions core/css/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand All @@ -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');
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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');
}
}
Expand Down Expand Up @@ -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');
}
}
Expand Down Expand Up @@ -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');
}

Expand Down Expand Up @@ -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');
}

8 changes: 5 additions & 3 deletions core/css/inputs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion core/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
32 changes: 20 additions & 12 deletions core/css/variables.scss
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
// 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%);
$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%);

Expand All @@ -36,13 +42,15 @@ $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);

// light border like file table or app-content list
$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;
Loading

0 comments on commit 1415877

Please sign in to comment.