-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Try global styles at blocks #20273
Try global styles at blocks #20273
Changes from all commits
15b9664
b112a7f
8c41189
833f3d4
6675556
efadb41
0e2e2ca
1818108
6a31dea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@import "./paragraph/global.scss"; | ||
@import "./heading/global.scss"; | ||
@import "./list/global.scss"; | ||
@import "./quote/global.scss"; | ||
@import "./pullquote/global.scss"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
color: var(--wp--color--foreground--headings); | ||
font-size: var(--wp--type--size--headings); | ||
font-weight: var(--wp--type--weight); | ||
line-height: var(--wp--type--line-height--headings); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ul, | ||
ol { | ||
color: var(--wp--color--foreground--base); | ||
font-size: var(--wp--type--size--base); | ||
line-height: var(--wp--type--line-height--base); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
p { | ||
color: var(--wp--color--foreground--base); | ||
font-size: var(--wp--type--size--base); | ||
line-height: var(--wp--type--line-height--base); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.wp-block-pullquote p { | ||
color: var(--wp--color--foreground--base); | ||
font-size: var(--wp--type--size--base); | ||
line-height: var(--wp--type--line-height--base); | ||
} | ||
|
||
.wp-block-pullquote cite { | ||
color: var(--wp--color--foreground--base); | ||
font-size: var(--wp--type--size--smaller); | ||
line-height: var(--wp--type--line-height--smaller); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.wp-block-pullquote { | ||
border-top: 4px solid $dark-gray-500; | ||
border-bottom: 4px solid $dark-gray-500; | ||
border-top: 4px solid var(--wp--color--foreground-500, $dark-gray-500); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
border-bottom: 4px solid var(--wp--color--foreground-500, $dark-gray-500); | ||
margin-bottom: $default-block-margin; | ||
color: $dark-gray-600; | ||
color: var(--wp--color--foreground-600, $dark-gray-600); | ||
|
||
cite, | ||
footer, | ||
&__citation { | ||
color: $dark-gray-600; | ||
color: var(--wp--color--foreground-600, $dark-gray-600); | ||
text-transform: uppercase; | ||
font-size: $default-font-size; | ||
font-style: normal; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.wp-block-quote p { | ||
color: var(--wp--color--foreground--base); | ||
font-size: var(--wp--type--size--base); | ||
line-height: var(--wp--type--line-height--base); | ||
} | ||
|
||
.wp-block-quote cite { | ||
color: var(--wp--color--foreground--base); | ||
font-size: var(--wp--type--size--smaller); | ||
line-height: var(--wp--type--line-height--smaller); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
.wp-block-quote { | ||
border-left: 4px solid $black; | ||
border-left: 4px solid var(--wp--color--border, $black); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
margin: 0 0 $default-block-margin 0; | ||
padding-left: 1em; | ||
|
||
cite, | ||
footer, | ||
&__citation { | ||
color: $dark-gray-300; | ||
color: var(--wp--foreground-300, $dark-gray-300); | ||
font-size: $default-font-size; | ||
margin-top: 1em; | ||
position: relative; | ||
|
@@ -16,7 +16,7 @@ | |
&.has-text-align-right, | ||
&.has-text-align-right { | ||
border-left: none; | ||
border-right: 4px solid $black; | ||
border-right: 4px solid var(--wp--color--border, $black); | ||
padding-left: 0; | ||
padding-right: 1em; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ | |
background-color: transparent; | ||
|
||
tbody tr:nth-child(odd) { | ||
background-color: $light-gray-200; | ||
background-color: var(--wp--color--foreground-200, $light-gray-200); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
|
||
&.has-subtle-light-gray-background-color { | ||
|
@@ -93,6 +93,6 @@ | |
border-color: transparent; | ||
} | ||
|
||
border-bottom: 1px solid $light-gray-200; | ||
border-bottom: 1px solid var(--wp--color--foreground-200, $light-gray-200); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
pre.wp-block-verse { | ||
color: $dark-gray-900; | ||
color: var(--wp--color--foreground-900, $dark-gray-900); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
white-space: nowrap; | ||
font-family: inherit; | ||
font-size: inherit; | ||
|
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.
This covers the case where
--wp--color--white
is not present, so it fallbacks to$white
. However, we also need to cover cases where the browser doesn't have support for CSS Custom Properties and write something like:which can be done automatically with some plugins.
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.
We also don't want to do this until we're certain this is the way to go.