UNPKG

fabric-texture

Version:

This JavaScript library enables fast and efficient image distortion transformations using Canvas 2D.

199 lines (190 loc) 4.07 kB
* { margin: 0; padding: 0; box-sizing: border-box; &::-webkit-scrollbar { width: 8px; height: 8px; &-track { background: transparent; border-radius: 2px; } &-thumb { background: #66666633; border-radius: 8px; transition: all 0.1s; } &-thumb:hover { background: #66666666; } &-corner { background: transparent; } } } html, body { overflow: hidden; } .docs { height: 100vh; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; padding: 32px 20px 0; .tab { display: flex; justify-content: center; align-items: center; margin-top: 18px; .tab-item { position: relative; font-size: 14px; font-weight: bold; text-align: center; padding: 0 4px; margin: 0 8px; cursor: pointer; color: darkgray; text-decoration: none; &::after { content: ''; display: block; position: absolute; width: 0%; height: 0; border-bottom: 1px solid currentColor; bottom: 0; left: 50%; transform: translateX(-50%); transition: width 100ms; } &.active, &:hover { color: #324346; &::after { width: 100%; } } } } & > header, & > main, & > footer { max-width: 900px; margin: 0 auto; } & > header { padding: 12px 0; text-align: center; h1 { color: #324346; } p { color: gray; margin-top: 16px; span { white-space: nowrap; } } } & > footer { position: sticky; bottom: 0; z-index: 999999; display: flex; justify-content: center; .outline { position: relative; width: 196px; max-height: 250px; transition: all .75s; &.hidden { max-height: 46px; overflow: hidden; } &-content { margin: 48px 4px 0 4px; max-height: 200px; overflow-x: hidden; overflow-y: auto; padding: 4px 8px 4px 20px; background-color: white; border-radius: 8px 8px 0 0; box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2), 0 0 1px 0 rgba(0, 0, 0, 0.12), 0 0 1px 0 rgba(0, 0, 0, 0.08) inset; li { color: darkgray; margin: 4px 0; a { color: inherit; display: block; font-size: 12px; padding: 4px 8px; border-radius: 4px; cursor: pointer; text-decoration: none; background-color: #f9f9f9; transition: all .2s; scroll-behavior: smooth; &:hover { color: #4a7b7b; background-color: #f1f1f1; } } } } &-group-name { color: gray; font-size: 12px; font-weight: 600; padding: 4px 0; list-style: none; } &-button { position: absolute; top: 4px; right: 4px; display: flex; justify-content: center; gap: 12px; background-color: white; padding: 4px 8px; border-radius: 8px; cursor: pointer; box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2), 0 0 1px 0 rgba(0, 0, 0, 0.12), 0 0 1px 0 rgba(0, 0, 0, 0.08) inset; } } .buttons { position: absolute; top: 4px; left: 4px; display: flex; justify-content: center; gap: 12px; background-color: white; padding: 4px 8px; border-radius: 8px; box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2), 0 0 1px 0 rgba(0, 0, 0, 0.12), 0 0 1px 0 rgba(0, 0, 0, 0.08) inset; } .upload-image { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: 50%; pointer-events: none; background-color: white; box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.12) inset; } } }