UNPKG

visbug-lib

Version:

<p align="center"> <img src="./assets/visbug.png" width="300" height="300" alt="visbug"> <br> <a href="https://www.npmjs.org/package/visbug"><img src="https://img.shields.io/npm/v/visbug.svg?style=flat" alt="npm latest version number"></a> <a href

504 lines (495 loc) 15.7 kB
[grid]{display:flex;flex-wrap:wrap;contain:layout}[grid][order~=reverse]{flex-direction:row-reverse}[grid][horizontally-aligned~=left]{justify-content:flex-start}[grid][horizontally-aligned~=center]{justify-content:center}[grid][horizontally-aligned~=right]{justify-content:flex-end}[grid][vertically-aligned~=top],[grid~=rows]{align-items:flex-start}[grid][vertically-aligned~=center]{align-items:center}[grid][vertically-aligned~=bottom]{align-items:flex-end}[grid][vertically-aligned~=baseline]{align-items:baseline}[grid][horizontally-distributed~=around]{justify-content:space-around}[grid][horizontally-distributed~=between]{justify-content:space-between}[grid][horizontally-distributed~=equal]>*{flex-grow:1}[grid][vertically-distributed~=around]{align-content:space-around}[grid][vertically-distributed~=between]{align-content:space-between}[grid][vertically-distributed~=equal]{align-items:stretch}[grid][columns~="2"]>*{flex-basis:50%}[grid][columns~="3"]>*{flex-basis:33.333333333333336%}[grid][columns~="4"]>*{flex-basis:25%}[grid][columns~="5"]>*{flex-basis:20%}[grid][columns~="6"]>*{flex-basis:16.666666666666668%}[grid][columns~="7"]>*{flex-basis:14.285714285714286%}[grid][columns~="8"]>*{flex-basis:12.5%}[grid][columns~="9"]>*{flex-basis:11.11111111111111%}[grid][columns~="10"]>*{flex-basis:10%}[grid][columns~="11"]>*{flex-basis:9.090909090909092%}[grid][columns~="12"]>*{flex-basis:8.333333333333334%}[grid~=columns][vertically-distributed~=equal]{align-items:stretch}[grid~=columns][vertically-distributed~=equal]>*{height:auto}[grid~=rows]{flex-direction:column}[grid~=rows][order~=reverse]{flex-direction:column-reverse}[grid~=rows][horizontally-aligned~=center]{align-items:center}[grid~=rows][horizontally-aligned~=right]{align-items:flex-end}[grid~=rows][vertically-distributed~=around]{justify-content:space-around}[grid~=rows][vertically-distributed~=between]{justify-content:space-between}[grid~=rows][vertically-distributed~=equal]>*{width:initial}[grid~=masonry]{flex-flow:column wrap;height:20rem}body { min-height: 100vh; }[data-measuring=true] { cursor: crosshair; }body:not([testing]) [data-selected=true] { transition: all 0.15s ease; }[data-pseudo-select=true] { outline: 1px dashed hsl(267, 100%, 58%); }[data-selected-hide=true][data-selected=true]:after { display: none; }[data-selected=true][contenteditable=true] { caret-color: hotpink; }[data-pinhover=true] { cursor: crosshair; }[data-metatip=true][data-pinhover=true] { cursor: not-allowed; }[draggable=true] { cursor: grab }[draggable=true]:active { cursor: grabbing; }[draggable=true] a, [draggable=true] img { -webkit-user-drag: none !important; }h1,h2,h3 { font-family: "Google Sans", system-ui; font-weight: lighter; line-height: 1.2; margin: 0; }small { color: var(--mid-grey); }a { color: var(--theme-color) }a[href]:not(:hover) { text-decoration: none; }[text-styles] { padding: 0 2rem 2rem; }[bad-contrast] { padding: 1rem 2rem; background: hsl(0,0%,40%); color: hsl(0,0%,70%); }[good-contrast] { padding: 1rem 2rem; font-weight: bold; background: black; color: white; }.artboard { background: white; color: var(--light-grey); box-shadow: 0 1px 2px 1px hsla(0,0%,0%,5%); position: relative; z-index: 1; margin-top: 1.5rem }.artboard[flex] { display: flex; align-items: center; justify-content: center; }.artboard[padded], .artboard > [padded] { padding: 0.5rem; }.artboard.dark { background: var(--dark-grey); border: 1px solid var(--darker-grey); box-shadow: none; color: var(--lighter-grey); }.artboard.message { display: flex; justify-content: center; flex-direction: column; padding: 1.5rem }.artboard.message > h2 { font-weight: bold; }.artboard.message > p { line-height: 1.5; margin-bottom: 0; }.artboard > label { content: attr(artboard); position: absolute; top: -25px; left: 0; right: 0; height: 20px; display: flex; align-items: center; font-size: 0.8rem; font-weight: lighter; color: var(--lightest-grey); white-space: nowrap }.artboard > label > summary { display: inline-flex; align-items: center; }.artboard > label > summary > svg { height: 20px; margin-right: 0.5rem; }.artboard > label > b { color: var(--theme-color); }.artboard > label > b, .artboard > label > .material-icons { margin: 0 0.25em; }.artboard > label:hover { color: var(--lightest-grey); }.artboard > label[with-info] { justify-content: space-between }.artboard > label[with-info] i { cursor: pointer; font-style: normal; border: 1px solid var(--dark-grey); border-radius: 50%; width: 1.4em; height: 1.4em; display: inline-flex; align-items: center; justify-content: center; line-height: 1.1 }.artboard > label[with-info] i:hover { color: var(--theme-color); border-color: var(--theme-color); }.artboard .tips { display: grid; grid-gap: 0.5rem; border: 1px solid var(--darkest-grey); border-radius: 1rem; padding: 0.5rem }.artboard .tips > p { margin-top: 0; margin-bottom: 0; font-size: 0.8rem }@media (max-width: 480px) {.artboard .tips > p { font-size: 1rem } }.artboard > [grid][vertically-aligned] { padding: 0.5rem; box-sizing: border-box; width: 100%; height: auto }.artboard > [grid][vertically-aligned] > h2 { margin: 0; }.artboard [fit-height] { flex: 1; }.artboard.pictures img{ object-fit: cover; width: 100%; height: 100%; }.card { background: #fff; max-width: 400px; box-shadow: 0 0.2em 0.3em hsla(0,0%,0%,20%); padding: 1rem; border-radius: 0.2em; border: 1px solid hsl(0,0%,90%) }.card > .card-header h2, .card > .card-header small { margin: 0; }.card > .card-header > img { width: 4rem; height: 4rem; border-radius: 50%; overflow: hidden; object-fit: cover; }.card > .card-header > div { margin-left: 1rem; }.card > .card-content { margin-top: 0.5rem; margin-bottom: 0.5rem }.card > .card-content img { width: 100%; height: 200px; object-fit: cover; }.card > .card-footer { padding-top: 0.5rem; border-top: 1px solid #e6e6e6 }.card > .card-footer > button { padding: 0.5rem 1rem; }.card > .card-footer time { flex: 2; text-align: right; }.card date, .card time { font-size: 0.8rem; color: #808080; }.mdc-card { max-width: 400px; }main { --card-size: 70vw; display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--card-size), 1fr)); grid-auto-rows: minmax(var(--card-size), max-content); grid-auto-flow: dense; grid-gap: 1rem 2rem; gap: 1rem 2rem; padding: 1rem 2rem }@media (min-width:480px) {main { --card-size: 35vw } }@media (min-width:768px) {main { --card-size: 20vw } main > article[span2x2] { grid-row: span 2; grid-column: span 2; } main > article[span3x1] { grid-column: span 3; } main > article[span2x1] { grid-column: span 2; } main > article[span1x2] { grid-row: span 2; } main > article[span1x1] { grid-row: span 1; grid-column: span 1; } }@media (min-width:1024px) {main { --card-size: 16vw } }@media (min-width:1600px) {main { --card-size: 15vw } }[image-grid] { display: grid; grid-gap: .5rem; gap: .5rem; height: 100%; align-items: space-between; justify-content: space-between; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr 1fr }[image-grid] > div:first-child { grid-column: span 2; }[image-grid] img { height: 100%; width: 100%; object-fit: contain; object-position: center center; }[text-styles] { margin-top: 1rem; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr; grid-gap: .5rem; gap: .5rem }[text-styles] h1, [text-styles] h2, [text-styles] h3, [text-styles] h4, [text-styles] h5, [text-styles] h6 { margin: 0; }[color-grid] { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; grid-gap: .5rem; gap: .5rem }[color-grid] > div { border-radius: 1rem; display: inline-flex; align-items: center; justify-content: center; text-align: center }[color-grid] > div:not(:first-of-type) { color: white; }[stop-light] { display: grid; align-items: center; justify-content: space-around }[stop-light] > .filled-circle { width: 7rem; height: 7rem; }[ordered-numbers] { display: grid; width: 100%; grid-template-columns: repeat(5, 5rem); justify-content: space-around }[ordered-numbers] > .filled-circle:nth-child(1) { background: hsl(200, 50%, 50%); }[ordered-numbers] > .filled-circle:nth-child(2) { background: hsl(225, 50%, 50%); }[ordered-numbers] > .filled-circle:nth-child(3) { background: hsl(250, 50%, 50%); }[ordered-numbers] > .filled-circle:nth-child(4) { background: hsl(275, 50%, 50%); }[ordered-numbers] > .filled-circle:nth-child(5) { background: hsl(300, 50%, 50%); }nav { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column }nav[margin] { grid-auto-flow: row; }nav > a { text-align: center; margin: 5px; border: 1px solid var(--darkest-grey); border-radius: .25rem; }.outlined-square { border: 1px solid var(--light-grey); width: 10rem; height: 10rem; }.filled-square { background: var(--light-grey); width: 4rem; height: 4rem; }.filled-circle { background: var(--grey); border-radius: 50%; width: 5rem; height: 5rem; display: inline-flex; align-items: center; justify-content: center; color: white }.filled-circle.small { width: 2.5rem; height: 2.5rem; }.red { background-color: red; }.green { background-color: green; }.yellow { background-color: yellow; }.google-blue { background-color: #4285F4; }.google-yellow { background-color: #F4B400; }.google-red { background-color: #DB4437; }.google-green { background-color: #0F9D58; }.shadow-circle { background-color: white; box-shadow: 0 10px 30px 2px hsla(0,0%,0%,20%); }[round-icon] { box-sizing: border-box; padding: 1rem; width: var(--card-size); height: var(--card-size); border: 5px solid var(--light-grey); border-radius: 50%; fill: var(--grey); }[bgfg] { width: 100%; display: grid; grid-gap: 0.5rem; grid-template-columns: 15vw 15vw; grid-template-rows: 15vw 15vw; justify-content: space-around; margin-top: 0.5rem }[bgfg] > .filled-circle { font-size: 5vw; width: 100%; height: 100%; }[multi-select] { flex: 2; display: grid; grid-template-columns: repeat(auto-fit, 2.5rem); grid-auto-rows: 2.5rem; grid-auto-flow: dense; justify-content: space-between; grid-gap: 1rem; padding: 0 1rem; height: 100%; box-sizing: border-box }[multi-select] > span { background: var(--grey); border-radius: 50% }[multi-select] > span:hover { background: var(--theme-color); }[mock-ad] h2 { font-weight: bold; font-size: 4rem; color: red; border: 2px solid red; padding: 2rem; animation: pulse-annoyingly 1s linear infinite; }@keyframes pulse-annoyingly { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.9); } }:root { --hue: 210; --saturation: 8%; --darkest-grey: hsl(var(--hue) var(--saturation) 5%); --darker-grey: hsl(var(--hue) var(--saturation) 7%); --dark-grey: hsl(var(--hue) var(--saturation) 12%); --grey: hsl(var(--hue) var(--saturation) 30%); --mid-grey: hsl(var(--hue) var(--saturation) 50%); --light-grey: hsl(var(--hue) var(--saturation) 70%); --lighter-grey: hsl(var(--hue) var(--saturation) 85%); --lightest-grey: hsl(var(--hue) var(--saturation) 95%); --theme-color: hotpink; --theme-light: hsl(330, 50%, 70%); --bg: white; }html[light] { --hue: 210; --saturation: 4%; --darkest-grey: hsl(var(--hue) var(--saturation) 90%); --darker-grey: hsl(var(--hue) var(--saturation) 80%); --dark-grey: hsl(var(--hue) var(--saturation) 65%); --grey: hsl(var(--hue) var(--saturation) 40%); --mid-grey: hsl(var(--hue) var(--saturation) 30%); --light-grey: hsl(var(--hue) var(--saturation) 25%); --lighter-grey: hsl(var(--hue) var(--saturation) 20%); --lightest-grey: hsl(var(--hue) var(--saturation) 15%); --theme-color: hotpink; --theme-light: hsl(330, 50%, 70%); --bg: white }html[light] body, html[light] .dark { background: var(--darkest-grey); }html[light] .artboard label { color: var(--light-grey); }html[light] kbd { background: var(--darkest-grey); }body { margin: 0; padding-left: 4rem; background: var(--dark-grey); color: var(--lighter-grey); font-family: system-ui; font-weight: lighter; --mdc-theme-primary: hotpink; --mdc-theme-secondary: rebeccapurple; }img { max-width: 100%; }[intro] { /*background: var(--dark-grey); color: var(--light-grey); border: 1px solid var(--darker-grey);*/ /*box-shadow: none;*/ padding: 1rem; display: flex; flex-direction: column; justify-content: space-between; flex-wrap: nowrap }[intro] figure { margin: 0; text-align: center }[intro] figure svg { margin-top: 1rem; width: 50%; object-fit: contain; }[intro] figure figcaption { display: flex; flex-direction: column; }[intro] h1 { margin: 0 0 0.25rem 0; font-size: 3rem; font-weight: 300; color: var(--lighter-grey) }[intro] h1:hover { color: var(--lightest-grey); }[intro] h2 { font-size: 1rem; letter-spacing: 1.5px; font-weight: lighter; color: var(--lighter-grey); }[intro] em { color: var(--light-grey); font-style: normal; font-size: 0.8em; }[intro] > picture { flex: 1 }[intro] > picture > img { max-height: 15vh; object-fit: contain; }[intro] { /*& > [arrows] { display: inline-flex; align-items: flex-start; width: 100%; }*/ }[intro] > [filters] { width: 100%; display: grid; grid-gap: 0.5rem; padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--darkest-grey) }[intro] > [filters] > div { width: 100%; display: grid; grid-auto-flow: column; align-items: center; justify-content: space-between; grid-gap: 0.5rem; }[intro] > [social] { width: 100% }[intro] > [social] svg { width: 2.5vh; fill: var(--grey) }[intro] > [social] svg:hover { fill: var(--theme-color); }/*dl { margin: 2rem 0; & > dt { color: var(--lightest-grey); font-size: 1.4rem; font-weight: 300; margin: 2rem 0 0.75rem; } & > dd { font-size: 0.9rem; font-weight: lighter; margin: 0; line-height: 1.5; color: var(--lighter-grey); } }*//*.github { position: absolute; top: 0; right: 0; z-index: 1; }*/kbd { font-weight: bold; font-size: 1rem; background: var(--lighter-grey); border-radius: 0.5rem; padding: 0.1em 0.6em 0.2em; position: relative; bottom: 0.05em; }.key { font-size: 1.75rem; height: 3rem; padding: 0 1.25rem; margin: 0.5rem 0; display: inline-flex; align-items: center; border-radius: 0.5rem; color: white; background-color: var(--theme-color); box-shadow: 0 2px 5px hsla(0,0%,0%,15%); }