marimo
marimo copied to clipboard
Add option to display rulers in notebook cells
Description
As a user, I'd like to be able to display vertical rulers in my notebook code and markdown cells so that I can easily conform to line-length requirements for linters.
The rulers should be customizable (color, position).
This feature exists in Jupyter Lab already.
Suggested solution
I was able to achieve this with a custom CSS file:
/* Vertical ruler for Marimo cells */
:root {
--ruler-position: 88ch;
}
.cm-editor {
position: relative;
}
.cm-editor::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: var(--ruler-position);
width: 1px;
background-color: rgba(22, 107, 86, 0.3);
pointer-events: none;
z-index: 10;
}
Are you willing to submit a PR?
- [ ] Yes
Alternatives
No response
Additional context
No response