UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

167 lines (166 loc) 6.95 kB
/* * Skeleton component * * Skeleton * */ /* * Utilities */ .eufemia-scope--10_104_0 .dnb-skeleton { --skeleton-delay: 5s; --skeleton-duration: 1.5s; --skeleton-iteration-count: 20; } .eufemia-scope--10_104_0 .dnb-skeleton img, .eufemia-scope--10_104_0 .dnb-skeleton video { filter: brightness(0%) contrast(0%) opacity(0.5); } .eufemia-scope--10_104_0 .dnb-skeleton--block { display: block; } .eufemia-scope--10_104_0 .dnb-skeleton--overflow { overflow: hidden; } .eufemia-scope--10_104_0 .dnb-skeleton--grey { filter: grayscale(100%); } .eufemia-scope--10_104_0 .dnb-skeleton--shape { pointer-events: none; position: relative; overflow-x: hidden; color: transparent; background: transparent; box-shadow: none !important; } .eufemia-scope--10_104_0 .dnb-skeleton--shape.dnb-skeleton::before, .eufemia-scope--10_104_0 .dnb-skeleton--shape.dnb-skeleton::after { content: "" !important; position: absolute !important; z-index: 100 !important; left: 0 !important; top: 0 !important; bottom: 0 !important; right: 0 !important; width: 100% !important; height: auto !important; margin: 0 !important; padding: 0 !important; border-radius: inherit; background: none !important; box-shadow: none !important; } .eufemia-scope--10_104_0 .dnb-skeleton--shape.dnb-skeleton::before { background-color: var(--skeleton-color) !important; } .eufemia-scope--10_104_0 .dnb-skeleton--shape.dnb-skeleton::after { background-image: repeating-linear-gradient(-45deg, var(--skeleton-color--contrast) 1px 2px, transparent 0 6px) !important; background-repeat: repeat !important; background-size: 100% !important; clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); animation: skeletonLinearAnimation var(--skeleton-duration) linear var(--skeleton-iteration-count) var(--skeleton-delay); } .eufemia-scope--10_104_0 .dnb-skeleton--code pre, .eufemia-scope--10_104_0 .dnb-skeleton--code pre *, .eufemia-scope--10_104_0 .dnb-skeleton--code code, .eufemia-scope--10_104_0 .dnb-skeleton--code code *, .eufemia-scope--10_104_0 .dnb-skeleton--font pre, .eufemia-scope--10_104_0 .dnb-skeleton--font pre *, .eufemia-scope--10_104_0 .dnb-skeleton--font code, .eufemia-scope--10_104_0 .dnb-skeleton--font code * { --font-family-monospace: 'DNBMonoSkeleton' !important; font-family: var(--font-family-monospace) !important; font-style: unset !important; box-shadow: none !important; } .eufemia-scope--10_104_0 .dnb-skeleton--font-only, .eufemia-scope--10_104_0 .dnb-skeleton--font, .eufemia-scope--10_104_0 .dnb-skeleton--font .dnb-skeleton--show-font, .eufemia-scope--10_104_0 .dnb-skeleton--font .dnb-p { pointer-events: none; --font-family-default: 'DNBSkeleton' !important; font-family: var(--font-family-default) !important; font-style: unset !important; } .eufemia-scope--10_104_0 .dnb-skeleton--font-only::marker, .eufemia-scope--10_104_0 .dnb-skeleton--font::marker, .eufemia-scope--10_104_0 .dnb-skeleton--font .dnb-skeleton--show-font::marker, .eufemia-scope--10_104_0 .dnb-skeleton--font .dnb-p::marker { color: var(--skeleton-color); } .eufemia-scope--10_104_0 .dnb-skeleton--font, .eufemia-scope--10_104_0 .dnb-skeleton--font .dnb-skeleton--show-font, .eufemia-scope--10_104_0 .dnb-skeleton--font .dnb-p { background-position-y: 50% !important; background-repeat: no-repeat !important; background-size: 30rem 100% !important; -webkit-text-fill-color: transparent !important; -webkit-background-clip: text !important; background-clip: text !important; background-image: repeating-linear-gradient(-45deg, var(--skeleton-color--contrast) 1px 2px, transparent 0 6px) !important; --border-color: var(--skeleton-color); background-color: var(--skeleton-color) !important; background-position-x: 30rem; animation: skeletonFontAnimation 5s linear infinite var(--skeleton-delay); } html[data-visual-test] .eufemia-scope--10_104_0 .dnb-skeleton--font, html[data-visual-test] .eufemia-scope--10_104_0 .dnb-skeleton--font .dnb-skeleton--show-font, html[data-visual-test] .eufemia-scope--10_104_0 .dnb-skeleton--font .dnb-p { animation: none !important; } .eufemia-scope--10_104_0 .dnb-skeleton__figure { position: relative; border-radius: 0.25rem; } .eufemia-scope--10_104_0 .dnb-skeleton__figure--circle { width: 4rem; height: 4rem; border-radius: 50%; } .eufemia-scope--10_104_0 .dnb-skeleton__figure--product { display: flex; align-items: center; } .eufemia-scope--10_104_0 .dnb-skeleton__figure--product .dnb-skeleton__figure--circle + div { width: 50%; margin-left: 1rem; } .eufemia-scope--10_104_0 .dnb-skeleton--no-animation .dnb-skeleton, .eufemia-scope--10_104_0 .dnb-skeleton--no-animation .dnb-skeleton::after, .eufemia-scope--10_104_0 .dnb-skeleton--no-animation * .dnb-skeleton::after { animation: none !important; } @keyframes skeletonLinearAnimation { 0% { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); } 50% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); } 100% { clip-path: polygon(0 0, 0% 0, 0% 100%, 0 100%); } } @keyframes skeletonFontAnimation { 0% { background-position-x: 30rem; } 100% { background-position-x: -30rem; } } @font-face { font-family: DNBSkeleton; src: url("https://assets.dnb.no/shared/fonts/1.0.0/dnb/skeleton/DNB-Skeleton-Regular.woff2") format("woff2"), url("https://assets.dnb.no/shared/fonts/1.0.0/dnb/skeleton/DNB-Skeleton-Regular.woff") format("woff"), url("https://assets.dnb.no/shared/fonts/1.0.0/dnb/skeleton/DNB-Skeleton-Regular.ttf") format("truetype"); font-weight: normal; font-style: normal; font-display: fallback; } @font-face { font-family: DNBSkeleton; src: url("https://assets.dnb.no/shared/fonts/1.0.0/dnb/skeleton/DNB-Skeleton-Medium.woff2") format("woff2"), url("https://assets.dnb.no/shared/fonts/1.0.0/dnb/skeleton/DNB-Skeleton-Medium.woff") format("woff"), url("https://assets.dnb.no/shared/fonts/1.0.0/dnb/skeleton/DNB-Skeleton-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: fallback; } @font-face { font-family: DNBSkeleton; src: url("https://assets.dnb.no/shared/fonts/1.0.0/dnb/skeleton/DNB-Skeleton-Bold.woff2") format("woff2"), url("https://assets.dnb.no/shared/fonts/1.0.0/dnb/skeleton/DNB-Skeleton-Bold.woff") format("woff"), url("https://assets.dnb.no/shared/fonts/1.0.0/dnb/skeleton/DNB-Skeleton-Bold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: fallback; } @font-face { font-family: DNBMonoSkeleton; src: url("https://assets.dnb.no/shared/fonts/1.0.0/dnb/skeleton/DNBMono-Skeleton-Regular.woff2") format("woff2"), url("https://assets.dnb.no/shared/fonts/1.0.0/dnb/skeleton/DNBMono-Skeleton-Regular.woff") format("woff"), url("https://assets.dnb.no/shared/fonts/1.0.0/dnb/skeleton/DNBMono-Skeleton-Regular.ttf") format("truetype"); font-weight: normal; font-style: normal; font-display: fallback; }