Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
In editor theme compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaz committed Jan 29, 2022
1 parent bf29a24 commit 6fb4c66
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion assets/blocks.editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ pre.wp-block-code {
'Bitstream Vera Sans Mono', 'Liberation Mono', 'Nimbus Mono L',
'Courier New', Courier, monospace;
padding: 1em;
margin: 0.5em auto;
/* Avoid block gap adding too much space between labels and code */
margin-top: 0.5rem !important;
margin-left: auto;
margin-right: auto;
margin-bottom: 1rem;
overflow: auto;
border-radius: 0.3em;
}
Expand All @@ -18,11 +22,19 @@ pre.wp-block-code code {
overflow-x: initial;
}

/* Twentytwenty adds style using this rule to code block in editor */
.editor-styles-wrapper .wp-block-code {
color: #f8f8f2;
background: #282c34;
}

.mkaz-code-syntax-block__labels {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
font-size: 0.85rem;
margin-top: 1rem;
/* Twentytwenty adds margin to all wp-block */
margin-bottom: 0;
text-align: right;
}

Expand Down

0 comments on commit 6fb4c66

Please sign in to comment.