diff --git a/components/content/Img/Img.stories.ts b/components/content/Img/Img.stories.ts index 11a98df..c4a36a9 100644 --- a/components/content/Img/Img.stories.ts +++ b/components/content/Img/Img.stories.ts @@ -26,7 +26,7 @@ export const Img: StoryObj = { object-position="${args.objectPosition}" > ${page ? html` -
${page?.description}
+${page?.description}
+- ${card.description} -
++ ${card.description} +
-
-
+
diff --git a/lib/pulse.ts b/lib/pulse.ts index 6859602..dacd5d3 100644 --- a/lib/pulse.ts +++ b/lib/pulse.ts @@ -1,6 +1,16 @@ import { css } from 'lit'; export const pulse = css` + @keyframes fade-in { + from { + opacity: 0; + } + + to { + opacity: 1; + } + } + @keyframes pulse { 0% { background-position: 200% 0; @@ -12,8 +22,11 @@ export const pulse = css` } :host { - animation: pulse var(--diamond-transition-duration-pulse) infinite - var(--diamond-transition-timing-pulse); + animation: + fade-in var(--diamond-transition-duration-enter) forwards + var(--diamond-transition-timing-enter) var(--diamond-loading-delay), + pulse var(--diamond-transition-duration-pulse) infinite + var(--diamond-transition-timing-pulse); appearance: none; background: linear-gradient( to right, @@ -25,6 +38,7 @@ export const pulse = css` background-size: 200% 100%; color: transparent; display: inline-block; + opacity: 0; pointer-events: none; user-select: none; } diff --git a/styles/tokens.css b/styles/tokens.css index 14c7f8d..c46c1b2 100644 --- a/styles/tokens.css +++ b/styles/tokens.css @@ -5,6 +5,7 @@ @import url('./tokens/icon.css'); @import url('./tokens/input.css'); @import url('./tokens/label.css'); +@import url('./tokens/loading.css'); @import url('./tokens/radius.css'); @import url('./tokens/shadow.css'); @import url('./tokens/spacing.css'); diff --git a/styles/tokens/loading.css b/styles/tokens/loading.css new file mode 100644 index 0000000..6a11cea --- /dev/null +++ b/styles/tokens/loading.css @@ -0,0 +1,3 @@ +:root { + --diamond-loading-delay: 0.5s; +}