Commit graph

117 commits

Author SHA1 Message Date
Will McGugan
bba0b4f466 test fixes 2025-02-03 15:51:41 +00:00
Will McGugan
a0910ceb30 wrap and overflow docs 2025-01-27 12:18:59 +00:00
Will McGugan
ed4b11ef2a documented position absolute 2024-11-23 20:02:22 +00:00
Will McGugan
fd1acb9577 fix broken styles reference 2024-11-19 16:26:35 +00:00
Darren Burns
a274129081
Fixing yet more tests 2024-10-28 16:17:04 +00:00
Will McGugan
4a822bc53e
background tint style (#5117)
* background tint style

* changelog

* hlines

* doc fix

* added tint

* missing snapshots
2024-10-14 14:50:19 +01:00
TomJGooding
2b64b6e4b9 clean trailing whitespace in css examples 2024-08-27 17:38:15 +01:00
Will McGugan
53912c641f hatch hotfix 2024-06-05 17:36:39 +01:00
Will McGugan
b38b170d99 hatch docs 2024-06-05 15:11:14 +01:00
Akintola Richard Olaoluwa
95f0c39106
Add panel Border type to docs (#4035)
* Add panel Border type to docs

* Add panel border description
* Add Label with panel border to Grid
* Add style for panel id and change grid-size from 3 5 to 4 4

issues #3978

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2024-01-17 14:23:27 +00:00
Rodrigo Girão Serrão
d993cce505
Rename link-hover-* rules to link-*-hover. (#3736)
Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2023-11-29 14:09:58 +00:00
Will McGugan
eed7a94eda fix example 2023-11-29 10:18:36 +00:00
Will McGugan
370f5f7214
Keyline rule (#3669)
* canvas

* imports

* more box drawing

* lines

* lines

* box drawing table

* fix box table

* tweak test

* canvas color

* simplify canvas

* optimization

* clipping

* render experiment

* keyline css

* tests

* don't draw around invisible widgets

* optimize

* snapshot test

* docs and examples

* tab size

* disclaimer

* docs

* changelog

* snapshots

* accidental add

* rename for consistency

* simplify color

* docstrings

* comment

* snapshots

* micro optimize

* micro-optimization

* typing

* set over list

* remove comment

* docstring

* punctuation

* Update docs/styles/keyline.md

Co-authored-by: Darren Burns <darrenburns@users.noreply.github.com>

---------

Co-authored-by: Darren Burns <darrenburns@users.noreply.github.com>
2023-11-27 11:54:53 +00:00
Dave Pearson
414096233b
Make all styles reference examples capable of being run standalone
Also move the declarations of the stylesheets into the app classes.

See #3650
2023-11-08 14:37:01 +00:00
Rodrigo Girão Serrão
6f00943c14
Fix imports. 2023-10-26 12:15:55 +01:00
Rodrigo Girão Serrão
5ee0ebfef4
Rename CSS files to TCSS.
Related issue: #3137.
2023-08-22 13:21:17 +01:00
Rodrigo Girão Serrão
6523fbaff1 Fix tests. 2023-05-18 16:27:09 +01:00
Will McGugan
f53c3cd589
container refactor (#2377)
* container refactor

* Rearrange css

* changelog

* try timer updates

* force update

* sleep idle

* Restore updates
2023-04-26 13:36:08 +01:00
Dave Pearson
b896e9d7f9
Update tests to handle scroll changes to Container
See #2361.
2023-04-24 11:10:37 +01:00
Will McGugan
0509cf8948
Border style (#2292)
* border styles

* docs for border styles

* fix tests

* tests

* tests and docs

* changelog

* implement auto

* style information fix
2023-04-16 12:31:39 +01:00
Rodrigo Girão Serrão
9fa7de13dc Update docs with new border type.
Related PRs: #2139.
Related comments: https://github.com/Textualize/textual/pull/2139\#discussion_r1149249378
2023-03-27 16:55:26 +01:00
Rodrigo Girão Serrão
2a810f8c87
Implement border (sub)title. (#2064)
* Add Widget.border_title and border_subtitle.

Related issues: #1864

* Test setting border_(sub)title.

* Add border (sub)title references to StylesCache.

These internal references will make it easier for the instance of 'StylesCache' to know which border (sub)title to use, if/when needed.

* Add method to render border label.

* Add styles to align border (sub)title.

* Render border labels.

* Update styles template.

* Make new 'render_row' parameters optional.

* Add (sub)title border snapshot tests.

* Document border (sub)title and styles.

* Pass (sub)title directly as arguments.

Get rid of the watchers to make data flow easier to follow.
Related comment: https://github.com/Textualize/textual/pull/2064/files\#r1137746697

* Tweak example.

* Fix render_border_label.

This was wrong because border labels can be composed of multiple segments if they contain multiple styles. Additionally, we want to render a single blank space of padding around the title.

* Ensure we get no label when there's no space.

* Add tests for border label rendering.

* 'render_border_label' now returns iterable of segments.

* Add label to render_row.

* Fix calling signature in tests.

* Add padding to snapshot tests.

* Fix changelog.

* Update snapshot tests.

* Update snapshot tests.

* Border labels expand if there's no corners.

* Update CHANGELOG.md

* Fix docs.

* Remove irrelevant line.

* Fix snapshot tests.

* Don't share Console among tests.

* Simplify example in styles guide.

* Avoid expensive function call when possible.

* rewording

* positive branch first

* remove wasteful indirection

* fix changelog

---------

Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2023-03-22 11:07:38 +00:00
Rodrigo Girão Serrão
cc8f65259e Merge branch 'main' into add-containers 2023-03-13 12:00:08 +00:00
Will McGugan
9c5e0336f8
Fix scrollbar (#2024)
* Fix scrollbar

* changelog PR

* fix snapshots
2023-03-13 10:39:14 +00:00
Rodrigo Girão Serrão
8565d3cef6 Renamed 'Vertical' to 'VerticalScroll'.
Related issues: #1957.
2023-03-08 18:31:24 +00:00
Will McGugan
11d10db1ab fast path for scrolling 2023-02-17 10:42:42 +00:00
Rodrigo Girão Serrão
d41471034a Fix failing tests. 2023-01-09 16:39:12 +00:00
Rodrigo Girão Serrão
130d8b8d05 Increase negative y offset. 2023-01-09 16:34:24 +00:00
Rodrigo Girão Serrão
15691b4451 Remove debugging style. 2023-01-09 16:34:06 +00:00
Rodrigo Girão Serrão
a1b9d4b2c5 Fix examples. 2023-01-09 16:11:45 +00:00
Rodrigo Girão Serrão
2827edcd49 Add example with all padding types. 2023-01-09 15:43:34 +00:00
Rodrigo Girão Serrão
71b859b6e2 Add thorough example for all outlines. 2023-01-09 13:49:32 +00:00
Rodrigo Girão Serrão
aad41b8de0 Fix height example.
[skip ci]
2023-01-07 09:44:39 +00:00
Rodrigo Girão Serrão
8de6d8fd69 Add new width comparison example. 2023-01-07 09:40:03 +00:00
Rodrigo Girão Serrão
2217a8f5fa Add new visibility example.
This new example shows how we can have an invisible container with visible children.
2023-01-06 16:38:31 +00:00
Rodrigo Girão Serrão
d69168a922 Update visibility example to use labels. 2023-01-06 16:37:41 +00:00
Rodrigo Girão Serrão
ee4b2cfe9e Update tint example to use labels. 2023-01-06 14:53:07 +00:00
Rodrigo Girão Serrão
72d3171a79 Add example with all text styles. 2023-01-06 14:18:21 +00:00
Rodrigo Girão Serrão
1276629431 Update example. 2023-01-06 14:18:07 +00:00
Rodrigo Girão Serrão
c7c352a38a Replace statics with labels.
[skip ci]
2023-01-06 10:56:55 +00:00
Rodrigo Girão Serrão
042bc3b3fe Improve text-align example.
Replace statics with labels; change to a 2 x 2 grid layout to make it easier to see the difference between 'center' and 'justify'; increase readability by setting 'color: auto' in the labels.
2023-01-06 10:41:46 +00:00
Rodrigo Girão Serrão
f457afd826 Add example for all scrollbar size rules. 2023-01-05 12:01:41 +00:00
Rodrigo Girão Serrão
5b6bedd8c6 Fix example to use labels. 2023-01-05 12:01:23 +00:00
Rodrigo Girão Serrão
9b53c7a704 Update base scrollbar example. 2023-01-04 17:10:12 +00:00
Rodrigo Girão Serrão
14f0240d6a Add example for (background) scrollbar active/hover. 2023-01-04 17:09:58 +00:00
Rodrigo Girão Serrão
7fb00f531c Add example for corner colors. 2023-01-04 17:09:35 +00:00
Rodrigo Girão Serrão
454d36cdc7 Use labels instead of static. 2023-01-04 11:43:38 +00:00
Rodrigo Girão Serrão
52497172b0 Add example to compare border and outline. 2023-01-04 10:34:37 +00:00
Rodrigo Girão Serrão
0fe5a98033 Use labels instead of statics. 2023-01-04 10:34:22 +00:00
Rodrigo Girão Serrão
bebd054e5e Update opacity example. 2022-12-22 18:38:14 +00:00