More actions
No edit summary |
No edit summary |
||
Line 40: | Line 40: | ||
overflow: hidden; | overflow: hidden; | ||
box-shadow: 0 0px 0px rgba(0, 0, 0, 0); | box-shadow: 0 0px 0px rgba(0, 0, 0, 0); | ||
transition: box-shadow 0.25s ease-in-out, transform 0.2s ease-in-out, border-color 0. | transition: box-shadow 0.25s ease-in-out, transform 0.2s ease-in-out, border-color 0.2s ease; | ||
} | } | ||
Line 70: | Line 70: | ||
max-width: 100%; | max-width: 100%; | ||
object-fit: contain; | object-fit: contain; | ||
transition: transform 0. | transition: transform 0.2s ease; | ||
} | } | ||
Revision as of 17:36, 30 May 2025
/* CSS placed here will be applied to all skins */ html.skin-citizen-light { --card-bg: rgb(221, 229, 242); --card-text: #222222; --card-link: #007acc; } html.skin-citizen-dark { --card-bg: rgb(7, 10, 15); --card-text: #dddddd; --card-link: #66c0ff; } .card-carousel { display: flex; overflow-x: auto; gap: 1rem; padding: 1rem; scroll-snap-type: x mandatory; cursor: grab; user-select: auto; white-space: nowrap; } .card-carousel.dragging { cursor: grabbing; user-select: none; } .card { flex: 0 0 200px; height: 360px; /* ✨ Set to match your visual target */ display: flex; flex-direction: column; background: var(--card-bg); color: var(--card-text); border: 1px solid var(--border-color-base); border-radius: 10px; overflow: hidden; box-shadow: 0 0px 0px rgba(0, 0, 0, 0); transition: box-shadow 0.25s ease-in-out, transform 0.2s ease-in-out, border-color 0.2s ease; } .card:hover { transform: translateY(-3px); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); border-color: var(--card-link); } .image-wrapper { width: 100%; height: 160px; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; background-color: var(--card-bg); text-align: center; } .image-wrapper * { margin: 0 auto; } .image-wrapper img { display: block; max-height: 100%; max-width: 100%; object-fit: contain; transition: transform 0.2s ease; } .card:hover .image-wrapper img { transform: scale(1.05); } .image-wrapper::after { content: ""; position: absolute; inset: 0; background-color: rgba(0, 0, 0, 0); transition: background-color 0.3s ease; pointer-events: none; } .card:hover .image-wrapper::after { background-color: rgba(0, 0, 0, 0.05); } .card-content { display: flex; flex-direction: column; padding: 0.8rem; gap: 0.5rem; flex: 1; /* Take up remaining space below image */ } .card-title { font-size: 1rem; font-weight: bold; color: var(--card-text); line-height: 1.3; white-space: normal; overflow-wrap: anywhere; word-wrap: break-word; overflow: hidden; max-height: calc(1.3em * 2); /* Clamp to 2 lines */ flex-shrink: 0; } .card-description { font-size: 0.85rem; color: var(--card-text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; white-space: normal; overflow-wrap: anywhere; flex-grow: 1; transition: color 0.3s ease, opacity 0.3s ease; opacity: 0.9; } .card:hover .card-description { opacity: 1; } .card-readmore { text-align: right; margin-top: auto; /* ← pins it to the bottom */ font-size: 0.85rem; } .card-readmore a { font-size: 0.85rem; color: var(--card-link); text-decoration: none; transition: color 0.2s ease; } .card-readmore a span { display: inline-block; transition: transform 0.2s ease; } .card-readmore a:hover span { transform: translateX(4px); } .no-display { display: none; }