Commit graph

30 commits

Author SHA1 Message Date
Will McGugan
f0cfabb4d4 css styles 2025-01-27 18:58:24 +00:00
Will McGugan
d44788a29f docs 2025-01-27 15:02:07 +00:00
Rodrigo Girão Serrão
0e6769721b
Show TCSS as css instead of sass. 2023-12-20 17:11:30 +00:00
Dave Pearson
6a76a7e221
Fix up highlights for border subtitle align example 2023-11-08 15:02:54 +00:00
Rodrigo Girão Serrão
5ee0ebfef4
Rename CSS files to TCSS.
Related issue: #3137.
2023-08-22 13:21:17 +01:00
dmunozv04
52d0586f5d Fix doc links 2023-08-08 13:27:13 +02: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
48d0547d86 Merge branch 'main' into fix-2107 2023-03-23 11:04:21 +00:00
Rodrigo Girão Serrão
559f976f78 Add more consistent phrasing.
Related issues: #2107
2023-03-23 11:04:17 +00:00
Rodrigo Girão Serrão
f9922ebe29 Improve subsection titles.
Related issues: #2108
Related PRs: #2110, #2064
2023-03-22 23:00:13 +00:00
Rodrigo Girão Serrão
9c672e69f0 Fix missing border example.
Related issues: #2108
Related PRs: #2064
2023-03-22 21:05:10 +00: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
69a143442c Inline css type values in their reference.
[skip ci]
2023-01-06 14:50:31 +00:00
Rodrigo Girão Serrão
d27e13a49a Add text-align CSS type. 2023-01-05 18:33:51 +00:00
Rodrigo Girão Serrão
8fd118c4bc Add overflow CSS type. 2023-01-04 11:25:47 +00:00
Rodrigo Girão Serrão
f807df73f9 Update links references. 2022-12-22 14:41:16 +00:00
Rodrigo Girão Serrão
a89a4b93e0 Fix table. 2022-12-22 14:19:55 +00:00
Rodrigo Girão Serrão
7cb630cc3b Update reference for layer(s).
[skip ci]
2022-12-22 12:16:09 +00:00
Rodrigo Girão Serrão
ea60ddc5e1 Create type <name>. 2022-12-22 11:53:17 +00:00
Rodrigo Girão Serrão
3495a9b7e1 Add template files for consistency. 2022-12-22 11:26:04 +00:00
Rodrigo Girão Serrão
a3ff968c6c Refactor integer type. 2022-12-21 22:45:50 +00:00
Rodrigo Girão Serrão
e19ddf0247 Fix tables of values. 2022-12-21 22:14:03 +00:00
Rodrigo Girão Serrão
bc59c855b0 Add reference for border type. 2022-12-21 21:37:26 +00:00
Rodrigo Girão Serrão
201c136f80 Update percentage type reference. 2022-12-21 21:05:44 +00:00
Rodrigo Girão Serrão
32fb2ec147 Add pages for horizontal and vertical types. 2022-12-21 20:58:27 +00:00
Rodrigo Girão Serrão
cf6cd06a33 Add CSS type number. 2022-12-21 19:41:19 +00:00
Rodrigo Girão Serrão
bf2000f9b5 Create subfolder for syntax snippets. 2022-12-21 19:40:38 +00:00
Rodrigo Girão Serrão
bcd08d2d46 Remove css type <fractional>. 2022-12-21 17:52:15 +00:00
Rodrigo Girão Serrão
52b30c8d3b Add snippets for syntax code blocks.
When defining the formal syntax of CSS rules we will use a syntax similar to that of the MDN docs and we want to be able to link directly from the syntax to the CSS types involved, so we cannot do that from within a markdown code block. Instead, we use explicit HTML that we include in two snippets so that it is easier to maintain.
2022-12-21 17:32:23 +00:00
Rodrigo Girão Serrão
dfcaada0b8 Move snippets to top level of docs. 2022-12-21 17:30:55 +00:00