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

Commit

Permalink
Use standard CSS gradients in Color Editor (#12861)
Browse files Browse the repository at this point in the history
  • Loading branch information
valtlai authored and petetnt committed Oct 30, 2016
1 parent 4697485 commit c77d4f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/extensions/default/InlineColorEditor/ColorEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ define(function (require, exports, module) {

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

// Update slider thumb positions
this.$hueSelector.css("bottom", (this._hsv.h / 360 * 100) + "%");
Expand Down
6 changes: 3 additions & 3 deletions src/extensions/default/InlineColorEditor/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@
float: left;
}
.color-editor section .color-selection-field .saturation-gradient {
background-image: -webkit-gradient(linear, 0% 50%, 100% 50%, from(#fff), to(rgba(255,255,255,0)));
background-image: linear-gradient(to left, hsla(0,0%,100%,0), #fff);
}
.color-editor section .color-selection-field .luminosity-gradient {
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000));
background-image: linear-gradient(hsla(0,0%,100%,0), #000);
}
.color-editor section .color-selection-field .selector-base {
width: 12px;
Expand Down Expand Up @@ -200,7 +200,7 @@
margin-right: 0px;
}
.color-editor section .hue-slider {
background-image: -webkit-linear-gradient(top, #f00, #f0f, #00f, #0ff, #0f0, #ff0, #f00);
background-image: linear-gradient(#f00, #f0f, #00f, #0ff, #0f0, #ff0, #f00);
}
.color-editor section footer {
font-size: 100%;
Expand Down

0 comments on commit c77d4f8

Please sign in to comment.