Add Gutenberg theme settings and block styling
This commit is contained in:
@@ -402,6 +402,25 @@ h4 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1.3em;
|
||||
}
|
||||
|
||||
/* Keep prose readable while allowing Gutenberg's alignment controls to escape its measure. */
|
||||
.entry-content > .alignwide,
|
||||
.single .entry-thumbnail {
|
||||
/* A post's featured image uses the same breakout geometry as a Wide Gutenberg block. */
|
||||
width: min(var(--wide), calc(100vw - 3rem));
|
||||
max-width: none;
|
||||
margin-left: 50%;
|
||||
margin-right: 0;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.entry-content > .alignfull {
|
||||
width: 100vw;
|
||||
max-width: 100vw;
|
||||
margin-left: 50%;
|
||||
margin-right: 0;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.entry-content h2 {
|
||||
margin-top: 2em;
|
||||
font-size: 1.55em;
|
||||
@@ -453,6 +472,111 @@ h4 {
|
||||
border: 0;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
|
||||
/* Gutenberg block treatments that need more than the shared theme.json tokens. */
|
||||
.wp-element-caption,
|
||||
.entry-content figcaption {
|
||||
color: var(--muted);
|
||||
font-family: "Berkeley Mono", monospace;
|
||||
font-size: 0.68rem;
|
||||
}
|
||||
|
||||
.wp-block-button__link,
|
||||
.wp-element-button {
|
||||
border: 1px solid var(--accent);
|
||||
border-radius: 2px;
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
font-family: "Berkeley Mono", monospace;
|
||||
font-size: 0.75rem;
|
||||
letter-spacing: 0.04em;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wp-block-button__link:hover,
|
||||
.wp-block-button__link:focus,
|
||||
.wp-element-button:hover,
|
||||
.wp-element-button:focus {
|
||||
border-color: var(--accent-hover);
|
||||
background: var(--accent-hover);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.is-style-outline > .wp-block-button__link {
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.wp-block-table {
|
||||
overflow-x: auto;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.wp-block-table table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.wp-block-table th,
|
||||
.wp-block-table td {
|
||||
padding: 0.55em 0.7em;
|
||||
border: 1px solid var(--line);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.wp-block-table th {
|
||||
background: var(--surface);
|
||||
font-family: "Berkeley Mono", monospace;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
|
||||
background: var(--surface);
|
||||
}
|
||||
|
||||
.wp-block-quote__citation,
|
||||
.wp-block-pullquote__citation {
|
||||
color: var(--muted);
|
||||
font-family: "Berkeley Mono", monospace;
|
||||
font-size: 0.68rem;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.wp-block-pullquote {
|
||||
padding: 2rem 0;
|
||||
border-top: 2px solid var(--accent);
|
||||
border-bottom: 2px solid var(--accent);
|
||||
color: var(--text);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.wp-block-pullquote blockquote {
|
||||
max-width: var(--content);
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0 auto;
|
||||
color: inherit;
|
||||
font-family: "Alpha Lyrae", sans-serif;
|
||||
font-size: clamp(1.7rem, 1.3rem + 1.7vw, 2.75rem);
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.wp-block-cover__inner-container {
|
||||
max-width: var(--content);
|
||||
}
|
||||
|
||||
.wp-block-gallery .wp-element-caption {
|
||||
margin: 0.5rem 0 0;
|
||||
}
|
||||
|
||||
.wp-block-media-text {
|
||||
gap: clamp(1rem, 3vw, 2.5rem);
|
||||
}
|
||||
|
||||
.wp-block-group.has-background,
|
||||
.wp-block-columns.has-background {
|
||||
padding: clamp(1.25rem, 4vw, 3rem);
|
||||
}
|
||||
.hero {
|
||||
position: relative;
|
||||
display: grid;
|
||||
|
||||
Reference in New Issue
Block a user