Skip to content

Instantly share code, notes, and snippets.

@RyanNutt
Created February 12, 2019 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanNutt/bb6838fc7eee7ec9184920abf3dab314 to your computer and use it in GitHub Desktop.
Save RyanNutt/bb6838fc7eee7ec9184920abf3dab314 to your computer and use it in GitHub Desktop.
Extra CSS styling for WordPress TwentyNineteen theme that changes archive pages into grid layouts without changing the underlying theme files. You can see what it looks like at https://brickzone.club
body.blog #main,
body.archive #main {
display: grid;
grid-template-columns: 32% 32% 32%;
}
@media (max-width: 400px) {
body.blog #main,
body.archive #main {
grid-template-columns: 100%;
}
}
body.blog #main article,
body.archive #main article {
margin-top: 0;
}
body.blog #main article .entry-content,
body.archive #main article .entry-content {
display:none;
}
body.blog #main article footer,
body.archive #main article footer {
display:none;
}
body.blog #main article .entry-header h2,
body.archive #main article .entry-header h2 {
font-size: 1.25em;
white-space:nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
body.blog #main article > *,
body.archive #main article > * {
margin:8px;
}
body.blog #main header,
body.archive #main header {
grid-column-start: 1;
grid-column-end: 4;
margin-bottom: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment