Skip to content

Instantly share code, notes, and snippets.

@infologie
Created May 28, 2022 15:36
Show Gist options
  • Save infologie/559ad6d1337ac5a99688990b3c1597d2 to your computer and use it in GitHub Desktop.
Save infologie/559ad6d1337ac5a99688990b3c1597d2 to your computer and use it in GitHub Desktop.
Custom layout for Cosma for wide screens (wider record panel, links moved up and to the right side). Progressive enhancement.
@media screen and (min-width: 2300px) {
main.record-container {
width: 100rem;
overflow: hidden;
}
article.record {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: auto auto;
gap: 1px 40px;
}
.record header {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 2;
margin-bottom: 0;
}
.record main {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 2;
grid-row-end: 3;
}
.record footer {
grid-column-start: 2;
grid-column-end: 3;
grid-row-start: 2;
grid-row-end: 3;
margin-top: 0;
border-top: none;
}
.record main,
.record footer {
height: calc(100vh - 188px);
overflow-y: scroll;
}
.graph-wrapper {
left: 30rem;
width: calc(100vw - 130rem);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment