diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-29 17:52:21 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-29 18:01:06 +0100 |
| commit | 8e0c8c9255ba5ab466d8372fe223efeb5a3f0833 (patch) | |
| tree | 67102c4c0776f83c8f845266728cb4099a14b41a /src/components/PostPreview/PostPreview.module.scss | |
| parent | 76c01d51ccbdd0faaf12b624328a40ef24f33f88 (diff) | |
chore: replace read more link with ButtonLink component
I also fix the load more button position since I removed the margin
auto.
Diffstat (limited to 'src/components/PostPreview/PostPreview.module.scss')
| -rw-r--r-- | src/components/PostPreview/PostPreview.module.scss | 74 |
1 files changed, 14 insertions, 60 deletions
diff --git a/src/components/PostPreview/PostPreview.module.scss b/src/components/PostPreview/PostPreview.module.scss index ccdae9b..cacc0d3 100644 --- a/src/components/PostPreview/PostPreview.module.scss +++ b/src/components/PostPreview/PostPreview.module.scss @@ -2,22 +2,24 @@ @use "@styles/abstracts/mixins" as mix; .wrapper { + --icon-size: #{fun.convert-px(20)}; + padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-md); border: fun.convert-px(1) solid var(--color-border); border-radius: fun.convert-px(3); - box-shadow: fun.convert-px(1) fun.convert-px(1) 0 0 var(--color-shadow), - fun.convert-px(1) fun.convert-px(1) fun.convert-px(3) 0 var(--color-shadow); - transition: all 0.2s ease-in-out 0s, border 0s; + box-shadow: fun.convert-px(1) fun.convert-px(1) 0 0 var(--color-shadow-light), + fun.convert-px(2) fun.convert-px(2) fun.convert-px(2) 0 + var(--color-shadow-light), + fun.convert-px(4) fun.convert-px(4) fun.convert-px(5) fun.convert-px(-2) + var(--color-shadow-light); + transition: all 0.3s ease-in-out 0s, border 0s; - &:hover, - &:focus-within { - box-shadow: fun.convert-px(2) fun.convert-px(2) 0 0 - var(--color-shadow-light), - fun.convert-px(3) fun.convert-px(3) fun.convert-px(3) 0 - var(--color-shadow-light), - fun.convert-px(3) fun.convert-px(3) fun.convert-px(5) fun.convert-px(1) - var(--color-shadow-lighter); - transform: scale(1.01); + &:hover { + --icon-size: #{fun.convert-px(25)}; + } + + &:active { + --icon-size: 0; } } @@ -29,54 +31,6 @@ border: fun.convert-px(1) solid var(--color-border); } -.read-more { - display: block; - width: max-content; - margin: var(--spacing-md) auto var(--spacing-lg); - padding: var(--spacing-2xs) var(--spacing-sm); - background: var(--color-bg); - border: fun.convert-px(3) solid var(--color-primary); - border-radius: fun.convert-px(3); - box-shadow: fun.convert-px(1) fun.convert-px(1) fun.convert-px(1) - var(--color-shadow-light), - fun.convert-px(1) fun.convert-px(2) fun.convert-px(2) fun.convert-px(-2) - var(--color-shadow-light), - fun.convert-px(3) fun.convert-px(4) fun.convert-px(5) fun.convert-px(-4) - var(--color-shadow-light); - color: var(--color-primary); - font-weight: 600; - text-decoration: none; - transition: all 0.3s ease-in-out 0s; - - .icon { - width: fun.convert-px(20); - margin-left: var(--spacing-2xs); - fill: var(--color-primary); - transition: all 0.25s ease-in-out 0s; - } - - &:hover, - &:focus { - text-decoration: underline var(--color-primary) fun.convert-px(2); - - .icon { - margin-left: var(--spacing-xs); - transform: scaleX(1.3); - } - } - - &:active { - color: var(--color-primary-dark); - text-decoration: none; - - .icon { - margin-left: 0; - transform: scaleX(0); - width: 0; - } - } -} - @include mix.media("screen") { @include mix.dimensions("xs") { .read-more { |
