diff options
Diffstat (limited to 'client/src/sass/include')
-rw-r--r-- | client/src/sass/include/_mixins.scss | 49 | ||||
-rw-r--r-- | client/src/sass/include/_variables.scss | 9 |
2 files changed, 41 insertions, 17 deletions
diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scss index d6f391a45..1da240db8 100644 --- a/client/src/sass/include/_mixins.scss +++ b/client/src/sass/include/_mixins.scss | |||
@@ -55,6 +55,18 @@ | |||
55 | hyphens: auto; | 55 | hyphens: auto; |
56 | } | 56 | } |
57 | 57 | ||
58 | @mixin apply-svg-color ($color) { | ||
59 | /deep/ svg { | ||
60 | path[fill="#000000"], g[fill="#000000"], rect[fill="#000000"] { | ||
61 | fill: $color; | ||
62 | } | ||
63 | |||
64 | path[stroke="#000000"], g[stroke="#000000"], rect[stroke="#000000"] { | ||
65 | stroke: $color; | ||
66 | } | ||
67 | } | ||
68 | } | ||
69 | |||
58 | @mixin peertube-input-text($width) { | 70 | @mixin peertube-input-text($width) { |
59 | display: inline-block; | 71 | display: inline-block; |
60 | height: $button-height; | 72 | height: $button-height; |
@@ -110,22 +122,30 @@ | |||
110 | color: #fff; | 122 | color: #fff; |
111 | background-color: #C6C6C6; | 123 | background-color: #C6C6C6; |
112 | } | 124 | } |
125 | |||
126 | my-global-icon { | ||
127 | @include apply-svg-color(#fff) | ||
128 | } | ||
113 | } | 129 | } |
114 | 130 | ||
115 | @mixin grey-button { | 131 | @mixin grey-button { |
116 | &, &:active, &:focus { | 132 | &, &:active, &:focus { |
117 | background-color: $grey-color; | 133 | background-color: $grey-background-color; |
118 | color: #585858; | 134 | color: $grey-foreground-color; |
119 | } | 135 | } |
120 | 136 | ||
121 | &:hover, &:active, &:focus, &[disabled], &.disabled { | 137 | &:hover, &:active, &:focus, &[disabled], &.disabled { |
122 | color: #585858; | 138 | color: $grey-foreground-color; |
123 | background-color: $grey-hoover-color; | 139 | background-color: $grey-background-hover-color; |
124 | } | 140 | } |
125 | 141 | ||
126 | &[disabled], &.disabled { | 142 | &[disabled], &.disabled { |
127 | cursor: default; | 143 | cursor: default; |
128 | } | 144 | } |
145 | |||
146 | my-global-icon { | ||
147 | @include apply-svg-color($grey-foreground-color) | ||
148 | } | ||
129 | } | 149 | } |
130 | 150 | ||
131 | @mixin peertube-button { | 151 | @mixin peertube-button { |
@@ -148,6 +168,15 @@ | |||
148 | @include peertube-button; | 168 | @include peertube-button; |
149 | } | 169 | } |
150 | 170 | ||
171 | @mixin button-with-icon($width: 20px, $margin-right: 3px, $top: -1px) { | ||
172 | my-global-icon { | ||
173 | position: relative; | ||
174 | width: $width; | ||
175 | margin-right: $margin-right; | ||
176 | top: $top; | ||
177 | } | ||
178 | } | ||
179 | |||
151 | @mixin peertube-button-file ($width) { | 180 | @mixin peertube-button-file ($width) { |
152 | position: relative; | 181 | position: relative; |
153 | overflow: hidden; | 182 | overflow: hidden; |
@@ -455,18 +484,10 @@ | |||
455 | } | 484 | } |
456 | } | 485 | } |
457 | 486 | ||
458 | @mixin create-button ($imageUrl) { | 487 | @mixin create-button { |
459 | @include peertube-button-link; | 488 | @include peertube-button-link; |
460 | @include orange-button; | 489 | @include orange-button; |
461 | 490 | @include button-with-icon(20px, 5px, -1px); | |
462 | .icon.icon-add { | ||
463 | @include icon(20px); | ||
464 | |||
465 | position: relative; | ||
466 | top: -1px; | ||
467 | margin-right: 5px; | ||
468 | background-image: url($imageUrl); | ||
469 | } | ||
470 | } | 491 | } |
471 | 492 | ||
472 | @mixin row-blocks { | 493 | @mixin row-blocks { |
diff --git a/client/src/sass/include/_variables.scss b/client/src/sass/include/_variables.scss index fdf33b12a..3780b7501 100644 --- a/client/src/sass/include/_variables.scss +++ b/client/src/sass/include/_variables.scss | |||
@@ -6,10 +6,13 @@ $font-regular: 400; | |||
6 | $font-semibold: 600; | 6 | $font-semibold: 600; |
7 | $font-bold: 700; | 7 | $font-bold: 700; |
8 | 8 | ||
9 | $grey-color: #E5E5E5; | 9 | $grey-background-color: #E5E5E5; |
10 | $grey-hoover-color: #EFEFEF;; | 10 | $grey-background-hover-color: #EFEFEF; |
11 | $grey-foreground-color: #585858; | ||
12 | $grey-foreground-hover-color: #303030; | ||
13 | |||
11 | $orange-color: #F1680D; | 14 | $orange-color: #F1680D; |
12 | $orange-hoover-color: #F97D46; | 15 | $orange-hover-color: #F97D46; |
13 | 16 | ||
14 | $bg-color: #fff; | 17 | $bg-color: #fff; |
15 | $fg-color: #000; | 18 | $fg-color: #000; |