MediaWiki:Common.css: Difference between revisions
Myriad-admin (talk | contribs) No edit summary |
Myriad-admin (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
/* === | /* ===== FORCE-HIDE ALL VECTOR/MOBILE HEADERS ===== */ | ||
html { font-size:100%; margin:0; } | body > header, | ||
header.vector-header, | |||
header#mw-header, | |||
nav.vector-header, | |||
#mw-mf-page-header, | |||
#mwe-popups-prefix, | |||
[id^="mw-mf-"] { | |||
display: none !important; | |||
} | |||
/* RESET & PAGE SPACING */ | |||
html { font-size: 100%; margin: 0; } | |||
body { | body { | ||
margin: 0; | |||
padding-top: 60px !important; /* space for our navbar */ | |||
} | } | ||
#content { margin-top:0 !important; } | #content { margin-top: 0 !important; } | ||
/* === THEME | /* === MYRIAD THEME COLORS === */ | ||
:root { | :root { | ||
--myriad-blue: #374CFF; | |||
--myriad-purple: #8836EA; | |||
--myriad-pink: #DB20D2; | |||
--myriad-yellow: #FFCE00; | |||
--myriad-green: #5AE09A; | |||
} | } | ||
/* | /* LINKS & BUTTONS */ | ||
a { color: var(--myriad-blue); text-decoration: none; } | a { | ||
a:hover { text-decoration: underline; } | color: var(--myriad-blue); | ||
text-decoration: none; | |||
} | |||
a:hover { | |||
text-decoration: underline; | |||
} | |||
.drg-button { | .drg-button { | ||
display: inline-block; | |||
padding: 0.5em 1em; | |||
font-variant: small-caps; | |||
border-radius: 7px; | |||
background-color: var(--myriad-blue); | |||
color: #fff !important; | |||
transition: background 200ms; | |||
} | } | ||
/* === NAVBAR === */ | /* ===== CUSTOM NAVBAR ===== */ | ||
#drg-navbar { | #drg-navbar { | ||
position: fixed; | |||
top: 0; left: 0; right: 0; | |||
background: #fff; | |||
border-bottom: 1px solid #ddd; | |||
z-index: 10000; | |||
} | } | ||
.drg-navbar-container { | .drg-navbar-container { | ||
max-width: 1200px; | |||
margin: 0 auto; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
padding: 0.75em 1em; | |||
gap: 1em; | |||
flex-wrap: wrap; | |||
} | } | ||
/* Logo */ | /* Logo */ | ||
.drg-navbar-logo img { | .drg-navbar-logo img { | ||
height: 40px; | |||
width: auto; | |||
} | } | ||
/* Links */ | /* Links */ | ||
.drg-navbar-links { | .drg-navbar-links { | ||
display: flex; | |||
gap: 2em; | |||
flex-grow: 1; | |||
justify-content: center; | |||
flex-wrap: wrap; | |||
} | } | ||
.drg-navbar-links a { | .drg-navbar-links a { | ||
position: relative; | |||
padding-bottom: 2px; | |||
font-weight: 500; | |||
} | } | ||
.drg-navbar-links a::after { | .drg-navbar-links a::after { | ||
content: ""; | |||
position: absolute; bottom: 0; left: 0; | |||
height: 2px; width: 0; | |||
background: var(--myriad-blue); | |||
transition: width 200ms ease; | |||
} | } | ||
.drg-navbar-links a:hover::after { | .drg-navbar-links a:hover::after { | ||
width: 100%; | |||
} | } | ||
/* Search form */ | /* Search form */ | ||
.drg-search { | .drg-search { | ||
display: flex; | |||
align-items: center; | |||
} | } | ||
.drg-search input[type="search"] { | .drg-search input[type="search"] { | ||
padding: 0.4em 0.6em; | |||
border: 1px solid #ccc; | |||
border-radius: 4px 0 0 4px; | |||
width: 180px; | |||
} | } | ||
.drg-search input[type="submit"] { | .drg-search input[type="submit"] { | ||
padding: 0.4em 1em; | |||
border: none; | |||
border-radius: 0 4px 4px 0; | |||
background: var(--myriad-blue); | |||
color: #fff; | |||
cursor: pointer; | |||
} | } | ||
/* User dropdown */ | /* User dropdown */ | ||
.drg-navbar-actions { | .drg-navbar-actions { | ||
display: flex; | |||
align-items: center; | |||
gap: 1em; | |||
position: relative; | |||
} | |||
.drg-user { | |||
position: relative; | |||
cursor: pointer; | |||
} | |||
.drg-user > span { | |||
padding: 0.4em 0.6em; | |||
display: inline-block; | |||
} | } | ||
.drg-user-dropdown { | .drg-user-dropdown { | ||
display: none; | |||
position: absolute; | |||
top: 100%; right: 0; | |||
background: #fff; | |||
border: 1px solid #ccc; | |||
border-radius: 4px; | |||
list-style: none; | |||
margin: 0.5em 0 0; | |||
padding: 0; | |||
min-width: 160px; | |||
box-shadow: 0 2px 6px rgba(0,0,0,0.1); | |||
z-index: 10001; | |||
} | |||
.drg-user-dropdown li { | |||
border-bottom: 1px solid #eee; | |||
} | |||
.drg-user-dropdown li:last-child { | |||
border-bottom: none; | |||
} | } | ||
.drg-user-dropdown li a { | .drg-user-dropdown li a { | ||
display: block; | |||
padding: 0.5em 1em; | |||
color: #000; | |||
white-space: nowrap; | |||
} | |||
.drg-user-dropdown li a:hover { | |||
background: #f5f5f5; | |||
} | |||
.drg-user:hover .drg-user-dropdown { | |||
display: block; | |||
} | } | ||
/* | /* MOBILE RESPONSIVE */ | ||
@media (max-width:768px) { | @media (max-width: 768px) { | ||
.drg-navbar-container { | |||
flex-direction: column; | |||
align-items: stretch; | |||
} | |||
.drg-navbar-links { | |||
justify-content: center; | |||
} | |||
} | } |
Revision as of 14:13, 24 June 2025
/* ===== FORCE-HIDE ALL VECTOR/MOBILE HEADERS ===== */
body > header,
header.vector-header,
header#mw-header,
nav.vector-header,
#mw-mf-page-header,
#mwe-popups-prefix,
[id^="mw-mf-"] {
display: none !important;
}
/* RESET & PAGE SPACING */
html { font-size: 100%; margin: 0; }
body {
margin: 0;
padding-top: 60px !important; /* space for our navbar */
}
#content { margin-top: 0 !important; }
/* === MYRIAD THEME COLORS === */
:root {
--myriad-blue: #374CFF;
--myriad-purple: #8836EA;
--myriad-pink: #DB20D2;
--myriad-yellow: #FFCE00;
--myriad-green: #5AE09A;
}
/* LINKS & BUTTONS */
a {
color: var(--myriad-blue);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.drg-button {
display: inline-block;
padding: 0.5em 1em;
font-variant: small-caps;
border-radius: 7px;
background-color: var(--myriad-blue);
color: #fff !important;
transition: background 200ms;
}
/* ===== CUSTOM NAVBAR ===== */
#drg-navbar {
position: fixed;
top: 0; left: 0; right: 0;
background: #fff;
border-bottom: 1px solid #ddd;
z-index: 10000;
}
.drg-navbar-container {
max-width: 1200px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.75em 1em;
gap: 1em;
flex-wrap: wrap;
}
/* Logo */
.drg-navbar-logo img {
height: 40px;
width: auto;
}
/* Links */
.drg-navbar-links {
display: flex;
gap: 2em;
flex-grow: 1;
justify-content: center;
flex-wrap: wrap;
}
.drg-navbar-links a {
position: relative;
padding-bottom: 2px;
font-weight: 500;
}
.drg-navbar-links a::after {
content: "";
position: absolute; bottom: 0; left: 0;
height: 2px; width: 0;
background: var(--myriad-blue);
transition: width 200ms ease;
}
.drg-navbar-links a:hover::after {
width: 100%;
}
/* Search form */
.drg-search {
display: flex;
align-items: center;
}
.drg-search input[type="search"] {
padding: 0.4em 0.6em;
border: 1px solid #ccc;
border-radius: 4px 0 0 4px;
width: 180px;
}
.drg-search input[type="submit"] {
padding: 0.4em 1em;
border: none;
border-radius: 0 4px 4px 0;
background: var(--myriad-blue);
color: #fff;
cursor: pointer;
}
/* User dropdown */
.drg-navbar-actions {
display: flex;
align-items: center;
gap: 1em;
position: relative;
}
.drg-user {
position: relative;
cursor: pointer;
}
.drg-user > span {
padding: 0.4em 0.6em;
display: inline-block;
}
.drg-user-dropdown {
display: none;
position: absolute;
top: 100%; right: 0;
background: #fff;
border: 1px solid #ccc;
border-radius: 4px;
list-style: none;
margin: 0.5em 0 0;
padding: 0;
min-width: 160px;
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
z-index: 10001;
}
.drg-user-dropdown li {
border-bottom: 1px solid #eee;
}
.drg-user-dropdown li:last-child {
border-bottom: none;
}
.drg-user-dropdown li a {
display: block;
padding: 0.5em 1em;
color: #000;
white-space: nowrap;
}
.drg-user-dropdown li a:hover {
background: #f5f5f5;
}
.drg-user:hover .drg-user-dropdown {
display: block;
}
/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
.drg-navbar-container {
flex-direction: column;
align-items: stretch;
}
.drg-navbar-links {
justify-content: center;
}
}