Commit Graph

175 Commits

Author SHA1 Message Date
Dave Pearson
b7de48cca3 Border colour percentage (#1954)
* Allow setting an additional alpha on a border

See #1863.

* Update the ChangeLog

* Add snapshot tests for the border alpha value

* Extend the border snapshot tests

While this doesn't test *every* permutation, it covers enough bases that if
something were to change it should catch it.

* Tweak a typo in the border style examples

* Add border transparency percentage to the border docs

* Add a CSS example for using border transparency

* Add Color.multiply_alpha

* Update the CHANGELOG

* Multiply the alpha on a colour rather than replace it

As requested in
https://github.com/Textualize/textual/pull/1954#pullrequestreview-1328170386

(actually required while talking in person with Will, but noted in the
above)

* Multiply the alpha on a border colour rather than replace it

As requested in
https://github.com/Textualize/textual/pull/1954#pullrequestreview-1328170386

(actually requested while talking in person with Will, but noted in the
above)
2023-03-07 14:14:17 +00:00
Dave Pearson
fcc16c0e59 Correct the example Python code for the border style (#1956)
To the best of my knowledge, and in testing myself, border and border_* are
properties of a widget's `styles` property, they're not a property of the
widget itself.
2023-03-07 09:28:02 +00:00
Rodrigo Girão Serrão
e1d36e5be8 Minor doc fixes. 2023-01-10 14:45:37 +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
a3a452b674 Highlight rule usage in references.
[skip ci]
2023-01-09 16:14:11 +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
e81779f97c Add 'See also' sections to references. 2023-01-09 15:25:47 +00:00
Rodrigo Girão Serrão
8bf211b898 Fix typo. 2023-01-09 14:14:14 +00:00
Rodrigo Girão Serrão
1300807b3a Put example outputs in first tab. 2023-01-09 13:57:04 +00:00
Rodrigo Girão Serrão
e7afcbc0b5 Add reference to 'textual borders' command. 2023-01-09 13:52:02 +00:00
Rodrigo Girão Serrão
dd6e73aa39 Add subsections for references with 2+ examples. 2023-01-09 13:50:45 +00:00
Rodrigo Girão Serrão
da9a481f1c Remove inclusion of old css types snippets.
Supposedly, this had been done in an earlier commit for all styles. Apparently, I forgot to open styles references that were one level deeper in the directory, so the pages about grid, links, and scrollbar colors still included the css types values directly in their reference pages.
2023-01-09 11:28:47 +00:00
Rodrigo Girão Serrão
196d430582 Style all Textual CSS as 'sass'
Textual CSS is better highlighted in SASS code blocks because the SASS parser seems to be more lenient.
2023-01-09 11:20:04 +00:00
Rodrigo Girão Serrão
c0d7f7cebf Add note about Textual limitation. 2023-01-07 09:47:56 +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
08baaf11f3 Refactor width reference. 2023-01-07 09:40:32 +00:00
Rodrigo Girão Serrão
2867b09923 Update visibility reference. 2023-01-06 16:38:49 +00:00
Rodrigo Girão Serrão
498f452b88 Update tint reference. 2023-01-06 14:53:18 +00:00
Rodrigo Girão Serrão
42baa0e074 Remove redundant values subsections.
[skip ci]
2023-01-06 14:41:13 +00:00
Rodrigo Girão Serrão
583b1273ac Update text style reference.
[skip ci]
2023-01-06 14:18:50 +00:00
Rodrigo Girão Serrão
a25ba1bea4 Update *opacity references. 2023-01-06 10:47:31 +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
7743feadff Add GIF to show all scrollbar colors. 2023-01-06 10:28:54 +00:00
Rodrigo Girão Serrão
c65c691b5a Rework text-align CSS reference.
[skip ci]
2023-01-05 18:35:21 +00:00
Rodrigo Girão Serrão
ffe1f4a0c4 Update scrollbar-size rule reference.
[skip ci]
2023-01-05 12:02:05 +00:00
Rodrigo Girão Serrão
73621b6867 Review reference for scrollbar-gutter. 2023-01-05 11:21:31 +00:00
Rodrigo Girão Serrão
c81a046c0c Fix and tweak scrollbar corner color reference. 2023-01-05 10:33:42 +00:00
Rodrigo Girão Serrão
3ebc78260b Update reference for all scrollbar colors. 2023-01-04 17:10:31 +00:00
Rodrigo Girão Serrão
d708c53e6c Fix links in link index. 2023-01-04 13:32:08 +00:00
Rodrigo Girão Serrão
745ec529b9 Update padding reference. 2023-01-04 11:43:47 +00:00
Rodrigo Girão Serrão
56e5e39740 Refactor overflow reference.
[skip ci]
2023-01-04 11:26:07 +00:00
Rodrigo Girão Serrão
01fcfe5459 Rework outline reference. 2023-01-04 10:34:50 +00:00
Rodrigo Girão Serrão
7047cc494f Update reference for opacity.
[skip ci]
2022-12-22 18:38:27 +00:00
Rodrigo Girão Serrão
8c0f1dc83c Fix links to CSS types. 2022-12-22 18:13:36 +00:00
Rodrigo Girão Serrão
9d8e4c53dc Update reference for offset. 2022-12-22 18:01:03 +00:00
Rodrigo Girão Serrão
296dd73565 Update reference for min/max width/height. 2022-12-22 17:46:08 +00:00
Rodrigo Girão Serrão
d5da65a44b Tweak template. 2022-12-22 17:45:42 +00:00
Rodrigo Girão Serrão
b3d80c432e Update reference for margin. 2022-12-22 15:43:11 +00:00
Rodrigo Girão Serrão
f807df73f9 Update links references. 2022-12-22 14:41:16 +00:00
Rodrigo Girão Serrão
a61405e792 Add direct links to sub rules. 2022-12-22 14:17:38 +00:00
Rodrigo Girão Serrão
164678ab66 Fix reference for layout. 2022-12-22 14:05:17 +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
3495a9b7e1 Add template files for consistency. 2022-12-22 11:26:04 +00:00
Rodrigo Girão Serrão
a1a7b4db2a Update grid references.
[skip ci]
2022-12-21 23:04:56 +00:00
Rodrigo Girão Serrão
b22352874d Update height reference. 2022-12-21 22:21:39 +00:00
Rodrigo Girão Serrão
03cbd50d6d Update dock reference. 2022-12-21 22:19:09 +00:00
Rodrigo Girão Serrão
db9ea459c8 Minor fixes for consistency. 2022-12-21 22:14:52 +00:00
Rodrigo Girão Serrão
95a1c8f7be Update reference for content align rule. 2022-12-21 22:09:58 +00:00
Rodrigo Girão Serrão
969d3057b3 Update rule color reference. 2022-12-21 22:06:31 +00:00
Rodrigo Girão Serrão
bc574414b9 Update box-sizing. 2022-12-21 21:54:40 +00:00