Skip to content

Docs tweaks #19

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

Merged
merged 3 commits into from
May 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/source/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ and then can be [mounted][textual.screen.Screen.mount] or

### Sizing

When [creating it][textual_canvas.canvas.Canvas] you provide a
width and a height of the canvas in "pixels" Note that these values are the
dimensions of the canvas that the "pixels" are drawn on, not the size of the
widget; the widget itself is sized using all the normal Textual styling and
geometry rules.
When [creating it][textual_canvas.canvas.Canvas] you provide a width and a
height of the canvas in "pixels". Note that these values are the dimensions
of the canvas that the "pixels" are drawn on, not the size of the widget;
the widget itself is sized using all the [normal Textual styling and
geometry rules](https://textual.textualize.io/guide/layout/).

To illustrate, here are two `Canvas` widgets, one where the widget is bigger
than the canvas, and one where the canvas is bigger than the widget:
Expand Down Expand Up @@ -48,8 +48,8 @@ There are three main colours to consider when working with `Canvas`:

#### Widget vs canvas background

The difference ion the first two items listed above might not seem obvious
to start with. The `Canvas` widget, like all other Textual widgets, has a
The difference in the first two items listed above might not seem obvious to
start with. The `Canvas` widget, like all other Textual widgets, has a
[background](https://textual.textualize.io/styles/background/); you can
style this with CSS just as you always would. But the canvas itself -- the
area that you'll be drawing in inside the widget -- can have its own
Expand Down
Loading