-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
154b71a
commit 9e2e17c
Showing
5 changed files
with
161 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
projects/experimental/components/thumbnail-card/thumbnail-card.options.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
202 changes: 107 additions & 95 deletions
202
projects/experimental/components/thumbnail-card/thumbnail-card.style.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,150 +1,162 @@ | ||
@import '@taiga-ui/core/styles/taiga-ui-local'; | ||
|
||
:host { | ||
--t-logo-height: 0.8125rem; | ||
position: relative; | ||
display: inline-flex; | ||
display: inline-block; | ||
flex-shrink: 0; | ||
background: #000; | ||
color: #fff; | ||
transform-style: preserve-3d; | ||
overflow: hidden; | ||
box-shadow: inset 0 0 0 1px var(--tui-background-neutral-1); | ||
|
||
&:before { | ||
&::before { | ||
.fullsize(); | ||
|
||
content: ''; | ||
border-radius: inherit; | ||
} | ||
|
||
// card backface | ||
&::after { | ||
.fullsize(); | ||
|
||
content: ''; | ||
backface-visibility: hidden; | ||
transform: rotateY(180deg) translate3d(0, 0, 1px); | ||
color: #b0b0b0; | ||
border-radius: inherit; | ||
background: linear-gradient(to bottom, currentColor 0 20%, #959595 20% 40%, currentColor 40%); | ||
} | ||
|
||
&[data-size='xs'], | ||
&[data-size='s'] { | ||
width: 2.5rem; | ||
height: 1.625rem; | ||
border-radius: 0.25rem; | ||
font-size: 0; | ||
border-radius: 0.25rem; | ||
} | ||
|
||
.t-left { | ||
transform: translate(0.125rem, 0.125rem) scale(0.625); | ||
} | ||
|
||
.t-right { | ||
display: none; | ||
} | ||
&[data-size='xs'] { | ||
inline-size: 2rem; | ||
block-size: 1.375rem; | ||
} | ||
|
||
.t-logo { | ||
bottom: -0.375rem; | ||
transform: scale(0.55); | ||
} | ||
&[data-size='s'] { | ||
inline-size: 2.5rem; | ||
block-size: 1.625rem; | ||
} | ||
|
||
&[data-size='m'] { | ||
width: 3rem; | ||
height: 2rem; | ||
inline-size: 3rem; | ||
block-size: 2rem; | ||
border-radius: 0.3125rem; | ||
text-indent: 0.1875rem; | ||
font: normal 0.5625rem/0.875rem var(--tui-font-text); | ||
|
||
.t-left { | ||
transform: translate(0.1875rem, 0.25rem) scale(0.75); | ||
} | ||
|
||
.t-right { | ||
transform: translate(-0.1875rem, 0.1875rem) scale(0.875); | ||
|
||
.t-icon { | ||
transform: scale(0.714); | ||
} | ||
} | ||
|
||
.t-logo { | ||
bottom: -0.3125rem; | ||
transform: scale(0.55); | ||
} | ||
font: normal 0.5625rem / var(--t-logo-height) var(--tui-font-text); | ||
} | ||
|
||
&[data-size='l'] { | ||
width: 3.375rem; | ||
height: 2.25rem; | ||
inline-size: 3.375rem; | ||
block-size: 2.25rem; | ||
border-radius: 0.375rem; | ||
text-indent: 0.3125rem; | ||
font: normal 0.625rem/1.125rem var(--tui-font-text); | ||
|
||
.t-left { | ||
transform: translate(0.1875rem, 0.1875rem); | ||
} | ||
|
||
.t-right { | ||
transform: translate(-0.1875rem, 0.1875rem); | ||
} | ||
|
||
.t-logo { | ||
bottom: -0.1875rem; | ||
transform: scale(0.75); | ||
} | ||
font: normal 0.6875rem / var(--t-logo-height) var(--tui-font-text); | ||
} | ||
} | ||
|
||
.t-left, | ||
.t-right { | ||
.t-left { | ||
position: absolute; | ||
top: 0; | ||
display: flex; | ||
} | ||
|
||
.t-left { | ||
left: 0; | ||
display: flex; | ||
transform-origin: top left; | ||
|
||
:host[data-size='xs'] &, | ||
:host[data-size='s'] & { | ||
transform: translate(0.125rem, 0.125rem) scale(0.625); | ||
} | ||
|
||
:host[data-size='m'] & { | ||
transform: translate(0.1875rem, 0.1875rem) scale(0.875); | ||
} | ||
|
||
:host[data-size='l'] & { | ||
transform: translate(0.1875rem, 0.1875rem); | ||
} | ||
} | ||
|
||
.t-right { | ||
right: 0; | ||
transform-origin: top right; | ||
position: absolute; | ||
top: 0.1875rem; | ||
right: 0.1875rem; | ||
|
||
:host[data-size='xs'] &, | ||
:host[data-size='s'] & { | ||
display: none; | ||
} | ||
|
||
&:before { | ||
:host[data-size='m'] & { | ||
inline-size: 0.875rem; | ||
block-size: 0.875rem; | ||
|
||
&::after { | ||
transform: scale(0.5); | ||
} | ||
} | ||
|
||
:host[data-size='l'] & { | ||
inline-size: 1rem; | ||
block-size: 1rem; | ||
|
||
&::after { | ||
color: #fff; | ||
transform: scale(0.625); | ||
} | ||
} | ||
|
||
&::before { | ||
content: ''; | ||
.fullsize(); | ||
|
||
border-radius: 100%; | ||
background: currentColor; | ||
opacity: 0.35; | ||
} | ||
|
||
.t-icon { | ||
color: #fff; | ||
transform: scale(0.625); | ||
} | ||
} | ||
|
||
.t-logo { | ||
position: absolute; | ||
right: 0.1875rem; | ||
width: 1.5rem; | ||
height: 1.5rem; | ||
right: 0.25rem; | ||
bottom: 0; | ||
block-size: var(--t-logo-height); | ||
transform-origin: right; | ||
} | ||
|
||
.t-icon { | ||
width: 1rem; | ||
height: 1rem; | ||
} | ||
:host[data-size='xs'] & { | ||
right: 0.125rem; | ||
} | ||
|
||
.t-front { | ||
.fullsize(); | ||
display: flex; | ||
align-items: flex-end; | ||
backface-visibility: hidden; | ||
box-shadow: inset 0 0 0 1px var(--tui-clear); | ||
border-radius: inherit; | ||
:host[data-size='m'] &, | ||
:host[data-size='l'] & { | ||
bottom: 0.0625rem; | ||
} | ||
|
||
&::after { | ||
mask-position: right; | ||
} | ||
} | ||
|
||
.t-back { | ||
.fullsize(); | ||
backface-visibility: hidden; | ||
transform: rotateY(180deg) translate3d(0, 0, 1px); | ||
background: #b0b0b0; | ||
border-radius: inherit; | ||
.t-content { | ||
position: absolute; | ||
|
||
&:after { | ||
.fullsize(absolute, inset); | ||
content: ''; | ||
top: 20%; | ||
bottom: 60%; | ||
background: #959595; | ||
:host[data-size='m'] & { | ||
left: 0.1875rem; | ||
bottom: 0.0625rem; | ||
} | ||
|
||
:host[data-size='l'] & { | ||
left: 0.25rem; | ||
bottom: 0.0625rem; | ||
} | ||
} | ||
|
||
.t-icon { | ||
inline-size: 1rem; | ||
block-size: 1rem; | ||
} |
Oops, something went wrong.