microsoft / microsoft/monaco-editor
Documentation of DecorationOptions.minimap.color is misleading - requires hex color, but suggests rgba value
Open
Nobody has claimed this yet.
bug
editor-core
help wanted
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Link
Monaco Editor Playground Code
var jsCode = [
'"use strict";',
"function Person(age) {",
" if (age) {",
" this.age = age;",
" }",
"}",
"Person.prototype.getAge = function () {",
" return this.age;",
"};",
].join("\n");
var editor = monaco.editor.create(document.getElementById("container"), {
value: jsCode,
language: "javascript",
minimap: { enabled: true },
});
var decorations = editor.createDecorationsCollection([
{
range: new monaco.Range(3, 1, 5, 1),
options: {
isWholeLine: true,
className: "myLineDecoration",
minimap: {
color: "rgba(67, 201, 249, 0.8)",
position: monaco.editor.MinimapPosition.Inline,
}
},
}
]);
.myLineDecoration {
background: rgba(67, 201, 249, 0.8);
}
Reproduction Steps
No response
Actual (Problematic) Behavior
Expected Behavior
show blue color.
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the DecorationOptions.minimap.color API documentation and compare its documented value format with the playground example linked in the issue. Update the misleading guidance to require a hex color, then verify the example displays blue in the Monaco Editor playground.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100