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

text-align CSS support #704

Merged
merged 16 commits into from
Aug 30, 2022
Merged

text-align CSS support #704

merged 16 commits into from
Aug 30, 2022

Conversation

darrenburns
Copy link
Member

@darrenburns darrenburns commented Aug 25, 2022

image


rich_style = self.rich_style
if isinstance(renderable, Text):
renderable.stylize(rich_style)
if not renderable.justify:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't sure whether to do this if or not...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable...

@darrenburns darrenburns changed the title Text justify initial work, help text text-align CSS support Aug 26, 2022
Comment on lines +1595 to +1597
"start": "left",
"end": "right",
"justify": "full",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Textual doesn't support RTL, we can just directly map start -> left and so on.

@@ -25,4 +25,4 @@ def test_auto_refresh():
elapsed = app.run(quit_after=1, headless=True)
assert elapsed is not None
# CI can run slower, so we need to give this a bit of margin
assert elapsed >= 0.3 and elapsed < 0.6
assert 0.3 <= elapsed < 0.8
Copy link
Member Author

@darrenburns darrenburns Aug 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got some failures where elapsed was outwith the range.

@darrenburns darrenburns marked this pull request as ready for review August 26, 2022 15:31
@willmcgugan willmcgugan merged commit 9fff9db into css Aug 30, 2022
@willmcgugan willmcgugan deleted the text-justify branch August 30, 2022 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants