.__slate { width: 100%; height: 100%; position: relative; &::after { @include clearfix; } } .api__toc { width: 200px; height: calc(100vh - 4rem); // navigation is 4rem tall top: 4rem; left: 0; bottom: 0; background-color: $white; border-right: 1px solid rgba($gray, 0.3); float: left; overflow-x: hidden; overflow-y: auto; position: fixed; z-index: 3; } .api__toc__search { position: relative; } .api__toc__search__field { border-bottom: 1px solid rgba($gray, 0.3); font-size: 1rem; line-height: 2rem; padding: 0.25rem calc(2rem + 4px) 0.25rem 0.5rem; width: 100%; } .api__toc__search__clear { width: 1.25rem; height: 1.25rem; top: 0.6rem; right: 0.75rem; background-color: $black; border-radius: 50%; color: $white; cursor: pointer; font-size: 1rem; line-height: 1.3; position: absolute; text-align: center; transition: opacity 0.2s; &:not(.active) { opacity: 0; visibility: hidden; } &.active { opacity: 1; visibility: visible; } } .api__toc__search__results, .api__toc__items { font-size: 0.8rem; line-height: 1.33; } .api__toc__search__results { list-style-type: none; &:not(.active) { display: none; } &.active { background-color: rgba($gray, 0.3); border-bottom: 1px solid rgba($gray, 0.3); padding-top: 0.25rem; padding-bottom: 0.25rem; } a { display: block; padding: 0.25rem 0.5rem 0.25rem 0.75rem; &:hover { background-color: rgba($gray, 0.3); } } } .api__toc__items { list-style-type: none; padding-top: 0.25rem; padding-bottom: 0.25rem; } .api__toc__item { &:hover { background-color: rgba($gray, 0.3); } a { display: block; padding: 0.25rem 0.5rem 0.25rem 0.75rem; } } .api__content { display: grid; float: right; grid-template-columns: repeat(auto-fit, minmax(50%, 1fr)); width: calc(100% - 200px); h1 { font-size: 1.5rem; margin-bottom: 0.5rem; } h2 { font-size: 1.25rem; margin-bottom: 0.5rem; } h3 { // border-bottom: 1px solid rgba($gray, 0.3); font-size: 0.8rem; letter-spacing: 0.1rem; margin-bottom: 0.25rem; text-transform: uppercase; } p, ol, ul { font-size: 1rem; line-height: 1.5; margin-bottom: 1rem; } ol, ul { // padding-left: 1rem; } table { border: 1px solid rgba($white, 0.1); border-radius: 0.3rem; border-spacing: 0; font-size: 0.8rem; line-height: 1.33; width: 100%; } thead { display: none; } th, td { padding: 0.5rem 1rem 0.5rem 0.5rem; } th { border-bottom: 1px solid rgba($white, 0.1); } tr:nth-child(even) { background-color: rgba($white, 0.1); } pre { margin-bottom: 2rem; padding: 1rem; background-color: $black; border-radius: 0.3rem; font-size: 0.8rem; line-height: 1.33; overflow-x: auto; overflow-y: hidden; } } .api__content__body__arguments { border: 1px solid rgba($gray, 0.3); border-radius: 3px; list-style-type: none; } .api__content__body__argument { &:not(:last-of-type) { border-bottom: 1px solid rgba($gray, 0.3); } &:nth-child(even) { background-color: rgba($gray, 0.1); } .left, .right { padding: 0.5rem 0.75rem; } .left { border-right: 1px solid rgba($gray, 0.3); width: 30%; word-wrap: break-word; span { color: $gray; font-size: 0.8rem; &:not(:first-of-type) { margin-left: 0.5rem; } } } .right { width: 70%; } &::after { @include clearfix; } } .api__content__body, .api__content__example { padding: 2rem; } .api__content__body { border-bottom: 1px solid rgba($gray, 0.3); pre { color: $white; } } .api__content__example { background-color: mix($gray, $black, 10%); border-bottom: 1px solid rgba($white, 0.1); color: $white; }