Template:YouTubeCard/styles.css: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
.yt-card-outer { | .yt-card-outer { | ||
display: flex; | display: flex; | ||
align-items: | align-items: center; | ||
max-width: 700px; | max-width: 700px; | ||
margin: 1.5em auto; | margin: 1.5em auto; | ||
border-radius: var(--border-radius-large); | border-radius: var(--border-radius-large); | ||
overflow: hidden; | overflow: hidden; | ||
transition: transform 0.2s ease, box-shadow 0.2s ease; | transition: transform 0.2s ease, box-shadow 0.2s ease; | ||
} | } | ||
| Line 24: | Line 22: | ||
} | } | ||
.yt-card-thumb span, | |||
.yt-card-thumb | .yt-card-thumb a { | ||
.yt-card-thumb | display: block !important; | ||
width: 100% !important; | |||
height: 100% !important; | |||
margin: 0 !important; | margin: 0 !important; | ||
padding: 0 !important; | padding: 0 !important; | ||
} | } | ||
| Line 56: | Line 50: | ||
width: 48px; | width: 48px; | ||
height: 48px; | height: 48px; | ||
background: | background: #CD201F; | ||
border-radius: 50%; | border-radius: 50%; | ||
display: flex; | display: flex; | ||
| Line 100: | Line 94: | ||
margin-top: var(--space-xs); | margin-top: var(--space-xs); | ||
padding: 0.3em 0.9em; | padding: 0.3em 0.9em; | ||
background: | background: #CD201F; | ||
color: #fff !important; | color: #fff !important; | ||
border-radius: var(--border-radius-medium); | border-radius: var(--border-radius-medium); | ||
Latest revision as of 01:36, 12 March 2026
.yt-card-outer {
display: flex;
align-items: center;
max-width: 700px;
margin: 1.5em auto;
border-radius: var(--border-radius-large);
overflow: hidden;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.yt-card-outer:hover {
transform: translateY(-2px);
box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.yt-card-thumb {
position: relative;
flex-shrink: 0;
width: 240px;
height: 135px;
overflow: hidden;
}
.yt-card-thumb span,
.yt-card-thumb a {
display: block !important;
width: 100% !important;
height: 100% !important;
margin: 0 !important;
padding: 0 !important;
}
.yt-card-thumb img {
width: 100% !important;
height: 100% !important;
object-fit: cover;
display: block;
transition: transform 0.3s ease;
}
.yt-card-outer:hover .yt-card-thumb img {
transform: scale(1.05);
}
.yt-card-play {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 48px;
height: 48px;
background: #CD201F;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
color: #fff;
z-index: 2;
opacity: 0.9;
transition: transform 0.2s ease, opacity 0.2s ease;
line-height: 48px;
text-align: center;
pointer-events: none;
}
.yt-card-outer:hover .yt-card-play {
transform: translate(-50%, -50%) scale(1.15);
opacity: 1;
}
.yt-card-info {
padding: var(--space-md);
display: flex;
flex-direction: column;
justify-content: center;
gap: var(--space-xs);
}
.yt-card-title {
font-size: 1.1rem;
font-weight: bold;
color: var(--color-base);
}
.yt-card-desc {
font-size: 0.9rem;
color: var(--color-base--subtle);
line-height: 1.5;
}
.yt-card-btn a {
display: inline-block;
margin-top: var(--space-xs);
padding: 0.3em 0.9em;
background: #CD201F;
color: #fff !important;
border-radius: var(--border-radius-medium);
text-decoration: none !important;
font-size: 0.9rem;
font-weight: bold;
transition: opacity 0.2s ease;
}
.yt-card-btn a:hover {
opacity: 0.85;
}