Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CSS keyword support #20

Merged
merged 11 commits into from
Mar 7, 2025
Merged

Add CSS keyword support #20

merged 11 commits into from
Mar 7, 2025

Conversation

sasoder
Copy link
Collaborator

@sasoder sasoder commented Feb 26, 2025

Fixes #17

@sasoder sasoder self-assigned this Feb 26, 2025
peschwartz and others added 4 commits February 28, 2025 11:37
Update testbed to use ABSOLUTE and RELATIVE sizes for testing. closes #24
Support CSS font size keywords for iOS #5
CSS font size keywords tests for iOS #10
feat: CSS keyword support for windows. #6

feat: tests added for CSS font support windows, #11
feat: CSS keyword support for cocoa #3

feat: added Cocoa CSS keyword tests #8
@peschwartz peschwartz changed the title Add CSS keyword constants to Travertino and update core style component Add CSS keyword support Mar 5, 2025
Functionality for managing relative and absolute font size in GTK
test run and pass 
reverting to a non-explosive solution since it doesn't seem to work to use relative font sizes with Pango

closes #4
closes #9
Copy link
Collaborator

@Jacmol Jacmol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Copy link
Collaborator Author

@sasoder sasoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Only concern for me is the GTK relative font size test.

assert 8 * scale < int(self.font.get_size() / Pango.SCALE) < 18 * scale
elif expected in RELATIVE_FONT_SIZES:
scale = RELATIVE_FONT_SIZE_SCALE.get(expected, 1.0)
assert 8 * scale < int(self.font.get_size() / Pango.SCALE) < 18 * scale
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be testing the size relative to the parent font size, rather than its own size.

@peschwartz peschwartz merged commit 0f81681 into main Mar 7, 2025
93 of 94 checks passed
Copy link
Collaborator

@carltestar carltestar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: general Travertino changes
5 participants