Citizen.css: Difference between revisions
MediaWiki interface page
More actions
Content deleted Content added
No edit summary Tags: Manual revert Reverted |
No edit summary Tag: Reverted |
||
| Line 1: | Line 1: | ||
/* |
|||
/* All CSS here will be loaded for users of the Citizen skin */ |
|||
* Citizen Skin - Aurora Theme |
|||
* Organized CSS for better maintainability |
|||
/** |
|||
* Background images |
|||
*/ |
*/ |
||
/* ============================== |
|||
@media screen { |
|||
* 1. BASIC SETUP |
|||
* ============================== */ |
|||
.citizen-page-container:before { |
|||
/* FIXME: Optimization needed (WebP, proper sized) */ |
|||
background-image: url(/images/Banner2.png); |
|||
background-position: 70% center; |
|||
} |
|||
/* Site header image */ |
|||
.citizen-header:before { |
|||
background-image: url(/images/Artboard_1.png); /* Add your space-themed header image here */ |
|||
} |
|||
} |
|||
/* A-Space */ |
|||
@media screen and (min-width: 1120px) { |
|||
.mw-body::before { |
|||
background-image: url(/w/images/f/f1/Middle_Earth_Map_-_Mapome_-_No_label.svg); |
|||
} |
|||
} |
|||
/* Font import */ |
/* Font import */ |
||
| Line 32: | Line 14: | ||
} |
} |
||
/* Base theme variables */ |
|||
/** |
|||
* Theme Variables |
|||
*/ |
|||
:root { |
:root { |
||
--font-family-base: 'Afacad-Regular', sans-serif; |
--font-family-base: 'Afacad-Regular', sans-serif; |
||
--font-size-base: 1rem; |
--font-size-base: 1rem; |
||
--tg-inscription-size: 8px; |
--tg-inscription-size: 8px; |
||
--opacity-icon-base: 0.7; |
--opacity-icon-base: 0.7; |
||
/* General link color */ |
|||
--link-color: #f72a57; /* Space theme pink */ |
--link-color: #f72a57; /* Space theme pink */ |
||
} |
} |
||
/* ============================== |
|||
/* Light mode styles */ |
|||
* 2. THEME VARIABLES |
|||
* ============================== */ |
|||
/* Light mode */ |
|||
:root.skin-theme-clientpref-light { |
:root.skin-theme-clientpref-light { |
||
--tg-color-base: #333333; |
--tg-color-base: #333333; |
||
| Line 59: | Line 41: | ||
--tg-border-color-interactive: rgba(0, 0, 0, 0.08); |
--tg-border-color-interactive: rgba(0, 0, 0, 0.08); |
||
--tg-opacity-pattern: 0.1; |
--tg-opacity-pattern: 0.1; |
||
--tg-color-inverted-progressive: #000; |
--tg-color-inverted-progressive: #000; |
||
--color-primary: #0077cc !important; |
--color-primary: #0077cc !important; |
||
--color-primary--hover: #0055aa !important; |
--color-primary--hover: #0055aa !important; |
||
--color-primary--active: #003388 !important; |
--color-primary--active: #003388 !important; |
||
} |
} |
||
/* Dark |
/* Dark mode */ |
||
:root.skin-theme-clientpref-night { |
:root.skin-theme-clientpref-night { |
||
--tg-color-base: #e0e0e0; |
--tg-color-base: #e0e0e0; |
||
| Line 81: | Line 63: | ||
--tg-border-color-interactive: rgba(255, 255, 255, 0.08); |
--tg-border-color-interactive: rgba(255, 255, 255, 0.08); |
||
--tg-opacity-pattern: 0.05; |
--tg-opacity-pattern: 0.05; |
||
--color-primary: #66ccff !important; |
--color-primary: #66ccff !important; |
||
--color-primary--hover: #44aaff !important; |
--color-primary--hover: #44aaff !important; |
||
--color-primary--active: #2288dd !important; |
--color-primary--active: #2288dd !important; |
||
} |
} |
||
/* Auto theme */ |
/* Auto theme (system preference) */ |
||
@media screen and (prefers-color-scheme: dark) { |
@media screen and (prefers-color-scheme: dark) { |
||
:root.skin-theme-clientpref-os { |
:root.skin-theme-clientpref-os { |
||
/* Same variables as dark mode */ |
|||
--tg-border-color-base: rgba(255, 255, 255, 0.05); |
|||
--tg-border-color-subtle: rgba(255, 255, 255, 0.02); |
|||
--tg-border-color-interactive: rgba(255, 255, 255, 0.08); |
|||
--tg-color-base: #e0e0e0; |
--tg-color-base: #e0e0e0; |
||
--tg-color-emphasized: #66ccff; |
--tg-color-emphasized: #66ccff; |
||
--tg-color-subtle: #999999; |
--tg-color-subtle: #999999; |
||
--tg-color-inverted-progressive: #000; |
--tg-color-inverted-progressive: #000; |
||
--tg-color-surface-0: #02022b; |
--tg-color-surface-0: #02022b; |
||
--tg-color-surface-1: #0a0a35; |
--tg-color-surface-1: #0a0a35; |
||
--tg-color-surface-2: #13133e; |
--tg-color-surface-2: #13133e; |
||
| Line 102: | Line 82: | ||
--tg-color-surface-4: #252550; |
--tg-color-surface-4: #252550; |
||
--tg-color-surface-5: #2e2e59; |
--tg-color-surface-5: #2e2e59; |
||
--tg-border-color-base: rgba(255, 255, 255, 0.05); |
|||
--tg-border-color-subtle: rgba(255, 255, 255, 0.02); |
|||
--tg-border-color-interactive: rgba(255, 255, 255, 0.08); |
|||
--tg-opacity-pattern: 0.05; |
--tg-opacity-pattern: 0.05; |
||
--color-primary: #66ccff !important; |
--color-primary: #66ccff !important; |
||
--color-primary--hover: #44aaff !important; |
--color-primary--hover: #44aaff !important; |
||
--color-primary--active: #2288dd !important; |
--color-primary--active: #2288dd !important; |
||
| Line 109: | Line 92: | ||
} |
} |
||
/* |
/* Pure black theme option */ |
||
:root.skin-theme-clientpref-night.citizen-feature-pure-black-clientpref-1 { |
:root.skin-theme-clientpref-night.citizen-feature-pure-black-clientpref-1 { |
||
--tg-color-surface-0: #000; |
--tg-color-surface-0: #000; |
||
| Line 134: | Line 117: | ||
} |
} |
||
/* ============================== |
|||
/* Typography and Transitions */ |
|||
* 3. TYPOGRAPHY AND GENERAL ELEMENTS |
|||
* ============================== */ |
|||
* { |
* { |
||
transition: color 0.3s; |
transition: color 0.3s; |
||
} |
|||
body { |
|||
background-color: var(--tg-color-surface-0); |
|||
} |
} |
||
| Line 148: | Line 138: | ||
} |
} |
||
/* |
/* Theme-specific content styling */ |
||
.skin-theme-clientpref-night blockquote p { |
|||
color: #bbbbbb; |
|||
} |
|||
.skin-theme-clientpref-light blockquote p { |
|||
color: #555555; |
|||
} |
|||
.skin-theme-clientpref-night figure.mw-default-size figcaption { |
|||
color: #cccccc; |
|||
} |
|||
.skin-theme-clientpref-light figure.mw-default-size figcaption { |
|||
color: #aaaaaa; |
|||
} |
|||
/* ============================== |
|||
* 4. LINKS |
|||
* ============================== */ |
|||
/* Base link styling */ |
|||
a { |
a { |
||
color: var(--link-color); |
color: var(--link-color); |
||
| Line 170: | Line 181: | ||
} |
} |
||
/* |
/* External link icon */ |
||
.skin-theme-clientpref-night blockquote p { |
|||
color: #bbbbbb; |
|||
} |
|||
.skin-theme-clientpref-light blockquote p { |
|||
color: #555555; |
|||
} |
|||
.skin-theme-clientpref-night figure.mw-default-size figcaption { |
|||
color: #cccccc; |
|||
} |
|||
.skin-theme-clientpref-light figure.mw-default-size figcaption { |
|||
color: #aaaaaa; |
|||
} |
|||
/* Do not invert edit button icon in dark mode because of contrast */ |
|||
.skin-theme-clientpref-night #ca-edit .citizen-ui-icon::before, |
|||
.skin-theme-clientpref-night #ca-ve-edit .citizen-ui-icon::before { |
|||
filter: none; |
|||
} |
|||
@media screen and (prefers-color-scheme: dark) { |
|||
.skin-theme-clientpref-os #ca-edit .citizen-ui-icon::before, |
|||
.skin-theme-clientpref-os #ca-ve-edit .citizen-ui-icon::before { |
|||
filter: none; |
|||
} |
|||
} |
|||
/* External Links */ |
|||
a.extiw::after { |
a.extiw::after { |
||
display: inline-block; |
display: inline-block; |
||
| Line 216: | Line 197: | ||
} |
} |
||
/* Don't show external link icon in plainlinks */ |
|||
.plainlinks a { |
|||
.plainlinks a.external::after { |
|||
display: none; |
|||
&::after { |
|||
} |
|||
display: none; |
|||
} |
|||
/* ============================== |
|||
} |
|||
* 5. LAYOUT AND CONTAINERS |
|||
* ============================== */ |
|||
/* Main container layout */ |
|||
.citizen-body-container { |
|||
position: relative; |
|||
} |
} |
||
| Line 229: | Line 216: | ||
} |
} |
||
/* Shift sticky header trigger point |
/* Shift sticky header trigger point */ |
||
#citizen-page-header-sticky-sentinel { |
#citizen-page-header-sticky-sentinel { |
||
transform: translateY(100px); |
transform: translateY(100px); |
||
} |
} |
||
/* Move page header to the bottom for main page */ |
|||
/** |
|||
.page-Main_Page .citizen-body-container { |
|||
* Background image handling |
|||
grid-template-areas: |
|||
*/ |
|||
'content' |
|||
.citizen-page-container, |
|||
'header' |
|||
.citizen-body-container { |
|||
'afterHeader' |
|||
'footer'; |
|||
} |
|||
/* ============================== |
|||
* 6. BACKGROUND HANDLING |
|||
* ============================== */ |
|||
/* Base container for background */ |
|||
.citizen-page-container { |
|||
position: relative; |
position: relative; |
||
min-height: 100vh; |
|||
z-index: 0; |
|||
} |
} |
||
/* Reset any existing pseudo-elements */ |
|||
.citizen-header:before, |
|||
.citizen-page-container::before, |
.citizen-page-container::before, |
||
.citizen-page-container::after, |
|||
.mw-body::before, |
.mw-body::before, |
||
.citizen-body-container::after { |
.citizen-body-container::after { |
||
| Line 252: | Line 252: | ||
} |
} |
||
/* Background image with fixed attachment */ |
|||
.citizen-header:before, |
|||
.citizen-page-container::before { |
|||
background-repeat: no-repeat; |
|||
} |
|||
/* Ensure background image is always visible */ |
|||
.citizen-page-container { |
|||
background-image: none; /* Remove the previous background setup */ |
|||
position: relative; |
|||
overflow: hidden; /* Ensure the pseudo-element stays within bounds */ |
|||
min-height: 100vh; |
|||
} |
|||
/* Add fixed background with proper scaling */ |
|||
.citizen-page-container::after { |
.citizen-page-container::after { |
||
content: ''; |
|||
position: absolute; /* Changed from fixed to absolute */ |
|||
top: 0; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; /* Extend to full height of container */ |
|||
background-image: url('/images/97kkmoki2rx21.png'); |
background-image: url('/images/97kkmoki2rx21.png'); |
||
background-position: |
background-position: center top; |
||
background-repeat: no-repeat; |
background-repeat: no-repeat; |
||
background-size: cover; |
background-size: cover; |
||
background-attachment: fixed; |
background-attachment: fixed; |
||
z-index: -2; |
z-index: -2; |
||
pointer-events: none; |
|||
} |
} |
||
/* |
/* Fade gradient overlay */ |
||
.citizen-page-container::before { |
.citizen-page-container::before { |
||
background: linear-gradient(to bottom, transparent 60%, var(--tg-color-surface-0) 100%); |
|||
content: ''; |
|||
position: absolute; /* Changed from fixed to absolute */ |
|||
top: 0; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; /* Extend to full height of container */ |
|||
background: linear-gradient(to bottom, transparent 40%, rgba(2, 2, 43, 0.3) 70%, rgba(2, 2, 43, 0.8) 100%); |
|||
z-index: -1; |
z-index: -1; |
||
pointer-events: none; |
|||
} |
} |
||
/* ============================== |
|||
/* Progressive blur effect for bottom of background */ |
|||
* 7. HEADER AND NAVIGATION |
|||
@supports (backdrop-filter: blur(0)) { |
|||
* ============================== */ |
|||
.citizen-page-container::before { |
|||
background: linear-gradient(to bottom, transparent 40%, rgba(2, 2, 43, 0.2) 70%, rgba(2, 2, 43, 0.6) 100%); |
|||
} |
|||
/* Header styling */ |
|||
/* Create progressive blur zones */ |
|||
.citizen-header { |
|||
position: relative; |
|||
mask-image: linear-gradient( |
|||
z-index: 3; |
|||
to bottom, |
|||
rgba(0, 0, 0, 1) 40%, |
|||
rgba(0, 0, 0, 0.8) 60%, |
|||
rgba(0, 0, 0, 0.6) 70%, |
|||
rgba(0, 0, 0, 0.4) 80%, |
|||
rgba(0, 0, 0, 0.2) 90%, |
|||
rgba(0, 0, 0, 0) 100% |
|||
); |
|||
-webkit-mask-image: linear-gradient( |
|||
to bottom, |
|||
rgba(0, 0, 0, 1) 40%, |
|||
rgba(0, 0, 0, 0.8) 60%, |
|||
rgba(0, 0, 0, 0.6) 70%, |
|||
rgba(0, 0, 0, 0.4) 80%, |
|||
rgba(0, 0, 0, 0.2) 90%, |
|||
rgba(0, 0, 0, 0) 100% |
|||
); |
|||
} |
|||
} |
|||
/* Adjust for different screen sizes */ |
|||
@media screen and (max-width: 1024px) { |
|||
.citizen-page-container::after { |
|||
background-position: 60% center; |
|||
} |
|||
} |
|||
.mw-body::before, |
|||
.citizen-body-container::after { |
|||
background-repeat: repeat-y; |
|||
filter: var(--filter-invert); |
|||
} |
} |
||
.citizen-header::before { |
.citizen-header::before { |
||
content: ''; |
|||
background-position: center left; |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
right: 0; |
|||
height: 100px; |
|||
background-image: url('/images/Artboard_1.png'); |
|||
background-position: center; |
|||
background-size: contain; |
background-size: contain; |
||
background-repeat: no-repeat; |
|||
mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.2), transparent 32px); |
|||
z-index: -1; |
|||
-webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.2), transparent 32px); |
|||
} |
} |
||
/* ============================== |
|||
.citizen-page-container::before { |
|||
* 8. CONTENT STYLING |
|||
height: 200px; |
|||
* ============================== */ |
|||
background-size: cover; |
|||
mask-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.2) 3rem, rgba(0, 0, 0, 0.05) 9rem, transparent 100%); |
|||
-webkit-mask-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.2) 3rem, rgba(0, 0, 0, 0.05) 9rem, transparent 100%); |
|||
} |
|||
/* Glass effect for content area */ |
|||
.mw-body::before { |
|||
.citizen-body { |
|||
position: fixed; /* Avoid layout shift */ |
|||
background: rgba(255, 255, 255, 0.2); |
|||
margin-left: calc(var(--tg-inscription-size) + var(--padding-page)); |
|||
backdrop-filter: blur(12px); |
|||
opacity: calc(var(--tg-opacity-pattern) * 0.5); /* Since this is behind content, it should be more subtle */ |
|||
-webkit-backdrop-filter: blur(12px); |
|||
background-repeat: repeat; |
|||
border-radius: 10px; |
|||
mask-image: linear-gradient(transparent, #000 480px, #000 calc(100% - 480px), transparent); |
|||
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15); |
|||
-webkit-mask-image: linear-gradient(transparent, #000 480px, #000 calc(100% - 480px), transparent); |
|||
border: 1px solid rgba(255, 255, 255, 0.15); |
|||
margin: 0.5rem; |
|||
padding: 1rem; |
|||
position: relative; |
|||
z-index: 1; |
|||
} |
} |
||
/* Dark mode glass effect */ |
|||
.citizen-body-container::after { |
|||
.skin-theme-clientpref-night .citizen-body { |
|||
background-size: var(--tg-inscription-size); |
|||
background: rgba(10, 10, 53, 0.35); |
|||
opacity: var(--tg-opacity-pattern); |
|||
border: 1px solid rgba(100, 100, 255, 0.1); |
|||
mask-image: linear-gradient(transparent, #000 160px, #000 calc(100% - 160px), transparent); |
|||
-webkit-mask-image: linear-gradient(transparent, #000 160px, #000 calc(100% - 160px), transparent); |
|||
} |
} |
||
/* Ensure text is readable with shadow */ |
|||
@media screen and (min-width: 640px) { |
|||
.citizen-body p, |
|||
img.mw-logo-wordmark { |
|||
.citizen-body li, |
|||
height: 2.5rem; |
|||
.citizen-body h1, |
|||
} |
|||
.citizen-body h2, |
|||
.citizen-body h3, |
|||
.citizen-body h4, |
|||
.citizen-body h5, |
|||
.citizen-body h6 { |
|||
color: var(--tg-color-base); |
|||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); |
|||
} |
} |
||
/* Reset inner elements */ |
|||
@media screen and (min-width: 1120px) { |
|||
.mw-body, |
|||
:root { |
|||
.citizen-body__sidebar { |
|||
--tg-inscription-size: 32px; |
|||
background: transparent; |
|||
} |
|||
backdrop-filter: none; |
|||
-webkit-backdrop-filter: none; |
|||
/* Make space for header background image */ |
|||
box-shadow: none; |
|||
.citizen-header { |
|||
border: none; |
|||
padding-top: 36px; |
|||
margin: 0; |
|||
} |
|||
padding: 0; |
|||
.citizen-header::before { |
|||
background-position: top center; |
|||
mask-image: linear-gradient(rgba(0, 0, 0, 0.2), transparent 64px); |
|||
-webkit-mask-image: linear-gradient(rgba(0, 0, 0, 0.2), transparent 64px); |
|||
} |
|||
/* Make space for inscription */ |
|||
.citizen-page-header, |
|||
.citizen-body-container { |
|||
padding-left: calc(var(--tg-inscription-size) + var(--padding-page)); |
|||
} |
|||
} |
} |
||
/* ============================== |
|||
@media screen and (min-width: 1680px) { |
|||
* 9. MENU AND SIDEBAR |
|||
:root { |
|||
* ============================== */ |
|||
--tg-inscription-size: 3vw; |
|||
} |
|||
} |
|||
/* Move page header to the bottom for main page */ |
|||
.page-Main_Page .citizen-body-container { |
|||
grid-template-areas: |
|||
'content' |
|||
'header' |
|||
'afterHeader' |
|||
'footer'; |
|||
} |
|||
@media (hover: hover) { |
|||
/* |
|||
* Search button tooltip |
|||
* This is temporary until tooltip is fully implemented upstream at Citizen |
|||
*/ |
|||
.citizen-search .citizen-dropdown-details:not([open]) > .citizen-dropdown-summary:hover::after { |
|||
content: '/'; |
|||
position: absolute; |
|||
border: 1px solid var(--border-color-interactive); |
|||
border-radius: var(--border-radius--small); |
|||
min-width: var(--size-icon); |
|||
min-height: var(--size-icon); |
|||
padding: 0 var(--space-xxs); |
|||
background: var(--color-surface-1); |
|||
font-size: 0.65rem; |
|||
font-weight: var(--font-weight-medium); |
|||
line-height: 1; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
} |
|||
/* Drawer menu */ |
|||
/* |
|||
* Menu |
|||
* Rich format menu to have more hierarchy |
|||
*/ |
|||
/* Remove bottom spacing as it is handled in footer portlet */ |
|||
.citizen-drawer__menu { |
.citizen-drawer__menu { |
||
margin-bottom: 0; |
margin-bottom: 0; |
||
| Line 444: | Line 351: | ||
} |
} |
||
/* External links menu */ |
|||
.mw-portlet-External { |
.mw-portlet-External { |
||
position: sticky; |
position: sticky; |
||
| Line 454: | Line 362: | ||
grid-column-start: 1; |
grid-column-start: 1; |
||
white-space: nowrap; |
white-space: nowrap; |
||
} |
|||
@media screen and (min-width: 32.875rem) { |
|||
.mw-portlet-External { |
|||
grid-column-end: span 2; |
|||
} |
|||
} |
|||
.mw-portlet-External .citizen-menu__heading { |
|||
display: none; |
|||
} |
} |
||
| Line 475: | Line 373: | ||
} |
} |
||
.mw-portlet-External .citizen-menu__heading { |
|||
/* Label */ |
|||
display: none; |
|||
} |
|||
/* Sidebar labels */ |
|||
.citizen-drawer__menu [id^='n-sidebar-label-'] a { |
.citizen-drawer__menu [id^='n-sidebar-label-'] a { |
||
pointer-events: none; |
pointer-events: none; |
||
| Line 488: | Line 390: | ||
} |
} |
||
/* |
/* Sidebar icons */ |
||
.citizen-drawer__menu [id^='n-sidebar-icon-'] a { |
.citizen-drawer__menu [id^='n-sidebar-icon-'] a { |
||
font-size: 0; |
font-size: 0; |
||
| Line 504: | Line 406: | ||
} |
} |
||
/* Specific icons */ |
|||
#n-sidebar-icon-discord a:before { |
#n-sidebar-icon-discord a:before { |
||
background-image: url(https://tolkiengateway.net/w/images/7/77/Discord_-_Simple_Icons.svg); |
background-image: url(https://tolkiengateway.net/w/images/7/77/Discord_-_Simple_Icons.svg); |
||
| Line 532: | Line 435: | ||
} |
} |
||
/* Do not invert edit button icon in dark mode because of contrast */ |
|||
/* Remove the previously added glass effects for individual elements */ |
|||
.skin-theme-clientpref-night #ca-edit .citizen-ui-icon::before, |
|||
.mw-body { |
|||
.skin-theme-clientpref-night #ca-ve-edit .citizen-ui-icon::before { |
|||
background: transparent; |
|||
filter: none; |
|||
-webkit-backdrop-filter: none; |
|||
box-shadow: none; |
|||
border: none; |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
} |
||
@media screen and (prefers-color-scheme: dark) { |
|||
.citizen-body__sidebar { |
|||
.skin-theme-clientpref-os #ca-edit .citizen-ui-icon::before, |
|||
background: transparent; |
|||
.skin-theme-clientpref-os #ca-ve-edit .citizen-ui-icon::before { |
|||
backdrop-filter: none; |
|||
filter: none; |
|||
} |
|||
box-shadow: none; |
|||
border: none; |
|||
margin: 0; |
|||
} |
} |
||
/* ============================== |
|||
/* Add blurred glass effect to the citizen-body class only */ |
|||
* 10. SEARCH INTERFACE |
|||
.citizen-body { |
|||
* ============================== */ |
|||
background: rgba(255, 255, 255, 0.2); |
|||
backdrop-filter: blur(12px); |
|||
@media (hover: hover) { |
|||
-webkit-backdrop-filter: blur(12px); |
|||
/* Search button tooltip */ |
|||
border-radius: 10px; |
|||
.citizen-search .citizen-dropdown-details:not([open]) > .citizen-dropdown-summary:hover::after { |
|||
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15); |
|||
content: '/'; |
|||
border: 1px solid rgba(255, 255, 255, 0.15); |
|||
position: absolute; |
|||
margin: 0.5rem; |
|||
border: 1px solid var(--border-color-interactive); |
|||
padding: 1rem; |
|||
border-radius: var(--border-radius--small); |
|||
position: relative; |
|||
min-width: var(--size-icon); |
|||
z-index: 1; |
|||
min-height: var(--size-icon); |
|||
padding: 0 var(--space-xxs); |
|||
background: var(--color-surface-1); |
|||
font-size: 0.65rem; |
|||
font-weight: var(--font-weight-medium); |
|||
line-height: 1; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
} |
} |
||
/* ============================== |
|||
/* Adjust for dark mode */ |
|||
* 11. RESPONSIVE DESIGN |
|||
.skin-theme-clientpref-night .citizen-body { |
|||
* ============================== */ |
|||
background: rgba(10, 10, 53, 0.35); |
|||
border: 1px solid rgba(100, 100, 255, 0.1); |
|||
@media screen and (min-width: 640px) { |
|||
img.mw-logo-wordmark { |
|||
height: 2.5rem; |
|||
} |
|||
} |
} |
||
@media screen and (min-width: 1120px) { |
|||
/* Keep the content area text readable */ |
|||
:root { |
|||
.citizen-body p, |
|||
--tg-inscription-size: 32px; |
|||
.citizen-body li, |
|||
} |
|||
.citizen-body h1, |
|||
.citizen-body h2, |
|||
/* Header adjustments */ |
|||
.citizen-body h3, |
|||
.citizen- |
.citizen-header { |
||
padding-top: 36px; |
|||
.citizen-body h5, |
|||
} |
|||
.citizen-body h6 { |
|||
color: var(--tg-color-base); |
|||
.citizen-header::before { |
|||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); |
|||
background-position: top center; |
|||
} |
|||
/* Page layout adjustments */ |
|||
.citizen-page-header, |
|||
.citizen-body-container { |
|||
padding-left: calc(var(--tg-inscription-size) + var(--padding-page)); |
|||
} |
|||
} |
|||
@media screen and (min-width: 1680px) { |
|||
:root { |
|||
--tg-inscription-size: 3vw; |
|||
} |
|||
} |
|||
@media screen and (max-width: 1024px) { |
|||
.citizen-page-container::after { |
|||
background-position: 60% center; |
|||
} |
|||
} |
|||
@media screen and (min-width: 32.875rem) { |
|||
.mw-portlet-External { |
|||
grid-column-end: span 2; |
|||
} |
|||
} |
} |
||
Revision as of 09:23, 7 March 2025
/*
* Citizen Skin - Aurora Theme
* Organized CSS for better maintainability
*/
/* ==============================
* 1. BASIC SETUP
* ============================== */
/* Font import */
@font-face {
font-family: 'Afacad-Regular';
src: url('/images/fonts/Afacad-Regular.ttf') format('truetype');
}
/* Base theme variables */
:root {
--font-family-base: 'Afacad-Regular', sans-serif;
--font-size-base: 1rem;
--tg-inscription-size: 8px;
--opacity-icon-base: 0.7;
--link-color: #f72a57; /* Space theme pink */
}
/* ==============================
* 2. THEME VARIABLES
* ============================== */
/* Light mode */
:root.skin-theme-clientpref-light {
--tg-color-base: #333333;
--tg-color-emphasized: #0077cc;
--tg-color-subtle: #777777;
--tg-color-surface-0: #ffffff;
--tg-color-surface-1: #f8f9fa;
--tg-color-surface-2: #eaecf0;
--tg-color-surface-3: #c8ccd1;
--tg-color-surface-4: #a2a9b1;
--tg-border-color-base: rgba(0, 0, 0, 0.05);
--tg-border-color-subtle: rgba(0, 0, 0, 0.02);
--tg-border-color-interactive: rgba(0, 0, 0, 0.08);
--tg-opacity-pattern: 0.1;
--tg-color-inverted-progressive: #000;
--color-primary: #0077cc !important;
--color-primary--hover: #0055aa !important;
--color-primary--active: #003388 !important;
}
/* Dark mode */
:root.skin-theme-clientpref-night {
--tg-color-base: #e0e0e0;
--tg-color-emphasized: #66ccff;
--tg-color-subtle: #999999;
--tg-color-inverted-progressive: #000;
--tg-color-surface-0: #02022b; /* Space theme dark blue */
--tg-color-surface-1: #0a0a35;
--tg-color-surface-2: #13133e;
--tg-color-surface-3: #1c1c47;
--tg-color-surface-4: #252550;
--tg-color-surface-5: #2e2e59;
--tg-border-color-base: rgba(255, 255, 255, 0.05);
--tg-border-color-subtle: rgba(255, 255, 255, 0.02);
--tg-border-color-interactive: rgba(255, 255, 255, 0.08);
--tg-opacity-pattern: 0.05;
--color-primary: #66ccff !important;
--color-primary--hover: #44aaff !important;
--color-primary--active: #2288dd !important;
}
/* Auto theme (system preference) */
@media screen and (prefers-color-scheme: dark) {
:root.skin-theme-clientpref-os {
/* Same variables as dark mode */
--tg-color-base: #e0e0e0;
--tg-color-emphasized: #66ccff;
--tg-color-subtle: #999999;
--tg-color-inverted-progressive: #000;
--tg-color-surface-0: #02022b;
--tg-color-surface-1: #0a0a35;
--tg-color-surface-2: #13133e;
--tg-color-surface-3: #1c1c47;
--tg-color-surface-4: #252550;
--tg-color-surface-5: #2e2e59;
--tg-border-color-base: rgba(255, 255, 255, 0.05);
--tg-border-color-subtle: rgba(255, 255, 255, 0.02);
--tg-border-color-interactive: rgba(255, 255, 255, 0.08);
--tg-opacity-pattern: 0.05;
--color-primary: #66ccff !important;
--color-primary--hover: #44aaff !important;
--color-primary--active: #2288dd !important;
}
}
/* Pure black theme option */
:root.skin-theme-clientpref-night.citizen-feature-pure-black-clientpref-1 {
--tg-color-surface-0: #000;
--tg-color-surface-1: #111;
--tg-color-surface-2: #222;
--tg-color-surface-3: #333;
--tg-color-surface-4: #444;
--tg-color-surface-5: #555;
--delta-hover-state: 6%;
--shadow-strength: 0.04;
}
@media screen and (prefers-color-scheme: dark) {
:root.skin-theme-clientpref-os.citizen-feature-pure-black-clientpref-1 {
--tg-color-surface-0: #000;
--tg-color-surface-1: #111;
--tg-color-surface-2: #222;
--tg-color-surface-3: #333;
--tg-color-surface-4: #444;
--tg-color-surface-5: #555;
--delta-hover-state: 6%;
--shadow-strength: 0.04;
}
}
/* ==============================
* 3. TYPOGRAPHY AND GENERAL ELEMENTS
* ============================== */
* {
transition: color 0.3s;
}
body {
background-color: var(--tg-color-surface-0);
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: var(--tg-font-family-heading);
}
/* Theme-specific content styling */
.skin-theme-clientpref-night blockquote p {
color: #bbbbbb;
}
.skin-theme-clientpref-light blockquote p {
color: #555555;
}
.skin-theme-clientpref-night figure.mw-default-size figcaption {
color: #cccccc;
}
.skin-theme-clientpref-light figure.mw-default-size figcaption {
color: #aaaaaa;
}
/* ==============================
* 4. LINKS
* ============================== */
/* Base link styling */
a {
color: var(--link-color);
transition: color 0.3s;
}
a:visited {
color: var(--link-color);
}
a:hover {
color: var(--link-color);
}
a:active {
color: var(--link-color);
}
a.new {
color: #6a38b3 !important; /* Purple for new pages */
}
/* External link icon */
a.extiw::after {
display: inline-block;
width: 0.75em;
height: 0.75em;
margin-left: 0.125em;
content: '';
background-color: currentcolor;
-webkit-mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgYXJpYS1oaWRkZW49InRydWUiIHZpZXdCb3g9IjAgMCAyMCAyMCI+IDxnIGZpbGw9ImN1cnJlbnRDb2xvciI+IDxwYXRoIGQ9Ik0xNyAxN0gzVjNoNVYxSDNhMiAyIDAgMCAwLTIgMnYxNGEyIDIgMCAwIDAgMiAyaDE0YTIgMiAwIDAgMCAyLTJ2LTVoLTJ6Ii8+IDxwYXRoIGQ9Im0xMSAxIDMuMjkgMy4yOS01LjczIDUuNzMgMS40MiAxLjQyIDUuNzMtNS43M0wxOSA5VjF6Ii8+IDwvZz4gPC9zdmc+)
no-repeat 50% 50%;
mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgYXJpYS1oaWRkZW49InRydWUiIHZpZXdCb3g9IjAgMCAyMCAyMCI+IDxnIGZpbGw9ImN1cnJlbnRDb2xvciI+IDxwYXRoIGQ9Ik0xNyAxN0gzVjNoNVYxSDNhMiAyIDAgMCAwLTIgMnYxNGEyIDIgMCAwIDAgMiAyaDE0YTIgMiAwIDAgMCAyLTJ2LTVoLTJ6Ii8+IDxwYXRoIGQ9Im0xMSAxIDMuMjkgMy4yOS01LjczIDUuNzMgMS40MiAxLjQyIDUuNzMtNS43M0wxOSA5VjF6Ii8+IDwvZz4gPC9zdmc+)
no-repeat 50% 50%;
-webkit-mask-size: contain;
mask-size: contain;
}
/* Don't show external link icon in plainlinks */
.plainlinks a.external::after {
display: none;
}
/* ==============================
* 5. LAYOUT AND CONTAINERS
* ============================== */
/* Main container layout */
.citizen-body-container {
position: relative;
}
/* Adjust wordmark size */
img.mw-logo-wordmark {
height: 2rem;
}
/* Shift sticky header trigger point */
#citizen-page-header-sticky-sentinel {
transform: translateY(100px);
}
/* Move page header to the bottom for main page */
.page-Main_Page .citizen-body-container {
grid-template-areas:
'content'
'header'
'afterHeader'
'footer';
}
/* ==============================
* 6. BACKGROUND HANDLING
* ============================== */
/* Base container for background */
.citizen-page-container {
position: relative;
min-height: 100vh;
z-index: 0;
}
/* Reset any existing pseudo-elements */
.citizen-page-container::before,
.citizen-page-container::after,
.mw-body::before,
.citizen-body-container::after {
content: '';
position: absolute;
inset: 0;
pointer-events: none;
}
/* Background image with fixed attachment */
.citizen-page-container::after {
background-image: url('/images/97kkmoki2rx21.png');
background-position: center top;
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
z-index: -2;
}
/* Fade gradient overlay */
.citizen-page-container::before {
background: linear-gradient(to bottom, transparent 60%, var(--tg-color-surface-0) 100%);
z-index: -1;
}
/* ==============================
* 7. HEADER AND NAVIGATION
* ============================== */
/* Header styling */
.citizen-header {
position: relative;
z-index: 3;
}
.citizen-header::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 100px;
background-image: url('/images/Artboard_1.png');
background-position: center;
background-size: contain;
background-repeat: no-repeat;
z-index: -1;
}
/* ==============================
* 8. CONTENT STYLING
* ============================== */
/* Glass effect for content area */
.citizen-body {
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-radius: 10px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
border: 1px solid rgba(255, 255, 255, 0.15);
margin: 0.5rem;
padding: 1rem;
position: relative;
z-index: 1;
}
/* Dark mode glass effect */
.skin-theme-clientpref-night .citizen-body {
background: rgba(10, 10, 53, 0.35);
border: 1px solid rgba(100, 100, 255, 0.1);
}
/* Ensure text is readable with shadow */
.citizen-body p,
.citizen-body li,
.citizen-body h1,
.citizen-body h2,
.citizen-body h3,
.citizen-body h4,
.citizen-body h5,
.citizen-body h6 {
color: var(--tg-color-base);
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
/* Reset inner elements */
.mw-body,
.citizen-body__sidebar {
background: transparent;
backdrop-filter: none;
-webkit-backdrop-filter: none;
box-shadow: none;
border: none;
margin: 0;
padding: 0;
}
/* ==============================
* 9. MENU AND SIDEBAR
* ============================== */
/* Drawer menu */
.citizen-drawer__menu {
margin-bottom: 0;
padding-bottom: 0;
}
/* External links menu */
.mw-portlet-External {
position: sticky;
bottom: 0;
margin-top: var(--space-md);
padding: var(--space-xs) 0;
border-top: 1px solid var(--border-color-base);
background: var(--color-surface-1);
font-size: var(--font-size-x-small);
grid-column-start: 1;
white-space: nowrap;
}
.mw-portlet-External ul {
display: flex;
overflow: auto;
}
.mw-portlet-External .mw-list-item a {
gap: 0;
}
.mw-portlet-External .citizen-menu__heading {
display: none;
}
/* Sidebar labels */
.citizen-drawer__menu [id^='n-sidebar-label-'] a {
pointer-events: none;
margin-left: var(--space-xs);
padding-left: var(--space-md);
padding-right: var(--space-xs);
border-left: 1px solid var(--border-color-base);
border-radius: 0;
letter-spacing: 0.05em;
font-weight: var(--font-weight-normal);
color: var(--color-base--subtle) !important;
}
/* Sidebar icons */
.citizen-drawer__menu [id^='n-sidebar-icon-'] a {
font-size: 0;
content-visibility: auto;
}
.citizen-drawer__menu [id^='n-sidebar-icon-'] a:before {
display: block;
content: '';
width: var(--size-icon);
height: var(--size-icon);
background: transparent center/contain no-repeat;
opacity: var(--opacity-icon-base);
filter: var(--filter-invert);
}
/* Specific icons */
#n-sidebar-icon-discord a:before {
background-image: url(https://tolkiengateway.net/w/images/7/77/Discord_-_Simple_Icons.svg);
}
#n-sidebar-icon-bluesky a:before {
background-image: url(https://tolkiengateway.net/w/images/8/8b/Bluesky_-_Simple_Icons.svg);
}
#n-sidebar-icon-x a:before {
background-image: url(https://tolkiengateway.net/w/images/2/27/X_-_Simple_Icons.svg);
}
#n-sidebar-icon-facebook a:before {
background-image: url(https://tolkiengateway.net/w/images/c/c8/Facebook_-_Simple_Icons.svg);
}
#n-sidebar-icon-reddit a:before {
background-image: url(https://tolkiengateway.net/w/images/e/e8/Reddit_-_Simple_Icons.svg);
}
#n-sidebar-icon-instagram a:before {
background-image: url(https://tolkiengateway.net/w/images/b/b9/Instagram_-_Simple_Icons.svg);
}
#n-sidebar-icon-youtube a:before {
background-image: url(https://tolkiengateway.net/w/images/1/1f/YouTube_-_Simple_Icons.svg);
}
/* Do not invert edit button icon in dark mode because of contrast */
.skin-theme-clientpref-night #ca-edit .citizen-ui-icon::before,
.skin-theme-clientpref-night #ca-ve-edit .citizen-ui-icon::before {
filter: none;
}
@media screen and (prefers-color-scheme: dark) {
.skin-theme-clientpref-os #ca-edit .citizen-ui-icon::before,
.skin-theme-clientpref-os #ca-ve-edit .citizen-ui-icon::before {
filter: none;
}
}
/* ==============================
* 10. SEARCH INTERFACE
* ============================== */
@media (hover: hover) {
/* Search button tooltip */
.citizen-search .citizen-dropdown-details:not([open]) > .citizen-dropdown-summary:hover::after {
content: '/';
position: absolute;
border: 1px solid var(--border-color-interactive);
border-radius: var(--border-radius--small);
min-width: var(--size-icon);
min-height: var(--size-icon);
padding: 0 var(--space-xxs);
background: var(--color-surface-1);
font-size: 0.65rem;
font-weight: var(--font-weight-medium);
line-height: 1;
display: flex;
align-items: center;
justify-content: center;
}
}
/* ==============================
* 11. RESPONSIVE DESIGN
* ============================== */
@media screen and (min-width: 640px) {
img.mw-logo-wordmark {
height: 2.5rem;
}
}
@media screen and (min-width: 1120px) {
:root {
--tg-inscription-size: 32px;
}
/* Header adjustments */
.citizen-header {
padding-top: 36px;
}
.citizen-header::before {
background-position: top center;
}
/* Page layout adjustments */
.citizen-page-header,
.citizen-body-container {
padding-left: calc(var(--tg-inscription-size) + var(--padding-page));
}
}
@media screen and (min-width: 1680px) {
:root {
--tg-inscription-size: 3vw;
}
}
@media screen and (max-width: 1024px) {
.citizen-page-container::after {
background-position: 60% center;
}
}
@media screen and (min-width: 32.875rem) {
.mw-portlet-External {
grid-column-end: span 2;
}
}