-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line numbers not working as expected #176
Comments
I also cannot get line numbers to work at all using the current example. I copy pasted the example 1:1 into this CodeSandbox just as @jwade0 did: |
Any Update on This? Facing the Same Issue |
You can try something like the following. I've adjusted the padding of the editor to 24px, and use a 14px font. .code-line {
position: relative;
}
.code-line::before {
position: absolute;
top: -8px;
left: -20px;
padding: 4px;
content: attr(line);
color: blue;
} |
position of cursor is getting messed up after adding this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems that the line numbers are added as a data attr correctly with
rehypePrism
, but there is no built in styling for the numbers. Am I missing something? I tried the example code in a codesandbox. Thanks!The text was updated successfully, but these errors were encountered: