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

Use standard CSS gradients in Color Editor #12861

Merged
merged 1 commit into from
Oct 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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