Files
pokemon/src/assets/css/main.scss

297 lines
5.2 KiB
SCSS
Raw Normal View History

@import "_bootstrap";
2026-02-12 23:27:13 -05:00
// ----------------------
// Container
// ----------------------
.container {
max-width: 100vw;
@media (min-width: 768px) {
max-width: 95vw;
}
display: grid;
place-items: center;
//background: #d3d9b3;
}
.circle {
position: relative;
width: calc(var(--radius) * 2);
height: calc(var(--radius) * 2);
margin: 50px auto;
}
:root {
--total: 11; /* How many items */
--radius: 80px; /* Circle size */
}
.circle-item {
position: absolute;
top: 50%;
left: 50%;
width: 50px;
height: 50px;
margin: -30px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
display: grid;
place-items: center;
/* This is where the magic happens */
--angle: calc(360deg / var(--total) * var(--i));
box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
transform:
rotate(var(--angle)) /* Rotate to position */
translateX(var(--radius)) /* Move away from center */
rotate(calc(-1 * var(--angle))); /* Rotate back */
}
// ----------------------
// Typography
// ----------------------
.copy-small {
font-size: 0.75rem;
opacity: 0.87;
@media (min-width: 768px) {
font-size: 0.85rem;
}
@media (min-width: 1400px) {
font-size: 1rem;
}
}
// ----------------------
// Cards & Modal
// ----------------------
.modal-xl {
@media (min-width: 768px) {
max-width: 95vw;
}
@media (min-width: 1400px) {
max-width: 90vw;
}
}
.card-modal {
background-color: rgba(1, 11, 18, 0.8);
cursor: default;
}
// ----------------------
// Navigation Tabs
// ----------------------
.nav-link {
font-weight: 600;
color: rgba(255, 255, 255, 0.67);
transition:
margin-top 0.2s cubic-bezier(0.5, 0, 0.3, 1),
padding-top 0.2s cubic-bezier(0.5, 0, 0.3, 1),
padding-bottom 0.2s cubic-bezier(0.5, 0, 0.3, 1);
&:hover,
&:focus {
color: rgba(0, 0, 0, 0.87);
}
}
.nav-tabs {
.nav-link.active,
.nav-item.show .nav-link {
color: rgba(0, 0, 0, 0.94);
}
.nav-link:hover,
.nav-link:focus {
border-color: transparent;
}
}
// Tiered Nav-Link Colors
$tiers: (
nm: rgba(156, 204, 102, 1),
lp: rgba(211, 225, 86, 1),
mp: rgba(255, 238, 87, 1),
hp: rgba(255, 201, 41, 1),
dmg: rgba(255, 167, 36, 1),
vendor: hsl(262, 47%, 55%)
);
@each $name, $color in $tiers {
.nav-link.#{$name} {
border-bottom: 3px solid $color;
&:hover,
&:focus {
background-color: rgba($color, 0.67);
}
&.active {
background-color: $color;
border-bottom-color: $color;
@if $name == vendor {
color: rgba(255, 255, 255, 0.87);
}
}
}
}
// ----------------------
// Misc Components
// ----------------------
.dark-callout {
@media (min-width: 768px) {
background-color: rgba(44, 48, 59, 1);
}
}
.price-area {
max-height: 75px;
}
.card-image {
aspect-ratio: 23 / 32;
object-fit: cover;
z-index: 998;
cursor: pointer;
}
// Icon sizes
.small-icon svg {
width: 100%;
max-height: 16px;
margin-top: -0.25rem;
}
.masked-image {
z-index: 1000;
opacity: 100%;
mix-blend-mode: normal;
}
.starburst {
opacity: 10%;
mix-blend-mode: lighten;
object-fit: cover;
background-size: cover;
}
.whos-that-pokemon {
width: 100%;
z-index: 998;
opacity: 10%;
mix-blend-mode: lighten;
aspect-ratio: 1/1;
}
.energy-icon svg,
.rarity-icon-large svg,
.set-icon svg {
width: 2.5rem;
margin-top: -0.25rem;
}
.rarity-icon-large svg,
.set-icon svg {
margin-bottom: -0.25rem;
}
.energy-icon svg {
margin-right: -0.25rem;
}
.set-icon svg {
margin-left: -0.25rem;
}
.shadow-filter {
filter:
drop-shadow(0 5px 5px rgba(0, 0, 0, 0.3))
drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}
// ----------------------
// Pricing
// ----------------------
.price-row {
position: relative;
z-index: 999;
margin-top: -1.25rem;
border-radius: 0.33rem;
background: linear-gradient(
90deg,
rgba(156, 204, 102, 1) 21%,
rgba(211, 225, 86, 1) 42%,
rgba(255, 238, 87, 1) 63%,
rgba(255, 201, 41, 1) 74%,
rgba(255, 167, 36, 1) 85%
);
}
.price-label {
font-size: 0.7rem;
font-weight: 600;
color: rgba(0, 0, 0, 0.87);
background-color: hsl(88, 50%, 60%);
box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 10px;
border-top-left-radius: 0.33rem;
border-bottom-left-radius: 0.33rem;
@media (min-width: 768px) {
font-size: 0.8rem;
}
@media (min-width: 996px) {
font-size: 0.85rem;
}
@media (min-width: 1200px) {
font-size: 0.9rem;
}
@media (min-width: 1600px) {
font-size: 1rem;
}
&:nth-of-type(n + 2) {
background-color: hsl(66, 70%, 61%);
}
&:nth-of-type(n + 3) {
background-color: hsl(54, 100%, 67%);
}
&:nth-of-type(n + 4) {
background-color: hsl(45, 100%, 58%);
}
&:last-of-type {
background-color: hsl(36, 100%, 57%);
border-radius: 0.33rem;
}
}
// ----------------------
// Search
// ----------------------
@media (max-width: 768px) {
.search-box,
.search-button {
min-height: 48px;
}
}
// ----------------------
// Sticky Bar
// ----------------------
.sticky {
background-color: hsl(205, 89%, 4%);
position: fixed;
bottom: 0;
width: 100%;
z-index: 1000;
@media (min-width: 768px) {
position: sticky;
top: 0;
}
}