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

Twenty Twenty One Blocks: Migrate Paragraph Block styles #93

Merged
merged 8 commits into from
Dec 10, 2020
Merged
20 changes: 19 additions & 1 deletion twentytwentyone-blocks/assets/css/style-shared.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,31 @@ body {
h1,
.has-huge-font-size,
.has-gigantic-font-size {
font-weight: var(--wp--custom--font-weight-light);
font-weight: var(--wp--preset--font-weight-light);
MaggieCabrera marked this conversation as resolved.
Show resolved Hide resolved
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This was kind of a weird hack the theme did — we wanted to make sure that the largest font size presets all used a light weight. Not the best solution. 😅

It's fine to remove this, but we should try to make sure the h1 begins using the light font weight preset once it's available to that block.


h2, h3, h4, h5, h6 {
font-weight: normal;
}

b,
strong {
font-weight: var(--wp--preset--font-weight--bold);
}

dfn,
cite,
em,
i {
font-style: var(--wp--preset--font-style--italic);
}

pre {
white-space: pre;
overflow-x: auto;
}


/*
* text-underline-offset doesn't work in Chrome at all 👎
* But looks nice in Safari/Firefox, so let's keep it and
Expand Down
25 changes: 24 additions & 1 deletion twentytwentyone-blocks/experimental-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,30 @@
"name": "Gigantic"
}
],
"fontWeights": [
{
"slug": "light",
"value": 300,
"name": "Light"
},
{
"slug": "bold",
"value": 700,
"name": "Bold"
}
],
"fontStyles": [
{
"slug": "normal",
"value": "normal",
"name": "Normal"
},
{
"slug": "italic",
"value": "italic",
"name": "Italic"
}
],
"fontFamilies": [
{
"fontFamily": "-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif",
Expand Down Expand Up @@ -166,7 +190,6 @@
},
"custom": {
"font-primary": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif",
"font-weight-light": 300,
"line-height": {
"body": 1.7,
"heading": 1.3,
Expand Down