Optimize font family integration #7

Merged
revengeday merged 2 commits from kaiserkiwi/cyber-circle-creator:font-family into main 2024-11-17 11:09:01 +00:00
Collaborator

Description

This pull request solves the issue with the font when the file is missing or couldn't be loaded. A safe fallback was chosen with monospace, so the page doesn't look off when "Times New Roman" or stuff like that is the system/browser fallback.

Additionally I did two things:

  • I changed the font-family for buttons and inputs to inherit to make it more future proof and reduce code duplication.
  • I removed the .woff filetype as this isn't needed for 8 years now.

How to test

  • Move the font declaration (@font-face) from the CSS file or remove the font from the folder.
  • Load the page
  • There should still be a monospaced font
  • Buttons and inputs still are monospaced
## Description This pull request solves the issue with the font when the file is missing or couldn't be loaded. A safe fallback was chosen with `monospace`, so the page doesn't look off when "Times New Roman" or stuff like that is the system/browser fallback. Additionally I did two things: - I changed the font-family for buttons and inputs to `inherit` to make it more future proof and reduce code duplication. - I removed the `.woff` filetype as this isn't needed for 8 years now. ## How to test - Move the font declaration (`@font-face`) from the CSS file or remove the font from the folder. - Load the page - There should still be a monospaced font - Buttons and inputs still are monospaced
kaiserkiwi added 2 commits 2024-11-17 05:49:55 +00:00
Info: WOFF2 is supported in all major browsers since 2016
- Change font family for input and button to inherit to reduce duplication and make code more maintainable
kaiserkiwi requested review from revengeday 2024-11-17 05:50:08 +00:00
kaiserkiwi requested review from marta 2024-11-17 05:50:08 +00:00
revengeday merged commit f270e3f06e into main 2024-11-17 11:09:01 +00:00
kaiserkiwi deleted branch font-family 2024-11-20 04:16:50 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: revengeday/cyber-circle-creator#7
No description provided.