Skip to content

Commit

Permalink
chore(typography): Drop typography.base.color
Browse files Browse the repository at this point in the history
For #27
  • Loading branch information
gadenbuie committed Oct 16, 2024
1 parent 3d33f18 commit 69798ea
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
4 changes: 0 additions & 4 deletions docs/pkg/py/typography.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,6 @@ line_height
: The line height of the text. Line height refers to the vertical space
between lines of text.

color

: The color of the text. Can be any CSS-compatible color definition.

### BrandTypographyHeadings { #brand_yaml.typography.BrandTypographyHeadings }

```python
Expand Down
3 changes: 0 additions & 3 deletions pkg-py/src/brand_yaml/typography.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,6 @@ class BrandTypographyBase(
BrandTypographyOptionsWeight,
BrandTypographyOptionsSize,
BrandTypographyOptionsLineHeight,
BrandTypographyOptionsColor,
):
"""
Typographic settings for base (or body) text.
Expand All @@ -869,8 +868,6 @@ class BrandTypographyBase(
line_height
The line height of the text. Line height refers to the vertical space
between lines of text.
color
The color of the text. Can be any CSS-compatible color definition.
"""

model_config = ConfigDict(extra="forbid")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
}
},
"typography": {
"base": {
"color": "#1b1818"
},
"fonts": [],
"headings": {
"color": "#87CEEB"
Expand Down
4 changes: 1 addition & 3 deletions pkg-py/tests/test_typography.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def test_brand_typography_fields_base():
"weight",
"size",
"line_height",
"color",
}


Expand Down Expand Up @@ -601,8 +600,7 @@ def test_brand_typography_ex_color(snapshot_json):
color = brand.color
assert color.palette is not None

assert isinstance(t.base, BrandTypographyBase)
assert t.base.color == color.foreground
assert t.base is None # base color is set via color.foreground

assert isinstance(t.headings, BrandTypographyHeadings)
assert t.headings.color == color.primary
Expand Down

0 comments on commit 69798ea

Please sign in to comment.