Skip to content

Commit

Permalink
Fix percent inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
PRO-2684 committed Sep 26, 2024
1 parent b2dfffe commit 6a90130
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/renderer/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ function addVarInput(varItem, varObj) {
let defaultValue = varObj.default;
switch (varObj.type) { // https://github.com/openstyles/stylus/wiki/Writing-UserCSS#type
case "color":
case "colour":
varInput = document.createElement("input");
varInput.type = "color";
varInput.title = `默认值: ${defaultValue}`;
Expand All @@ -214,6 +215,8 @@ function addVarInput(varItem, varObj) {
}
break;
}
case "percent":
case "percentage":
case "number": {
const { min, max, step } = varObj;
varInput = createNumberLikeInput("number", { defaultValue, min, max, step });
Expand Down

0 comments on commit 6a90130

Please sign in to comment.