Skip to content
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

[revealjs] annotations move to the other side of the chunk when using line highlighting #7104

Closed
cderv opened this issue Oct 2, 2023 · 1 comment
Assignees
Labels
bug Something isn't working revealjs Issues with the revealjs format themes Related to HTML theming or any other style related issue (like highlight-style)
Milestone

Comments

@cderv
Copy link
Collaborator

cderv commented Oct 2, 2023

I usually write my code chunks with a blank line between the chunk options and the code. The issue I'm running into with code-line-numbers and code annotation is slightly different, potentially because of this. I'm seeing the annotations move to the other side of the chunk.

---
format: revealjs
execute:
  echo: true
---

```{r}
#| code-line-numbers: "|1|2|3"

1 + 1 #<1>
2 + 2 #<2>
3 + 3 #<3>
```
1.  hello
2.  mello
3.  jello
code-line-numbers-annotation.mov

Originally posted by @mine-cetinkaya-rundel in #7042 (comment)

@cderv
Copy link
Collaborator Author

cderv commented Oct 2, 2023

@mine-cetinkaya-rundel I moved to a new issue because it is slightly different issue when #7042.

This is a CSS problem because of code-line-numbers with several lines to highlight one after the other.

code.sourceCode .code-annotation-anchor {
z-index: 100;
position: absolute;
right: 0.5em;
left: inherit;
}

With left: inherit, it creates issue when going though fragment reveal for each highlighted code line.

Thanks for the report !

@cderv cderv added bug Something isn't working revealjs Issues with the revealjs format themes Related to HTML theming or any other style related issue (like highlight-style) labels Oct 2, 2023
@cderv cderv self-assigned this Oct 2, 2023
@cderv cderv added this to the v1.4 milestone Oct 2, 2023
@cderv cderv closed this as completed in 3bfd5dc Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working revealjs Issues with the revealjs format themes Related to HTML theming or any other style related issue (like highlight-style)
Projects
None yet
Development

No branches or pull requests

1 participant