Skip to content

Instantly share code, notes, and snippets.

@houblon
Last active April 20, 2020 06:50
Show Gist options
  • Save houblon/eae82519675717e66ac22c65c9d5cb1e to your computer and use it in GitHub Desktop.
Save houblon/eae82519675717e66ac22c65c9d5cb1e to your computer and use it in GitHub Desktop.
Fix WordPress admin styles when loading theme styles in the admin
// Restore WordPress sidebar core styles which are broken by theme styles
.edit-post-sidebar {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 13px;
font-weight: unset;
line-height: 1.4em;
text-align: unset;
* {
font-family: inherit;
font-size: inherit;
font-weight: inherit;
line-height: inherit;
}
ul,
ol {
list-style: none;
margin-bottom: unset;
margin-top: unset;
padding: 0;
}
button {
border-radius: unset;
margin: unset;
overflow: unset;
text-transform: unset;
-webkit-appearance: unset;
}
a {
color: #0073aa;
text-decoration-color: unset;
&:active,
&:hover {
color: #00a0d2;
}
}
.edit-post-post-link__link-post-name {
font-weight: 600;
}
.editor-post-featured-image__toggle {
line-height: 20px;
}
.components-color-palette__item {
border-radius: 50%;
}
}
// Restore WordPress post header and admin menu core styles which are broken by theme styles
.edit-post-header,
body #adminmenu {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment