Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit c77d4f8

Browse files
valtlaipetetnt
authored andcommitted
Use standard CSS gradients in Color Editor (#12861)
1 parent 4697485 commit c77d4f8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/extensions/default/InlineColorEditor/ColorEditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ define(function (require, exports, module) {
171171

172172
// Update gradients in color square & opacity slider
173173
this.$selectionBase.css("background-color", colorObject.toHexString());
174-
this.$opacityGradient.css("background-image", "-webkit-gradient(linear, 0% 0%, 0% 100%, from(" + hueColor + "), to(transparent))");
174+
this.$opacityGradient.css("background-image", "linear-gradient(" + hueColor + ", transparent)");
175175

176176
// Update slider thumb positions
177177
this.$hueSelector.css("bottom", (this._hsv.h / 360 * 100) + "%");

src/extensions/default/InlineColorEditor/css/main.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@
135135
float: left;
136136
}
137137
.color-editor section .color-selection-field .saturation-gradient {
138-
background-image: -webkit-gradient(linear, 0% 50%, 100% 50%, from(#fff), to(rgba(255,255,255,0)));
138+
background-image: linear-gradient(to left, hsla(0,0%,100%,0), #fff);
139139
}
140140
.color-editor section .color-selection-field .luminosity-gradient {
141-
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000));
141+
background-image: linear-gradient(hsla(0,0%,100%,0), #000);
142142
}
143143
.color-editor section .color-selection-field .selector-base {
144144
width: 12px;
@@ -200,7 +200,7 @@
200200
margin-right: 0px;
201201
}
202202
.color-editor section .hue-slider {
203-
background-image: -webkit-linear-gradient(top, #f00, #f0f, #00f, #0ff, #0f0, #ff0, #f00);
203+
background-image: linear-gradient(#f00, #f0f, #00f, #0ff, #0f0, #ff0, #f00);
204204
}
205205
.color-editor section footer {
206206
font-size: 100%;

0 commit comments

Comments
 (0)