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: Morning style variation. #261

Merged
merged 11 commits into from
Sep 24, 2024
338 changes: 338 additions & 0 deletions styles/morning.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,338 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 3,
"title": "Morning",
"settings": {
"color": {
"palette": [
{
"color": "#DFDCD7",
"name": "Base",
"slug": "base"
},
{
"color": "#191919",
"name": "Contrast",
"slug": "contrast"
},
{
"color": "#7A9BDB",
"name": "Accent 1",
"slug": "accent-1"
},
{
"color": "#F7E6FF",
"name": "Accent 2",
"slug": "accent-2"
},
{
"color": "#182949",
"name": "Accent 3",
"slug": "accent-3"
},
{
"color": "#5F5F5F",
"name": "Primary",
"slug": "primary"
},
{
"color": "#D7D3CC",
"name": "Secondary",
"slug": "secondary"
},
{
"color": "#19191933",
"name": "Opacity 20%",
"slug": "opacity-20"
}
]
}
},
"styles": {
"color": {
"text": "var:preset|color|primary"
},
"typography": {
"fontFamily": "var:preset|font-family|ysabeau-office",
"fontSize": "1.5rem",
"fontStyle": "normal",
"fontWeight": "400",
"letterSpacing": "-0.24px",
"lineHeight": "1.5"
},
"blocks": {
"core/button": {
"variations": {
"outline": {
"border": {
"color": "currentColor"
}
}
}
},
"core/code": {
"color": {
"text": "var:preset|color|contrast",
"background": "var:preset|color|secondary"
}
},
"core/navigation": {
"typography": {
"fontSize": "1.25rem"
}
},
"core/paragraph": {
"elements": {
"link": {
"color": {
"text": "var:preset|color|contrast"
}
}
}
},
"core/post-author-name": {
"typography": {
"fontSize": "var:preset|font-size|medium"
},
"color": {
"text": "var:preset|color|contrast"
},
"elements": {
"link": {
"color": {
"text": "var:preset|color|contrast"
},
"typography": {
"textDecoration": "underline"
},
":hover": {
"typography": {
"textDecoration": "none"
}
}
}
}
},
"core/post-terms": {
"typography": {
"fontWeight": "400",
"fontSize": "var:preset|font-size|medium"
},
"color": {
"text": "var:preset|color|contrast"
},
"elements": {
"link": {
"color": {
"text": "var:preset|color|contrast"
},
"typography": {
"textDecoration": "underline"
},
":hover": {
"typography": {
"textDecoration": "none"
}
}
}
}
},
"core/post-title": {
"typography": {
"fontWeight": "900",
"letterSpacing": "-0.96px"
},
"elements": {
"link": {
"color": {
"text": "var:preset|color|contrast"
}
}
}
},
"core/pullquote": {
"color": {
"text": "var:preset|color|contrast"
},
"typography": {
"fontSize": "var:preset|font-size|x-large",
"letterSpacing": "-0.76px"
},
"elements": {
"cite": {
"typography": {
"fontSize": "var:preset|font-size|medium",
"letterSpacing": "-0.14px"
},
"color": {
"text": "var:preset|color|primary"
}
}
}
},
"core/quote": {
"color": {
"text": "var:preset|color|contrast"
},
"typography": {
"fontSize": "1.5rem",
"fontWeight": "500",
"letterSpacing": "-0.18px"
},
"elements": {
"cite": {
"typography": {
"fontSize": "var:preset|font-size|medium",
"fontWeight": "300",
"letterSpacing": "-0.14px"
},
"color": {
"text": "var:preset|color|primary"
}
}
}
},
"core/site-tagline": {
"typography": {
"fontSize": "var:preset|font-size|large"
}
},
"core/site-title": {
"typography": {
"fontFamily": "var:preset|font-family|ysabeau-office",
"fontSize": "var:preset|font-size|large",
"fontWeight": "700",
"textTransform": "uppercase"
}
}
},
"elements": {
"button": {
"typography": {
"fontFamily": "var:preset|font-family|literata",
"fontSize": "1.375rem",
"fontWeight": "900",
"letterSpacing": "-0.36px"
},
"color": {
"text": "var:preset|color|contrast",
"background": "var:preset|color|accent-1"
},
"border":{
"color": "var:preset|color|accent-1",
"radius": "0px"
}
},
"heading": {
"color": {
"text": "var:preset|color|contrast"
},
"typography": {
"fontFamily": "var:preset|font-family|literata",
"fontWeight": "900"
}
},
"link": {
"color": {
"text": "var:preset|color|contrast"
}
}
},
"variations": {
"post-terms-1": {
"typography": {
"fontSize": "16px"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be hardcoded? Is there no matching responsive preset size?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's no preset for 16px, which is the size of the font size for this particular element in the variation. We have --wp--preset--font-size--normal from Gutenberg, which is 16px, but we can't use that.

If we don't want to hardcode the value, we could use medium (18px) or small (14px) alternatives.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd always go for the larger :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Should we run this by Bea once she's back?

},
"elements": {
"link": {
"color": {
"background": "var:preset|color|secondary"
},
"border": {
"radius": "100px",
"color": "var:preset|color|secondary"
},
"typography": {
"textDecoration": "none"
},
":hover": {
"typography": {
"textDecoration": "underline"
}
}
}
}
},
"section-1": {
"elements": {
"button": {
"color": {
"background": "var:preset|color|accent-1",
"text": "var:preset|color|contrast"
},
"border": {
"color": "var:preset|color|accent-1"
}
}
}
},
"section-2": {
"color": {
"text": "var:preset|color|base"
},
"elements": {
"heading": {
"color": {
"text": "var:preset|color|base"
}
},
"button": {
"color": {
"background": "var:preset|color|accent-2",
"text": "var:preset|color|contrast"
},
"border": {
"color": "var:preset|color|accent-2"
}
}
}
},
"section-3": {
"elements": {
"button": {
"color": {
"background": "var:preset|color|accent-2",
"text": "var:preset|color|contrast"
},
"border": {
"color": "var:preset|color|accent-2"
}
}
}
},
"section-4": {
"elements": {
"heading": {
"color": {
"text": "var:preset|color|base"
}
},
"button": {
"border": {
"color": "var:preset|color|base"
}
}
}
},
"section-5": {
"elements": {
"button": {
"border": {
"color": "var:preset|color|contrast"
}
}
}
}
}
}
}
Loading