diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-06 16:24:05 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-06 16:24:05 +0200 |
| commit | dfd816d1891545aa8ead982b57891858f1c82bb4 (patch) | |
| tree | 213e9cd2d706592c9e35c1b1acbf3d3cbe414a95 /src/components/molecules/images/responsive-image.module.scss | |
| parent | 655ed38c6cd53a19c6ba1ebab5f2429441b99a58 (diff) | |
chore: add a ResponsiveImage component
Diffstat (limited to 'src/components/molecules/images/responsive-image.module.scss')
| -rw-r--r-- | src/components/molecules/images/responsive-image.module.scss | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/components/molecules/images/responsive-image.module.scss b/src/components/molecules/images/responsive-image.module.scss new file mode 100644 index 0000000..83e8d10 --- /dev/null +++ b/src/components/molecules/images/responsive-image.module.scss @@ -0,0 +1,52 @@ +@use "@styles/abstracts/functions" as fun; + +.wrapper { + display: flex; + flex-flow: column; + width: 100%; + max-width: max-content; + margin: var(--spacing-sm) auto; + position: relative; + text-align: center; +} + +.caption { + margin: 0; + padding: fun.convert-px(4) var(--spacing-2xs); + background: var(--color-bg-secondary); + border: fun.convert-px(1) solid var(--color-border); + box-shadow: 0 fun.convert-px(-1) fun.convert-px(1) fun.convert-px(1) + var(--color-shadow-light); + font-weight: 500; +} + +.link { + display: flex; + flex-flow: column; + background: none; + text-decoration: none; + + .caption { + color: var(--color-primary-darker); + } + + &:hover, + &:focus { + transform: scale(1.1); + } + + &:focus { + .caption { + text-decoration: underline solid var(--color-primary-darker) + fun.convert-px(3); + } + } + + &:active { + transform: scale(0.9); + + .caption { + text-decoration: none; + } + } +} |
