Template:Main page/header/styles.css: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 43: | Line 43: | ||
} | } | ||
/* | |||
.citizen-search-trigger:hover { | |||
background-color: #0056b3; | |||
} | |||
/* | |||
* 1. STYLES FOR THE BUTTON ITSELF | |||
* (Based on .home-header__search, replacing variables) | |||
*/ | |||
.citizen-search-trigger { | .citizen-search-trigger { | ||
display: | /* --- Core Setup --- */ | ||
/* We must use position: relative to contain the animated glow */ | |||
position: relative; | |||
color: | /* z-index ensures the text stays on top of the glow */ | ||
background-color: # | z-index: 1; | ||
border: | /* A span needs to be 'block' to have margins and width */ | ||
border-radius: | display: block; | ||
cursor: pointer; | /* Prevents the glow from leaking out when not hovered */ | ||
overflow: hidden; | |||
/* --- Layout (Replaced --space vars) --- */ | |||
/* padding: var(--space-md); */ | |||
padding: 12px 24px; | |||
/* margin-top: var(--space-xl); */ | |||
margin-top: 32px; | |||
/* margin-left/right: auto; */ | |||
margin-left: auto; | |||
margin-right: auto; | |||
max-width: 600px; | |||
/* --- Appearance (Replaced --color and --border vars) --- */ | |||
/* background-color: var(--color-surface-1); */ | |||
background-color: #2a2a2a; /* A dark background */ | |||
color: #eee; /* Light text */ | |||
/* border: var(--border-base); */ | |||
border: 1px solid #555; | |||
/* border-radius: var(--border-radius-pill); */ | |||
border-radius: 9999px; /* This creates the "pill" shape */ | |||
/* --- Text (Replaced --font vars) --- */ | |||
/* font-size: var(--font-size-small); */ | |||
font-size: 14px; | |||
/* font-weight: var(--font-weight-medium); */ | |||
font-weight: 500; | |||
text-align: center; | |||
/* --- Other --- */ | |||
cursor: pointer; | |||
/* Smooth transition for the background color change on hover */ | |||
transition: background-color 0.3s ease; | |||
} | |||
/* | |||
* 2. THE ANIMATED GLOW (::before pseudo-element) | |||
*/ | |||
.citizen-search-trigger::before { | |||
content: ''; | |||
position: absolute; | |||
/* Place it behind the button's content */ | |||
z-index: -1; | |||
/* Make it slightly larger than the button to create the "glow" border */ | |||
top: -4px; | |||
left: -4px; | |||
width: calc(100% + 8px); | |||
height: calc(100% + 8px); | |||
/* --- Use the gradients from your example --- */ | |||
background: linear-gradient(90deg, | |||
#87bfdb, #77abC8, #6797b5, #577f9d, #476684, #43668a, | |||
#3e668f, #304a66, #212e3d, #304a66, #3e668f, #43668a, | |||
#476684, #577f9d, #6797b5, #77abC8, #87bfdb | |||
); | |||
/* Make the background large so the animation is smooth */ | |||
background-size: 400% 400%; | |||
/* --- Use the blur from your example --- */ | |||
/* filter: blur(var(--gradient-blur)); */ | |||
filter: blur(4px); | |||
/* --- The Animation --- */ | |||
animation: moveGradient 10s linear infinite; | |||
/* Smoothly transition the filter and gradient */ | |||
transition: all 0.5s ease; | |||
} | } | ||
/* | |||
* 3. HOVER EFFECTS | |||
*/ | |||
.citizen-search-trigger:hover { | .citizen-search-trigger:hover { | ||
background-color: # | /* background: var(--color-surface-0); */ | ||
background-color: #1a1a1a; /* Darken the button on hover */ | |||
} | |||
.citizen-search-trigger:hover::before { | |||
/* --- Change to the HOVER gradient from your example --- */ | |||
background: linear-gradient(90deg, | |||
#120d0e, #321d13, #512d19, #713d1e, #90571d, #b0701b, | |||
#cf8a1a, #de9822, #eeA529, #fdb331, #eeA529, #de9822, | |||
#cf8a1a, #b0701b, #90571d, #713d1e, #512d19, #321d13, #120d0e | |||
); | |||
background-size: 400% 400%; | |||
/* --- Change to the HOVER blur from your example --- */ | |||
/* --gradient-blur: 8px; */ | |||
filter: blur(8px); | |||
/* Speed up the animation on hover for a nice effect */ | |||
animation: moveGradient 5s linear infinite; | |||
} | |||
/* | |||
* 4. THE KEYFRAMES FOR THE ANIMATION | |||
* (Moves the background-position of the gradient) | |||
*/ | |||
@keyframes moveGradient { | |||
0% { background-position: 0% 50%; } | |||
50% { background-position: 100% 50%; } | |||
100% { background-position: 0% 50%; } | |||
} | } | ||
Revision as of 16:09, 8 November 2025
.home-header {
position: relative;
padding-top: 3.5rem;
padding-bottom: 3.5rem;
line-height: 1.1;
text-align: center;
}
.home-header__pretitle {
margin-bottom: 0.25rem;
color: #888;
font-size: 0.9em;
letter-spacing: 0.05em;
}
.home-header__title {
margin: 0;
font-size: 3.5rem;
text-transform: uppercase;
line-height: 0.9;
font-weight: 600;
}
.home-header__subtitle {
margin-top: 0.25rem;
color: #888;
font-size: 0.9em;
}
.home-header__search {
padding: 1rem;
margin-top: 2rem;
margin-left: auto;
margin-right: auto;
max-width: 600px;
border: 1px solid #ccc;
border-radius: 999px;
background-color: #f8f8f8;
cursor: pointer;
font-size: 0.9em;
font-weight: 500;
text-align: center;
}
.citizen-search-trigger:hover {
background-color: #0056b3;
}
/*
* 1. STYLES FOR THE BUTTON ITSELF
* (Based on .home-header__search, replacing variables)
*/
.citizen-search-trigger {
/* --- Core Setup --- */
/* We must use position: relative to contain the animated glow */
position: relative;
/* z-index ensures the text stays on top of the glow */
z-index: 1;
/* A span needs to be 'block' to have margins and width */
display: block;
/* Prevents the glow from leaking out when not hovered */
overflow: hidden;
/* --- Layout (Replaced --space vars) --- */
/* padding: var(--space-md); */
padding: 12px 24px;
/* margin-top: var(--space-xl); */
margin-top: 32px;
/* margin-left/right: auto; */
margin-left: auto;
margin-right: auto;
max-width: 600px;
/* --- Appearance (Replaced --color and --border vars) --- */
/* background-color: var(--color-surface-1); */
background-color: #2a2a2a; /* A dark background */
color: #eee; /* Light text */
/* border: var(--border-base); */
border: 1px solid #555;
/* border-radius: var(--border-radius-pill); */
border-radius: 9999px; /* This creates the "pill" shape */
/* --- Text (Replaced --font vars) --- */
/* font-size: var(--font-size-small); */
font-size: 14px;
/* font-weight: var(--font-weight-medium); */
font-weight: 500;
text-align: center;
/* --- Other --- */
cursor: pointer;
/* Smooth transition for the background color change on hover */
transition: background-color 0.3s ease;
}
/*
* 2. THE ANIMATED GLOW (::before pseudo-element)
*/
.citizen-search-trigger::before {
content: '';
position: absolute;
/* Place it behind the button's content */
z-index: -1;
/* Make it slightly larger than the button to create the "glow" border */
top: -4px;
left: -4px;
width: calc(100% + 8px);
height: calc(100% + 8px);
/* --- Use the gradients from your example --- */
background: linear-gradient(90deg,
#87bfdb, #77abC8, #6797b5, #577f9d, #476684, #43668a,
#3e668f, #304a66, #212e3d, #304a66, #3e668f, #43668a,
#476684, #577f9d, #6797b5, #77abC8, #87bfdb
);
/* Make the background large so the animation is smooth */
background-size: 400% 400%;
/* --- Use the blur from your example --- */
/* filter: blur(var(--gradient-blur)); */
filter: blur(4px);
/* --- The Animation --- */
animation: moveGradient 10s linear infinite;
/* Smoothly transition the filter and gradient */
transition: all 0.5s ease;
}
/*
* 3. HOVER EFFECTS
*/
.citizen-search-trigger:hover {
/* background: var(--color-surface-0); */
background-color: #1a1a1a; /* Darken the button on hover */
}
.citizen-search-trigger:hover::before {
/* --- Change to the HOVER gradient from your example --- */
background: linear-gradient(90deg,
#120d0e, #321d13, #512d19, #713d1e, #90571d, #b0701b,
#cf8a1a, #de9822, #eeA529, #fdb331, #eeA529, #de9822,
#cf8a1a, #b0701b, #90571d, #713d1e, #512d19, #321d13, #120d0e
);
background-size: 400% 400%;
/* --- Change to the HOVER blur from your example --- */
/* --gradient-blur: 8px; */
filter: blur(8px);
/* Speed up the animation on hover for a nice effect */
animation: moveGradient 5s linear infinite;
}
/*
* 4. THE KEYFRAMES FOR THE ANIMATION
* (Moves the background-position of the gradient)
*/
@keyframes moveGradient {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}