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

Some markdown component classes don't refresh on CSS update #3464

Closed
rodrigogiraoserrao opened this issue Oct 5, 2023 · 4 comments · Fixed by #4185
Closed

Some markdown component classes don't refresh on CSS update #3464

rodrigogiraoserrao opened this issue Oct 5, 2023 · 4 comments · Fixed by #4185
Assignees
Labels
bug Something isn't working Task

Comments

@rodrigogiraoserrao
Copy link
Contributor

The component classes s, strong, em, and code_inline aren't refreshed when CSS is reloaded and those are changed.
However, the component classes markdown-table--header and markdown-table--lines do refresh.

The video below shows this. Code is included after the video.

Screen.Recording.2023-10-05.at.11.51.57.mov
App code
from textual.app import App
from textual.widgets import Markdown

MD = """
# This is a header

| col1 | col2 |
| :- | :- |
| value 1 | value 2 |

Here's some code: `from itertools import product`.
**Bold text**
_Emphasized text_
~~strikethrough~~
"""


class MyApp(App):
    CSS_PATH = "markdown.tcss"

    def compose(self):
        yield Markdown(MD)


if __name__ == "__main__":
    MyApp().run()
.code_inline,
.em,
.strong,
.s,
.markdown-table--header,
.markdown-table--lines,
{
    color: blue;
}
@rodrigogiraoserrao rodrigogiraoserrao added bug Something isn't working Task labels Oct 5, 2023
rodrigogiraoserrao added a commit that referenced this issue Oct 5, 2023
This snapshot test will only be enforced after #3464 is fixed, at which point the snapshot test should be similar to test_component_classes_opacity, but where each sentence is slightly visible in a faded shade or red.
@willmcgugan
Copy link
Collaborator

I think this is fixed. Please confirm and close the issue if that's the case.

@rodrigogiraoserrao
Copy link
Contributor Author

This is still not fixed. Using the code from the first comment I'm able to reproduce the behaviour demonstrated in the screen recording.

@willmcgugan
Copy link
Collaborator

Do you want to take a look at this? Suspect it is an easy fix.

Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants