-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: first pass at base fonts, colours #11
Conversation
634f725
to
c732753
Compare
I reworked the file structure a bit:
This might need more fine-tuning as we build stuff out but in theory the CSS for this theme should be relatively light, unless we're building out custom stuff (like the mobile header). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand how the clamping works, but it does work as described!
Thanks Derrick! 🎉
Me neither 😅 Thomas included a link to a calculator in the Figma file that I should've included here, the values you get are kind of wild but at least you can check what two font sizes would turn into. |
# [1.2.0-alpha.1](v1.1.0...v1.2.0-alpha.1) (2023-05-25) ### Bug Fixes * correct block formatting error in the mobile header ([#22](#22)) ([96e727b](96e727b)) * remove style that doesn't work from theme.json ([#31](#31)) ([0762bac](0762bac)) * remove unnecessary spacing from navigation menu ([#20](#20)) ([9e8fbdd](9e8fbdd)) * replace query with HPB in no-results view ([#39](#39)) ([c77aa29](c77aa29)) ### Features * add archive, author archive templates ([#35](#35)) ([927a982](927a982)) * add block styles; tweak nav styles ([#21](#21)) ([7e2c22a](7e2c22a)) * add content width and wide width, and apply the wide width to the header/footer ([#15](#15)) ([9d53a26](9d53a26)) * add copyright symbol to footer ([#34](#34)) ([7ce6f74](7ce6f74)) * add front page template ([#23](#23)) ([7f44cfe](7f44cfe)) * add greys from WordPress to custom variables ([#25](#25)) ([08f2d7b](08f2d7b)) * add initial search template ([#36](#36)) ([6c80dba](6c80dba)) * add spacing scale ([#19](#19)) ([8c7ae41](8c7ae41)) * add styles to homepage posts block, post carousel ([#38](#38)) ([6d5f871](6d5f871)) * adding desktop header MVP ([#17](#17)) ([f155af4](f155af4)) * first pass at base fonts, colours ([#11](#11)) ([bf6b91b](bf6b91b)) * first pass at initial footer pattern ([#24](#24)) ([301852d](301852d)) * initial mobile header pattern ([#18](#18)) ([b088c54](b088c54)) * initial pass at comments styles ([#27](#27)) ([f04de4b](f04de4b)) * initial single post layout ([#26](#26)) ([603abb7](603abb7)) * update dropcap height and size, pullquotes, captions ([3d8c3f0](3d8c3f0))
🎉 This PR is included in version 1.2.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [1.2.0](v1.1.0...v1.2.0) (2023-06-05) ### Bug Fixes * correct block formatting error in the mobile header ([#22](#22)) ([96e727b](96e727b)) * correct spacer block values ([#42](#42)) ([05980d9](05980d9)) * remove style that doesn't work from theme.json ([#31](#31)) ([0762bac](0762bac)) * remove style.css from the theme repo ([#32](#32)) ([51d849f](51d849f)) * remove unnecessary spacing from navigation menu ([#20](#20)) ([9e8fbdd](9e8fbdd)) * replace query with HPB in no-results view ([#39](#39)) ([c77aa29](c77aa29)) ### Features * add archive, author archive templates ([#35](#35)) ([927a982](927a982)) * add block style to 'flatten' mobile nav ([#37](#37)) ([7b00671](7b00671)) * add block styles; tweak nav styles ([#21](#21)) ([7e2c22a](7e2c22a)) * add content width and wide width, and apply the wide width to the header/footer ([#15](#15)) ([9d53a26](9d53a26)) * add copyright symbol to footer ([#34](#34)) ([7ce6f74](7ce6f74)) * add front page template ([#23](#23)) ([7f44cfe](7f44cfe)) * add greys from WordPress to custom variables ([#25](#25)) ([08f2d7b](08f2d7b)) * add initial search template ([#36](#36)) ([6c80dba](6c80dba)) * add spacing scale ([#19](#19)) ([8c7ae41](8c7ae41)) * add styles to homepage posts block, post carousel ([#38](#38)) ([6d5f871](6d5f871)) * adding desktop header MVP ([#17](#17)) ([f155af4](f155af4)) * building out 404 page ([#43](#43)) ([514111e](514111e)) * first pass at base fonts, colours ([#11](#11)) ([bf6b91b](bf6b91b)) * first pass at initial footer pattern ([#24](#24)) ([301852d](301852d)) * initial mobile header pattern ([#18](#18)) ([b088c54](b088c54)) * initial pass at comments styles ([#27](#27)) ([f04de4b](f04de4b)) * initial single post layout ([#26](#26)) ([603abb7](603abb7)) * update dropcap height and size, pullquotes, captions ([3d8c3f0](3d8c3f0))
🎉 This PR is included in version 1.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
This PR takes a first pass at setting up the theme's default font sizing and colours, based on the mockups.
How to test the changes in this Pull Request:
I'm going to break this out into two sections, since the review process is pretty separate.
Fonts
Font mock-ups for reference
From Thomas's designs -- clamping notes and CSS:
h1
-h6
.18px
,1.6667
line height14px
,1.5
line height (slightly different from the attached mockups, but had been updated elsewhere in Figma).16px
,1.5
line-height18px
,1.6667
line height20px
-22px
,1.5454
line height24px
-36px
,1.3333
line-height28px
-48px
,1.25
line-height32px
-64px
,1.25
line-height28px
-48px
,1.25
line-height24px
-36px
,1.3333
line-height20px
-22px
,1.5454
line-height18px
,1.6667
line height, all-caps16px
,1.5
line height, all-caps, normal weightSome notes about the fonts:
The body and different custom font sizes don't have a way to set a line height yet, so I added them as custom CSS properties and referenced them in the CSS.
Not all of the font sizes actually show the size value in the editor dropdown. This is because I've used
clamp
outside of the normal JSON formatting for fluid typography, to follow the breakpoints @thomasguillot included in the design.Using WordPress's fluid typography, the font sizes would be formatted like:
... and the breakpoints would be a minimum screen size of
768px
and a maximum screen size of1600px
. In the designs, the breakpoints are actually a minimum screen size of360px
and a maximum screen size of992px
.I think the lack of numbers is a reasonable trade off for the near-term --
rems
are pretty meaningless to most! -- and I hope that the clamping min and max size is something we can control down the road (this is the closest issue I could find for now: WordPress/gutenberg#50189).Colours
Colour mockups for reference
Some notes about the colours:
The colour labels don't match the mockup, but that's on purpose: I used a combination of this FSE naming convention recommendation and this resource for words like "Quartary", but I'm open to feedback beyond that too!
The slugs are used to generate CSS classes for the different colours, so we want to be able to use a naming structure that will make sense across multiple style variations.
Other information: