/* basic layout */ @import url("https://free.bboxtype.com/embedfonts/?family=FiraSans:300,600"); body { background: red; font-size: 1vw; /* transition: background 1s ease; */ } body .layout-content-and-preview { display: grid; grid-template-rows: 100vw auto; grid-template-columns: auto; grid-template-areas: "content" "preview"; min-height: 100vh; max-height: 100vh; min-width: 100vw; max-width: 100vw; overflow: auto; } body .layout-content-and-preview .layout-content { background: white; grid-area: content; } body .layout-content-and-preview .layout-preview { grid-area: preview; display: flex; align-items: center; justify-content: center; /* padding: 4vw; */ } body .layout-content-and-preview .layout-preview img { opacity: .5; width: auto; height: auto; max-width: 100%; max-height: 100%; box-shadow: 0.2em 0.2em 0.5em 0 rgba(0, 0, 0, 0.3); } /* @media screen and (min-aspect-ratio: 1/2) { $base-unit: 0.5vh; body { background: orange; .layout-content-and-preview { grid-template-rows: 50vh auto; grid-template-columns: auto 50vh auto; grid-template-areas: " . content . " "preview preview preview"; } } } */ @media screen and (min-aspect-ratio: 1 / 1) { body { background: yellow; } body .layout-content-and-preview { grid-template-rows: auto 50vw auto; grid-template-columns: 50vw auto; grid-template-areas: " . preview" "content preview" " . preview"; } } @media screen and (min-aspect-ratio: 2 / 1) { body { background: lime; } body .layout-content-and-preview { grid-template-rows: 100vh; grid-template-columns: 100vh auto; grid-template-areas: "content preview"; } } @font-face { font-family: 'Fira Code'; src: url("../../lib/font/fira-code/FiraCode-Regular.otf"); font-weight: 400; } @font-face { font-family: 'Fira Code'; src: url("../../lib/font/fira-code/FiraCode-Bold.otf"); font-weight: 700; } body { font-family: 'Fira Sans'; margin: 0; line-height: 1.2em; } section { min-height: 100vh; width: 100vw; padding: 0 !important; } .layout-side-by-side { min-width: 100vw; max-width: 100vw; min-height: 100vh; max-height: 100vh; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 12fr; background: linear-gradient(to right, white 0%, white calc(50% - 4px), #c8ceda calc(50% - 4px), #c8ceda calc(50% + 4px), #ffffff calc(50% + 4px), #ffffff 100%); } .layout-side-by-side .layout-title { grid-column-end: span 2; padding: 3.5vw calc(50% + 4vw) 0.5vw 4vw; line-height: 1.15em; } .layout-side-by-side .layout-content-left { overflow: auto; padding: 4vw; } .layout-side-by-side .layout-content-left *:first-child { margin-top: 0; } .layout-side-by-side .layout-content-right { display: flex; align-items: flex-start; justify-content: center; padding: 4vw; } .layout-side-by-side .layout-content-right img { width: auto; height: auto; max-width: 100%; max-height: 100%; box-shadow: 0.2em 0.2em 0.5em 0 rgba(0, 0, 0, 0.3); } .layout-side-by-side h2 { margin: 0; } .layout-side-by-side ul { list-style-type: disc; padding-left: 0; } .layout-side-by-side ul ul { padding-left: 2vw; } .layout-side-by-side pre { margin-left: -4vw; padding-left: 4vw; line-height: 1.2em; position: relative; overflow: hidden; } .layout-side-by-side pre::before { content: attr(data-sourcefile); position: absolute; top: .3em; left: calc(1.5vw - 100%); width: 100%; text-align: right; transform: rotate(-90deg); transform-origin: 100% 50%; color: #cccccc; } .layout-side-by-side code { font-size: 0.9em; font-family: 'Fira Code'; } .layout-side-by-side code.hljs { padding: .3em 0; } .layout.layout-chapter-heading { height: 100vh; width: 100vw; position: relative; } .layout.layout-chapter-heading .layout-title { position: absolute; left: 2vw; width: calc(100vw - 4vw); text-align: center; bottom: calc(38.2% - .5em); } h1 { font-size: 300%; }