Skip to content

Commit

Permalink
Merge pull request #1786 from proneon267/patch-1
Browse files Browse the repository at this point in the history
New Update pack.rst
  • Loading branch information
freakboy3742 authored Feb 19, 2023
2 parents 69bf1ef + 542a7ce commit 69eb5c2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions changes/1786.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Some missing settings and constant values were added to the documentation of Pack.
21 changes: 19 additions & 2 deletions docs/reference/style/pack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ properties exist to control color, text alignment and so on.
It is similar in some ways to the CSS Flexbox algorithm; but dramatically
simplified, as there is no allowance for overflowing boxes.

.. admonition::

The string values defined here are the string literals that the Pack
algorithm accepts. These values are also pre-defined as Python constants in
the ``toga.style.pack`` module with the same name; however, following Python
style, the constants use upper case. For example, the Python constant
``toga.style.pack.COLUMN`` evaluates as the string literal ``"column"``.

Pack style properties
~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -30,7 +38,7 @@ visible.
``visibility``
--------------

**Values:** ``visible`` | ``none``
**Values:** ``hidden`` | ``visible`` | ``none``

**Initial value:** ``visible``

Expand Down Expand Up @@ -183,7 +191,7 @@ Defines the natural direction of horizontal content.
``font_family``
---------------

**Values:** ``system`` | ``serif``| ``sans-serif`` | ``cursive`` | ``fantasy`` | ``monospace`` | ``<string>``
**Values:** ``system`` | ``serif`` | ``sans-serif`` | ``cursive`` | ``fantasy`` | ``monospace`` | ``<string>``

**Initial value:** ``system``

Expand All @@ -196,6 +204,15 @@ A value of ``serif``, ``sans-serif``, ``cursive``, ``fantasy``, or ``monospace``

Otherwise, any font name can be specified. If the font name cannot be resolved, the system font will be used.

``font_style``
----------------

**Values:** ``normal`` | ``italic`` | ``oblique``

**Initial value:** ``normal``

The style of the font to be used.

``font_variant``
----------------

Expand Down

0 comments on commit 69eb5c2

Please sign in to comment.