User:Westgrass/common.css
Jump to navigation
Jump to search
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/***********************************************************************************************************
* interface layout and styles for widgets outside of content box
***********************************************************************************************************/
html,body{
height: auto;
}
body{
--main-layout-topbar-height: 35px; /* height of wiki.gg topbar */
--main-layout-sidebar-width: 160px; /* width of side navbar, without gap */
--main-layout-sidespace: 24px;
--main-layout-gap: 12px;
--main-layout-logo-height: 100px;
--main-box-border-radius: 6px;
--main-box-padding: 12px;
}
/**** Main Layout START ***********************************************************/
body{
/* self */
box-sizing: border-box;
min-height: 100vh;
padding-top: var(--main-layout-topbar-height); /* for wiki.gg topbar */
/* grid */
display: grid;
grid-template-columns: [body-left] var(--main-layout-sidespace) [aside-left] var(--main-layout-sidebar-width) [aside-right content-left] minmax(0,1fr) [content-right] var(--main-layout-sidespace) [body-right];
grid-template-rows: [page-start logo-start] var(--main-layout-logo-height) [logo-end nav-start] 0fr [nav-end content-start] auto [content-end footer-start] 0fr [footer-end] 1fr [page-end] 0fr [body-end];
gap: 0 var(--main-layout-gap);
}
#mw-page-base{ /* used to gen box shadow */
grid-column: content-left / content-right;
grid-row: nav-start / footer-end;
height: 100%;
background: none;
}
#mw-head-base,
#mw-navigation h2{
display: none;
}
body > .content-wrapper,
#mw-navigation{
display: contents;
}
#p-logo{
position: absolute;
width: 100%;
height: var(--main-layout-logo-height);
left: 0;
top: var(--main-layout-topbar-height);
transform: none;
}
body > footer{ /* wiki.gg footer bar */
grid-column: body-left / body-right;
grid-row: page-end / body-end;
}
#footer{
grid-column: content-left / content-right;
grid-row: footer-start / footer-end;
margin: 0;
}
#mw-head{
grid-column: content-left / content-right;
grid-row: nav-start / nav-end;
}
#mw-panel{
grid-column: aside-left / aside-right;
grid-row: nav-start / page-end;
margin-bottom: calc( var(--main-layout-gap) + var(--main-layout-sidespace) );
}
.mw-body{
grid-column: content-left / content-right;
grid-row: content-start / content-end;
margin: 0;
}
.mw-body:first-child{ /* api.php etc. */
grid-column: body-left / body-right;
grid-row: page-start / page-end;
}
#bodyContent{
min-height: 30em;
}
/**** Main Layout END ***********************************************************/
/* ads */
.games-showcase-header{
padding: var(--main-box-padding);
}
.games-showcase-footer{
padding: var(--main-box-padding);
}
.content-body > .games-showcase-sidebar{
padding: var(--main-box-padding);
}
aside.games-showcase-sidebar div.sidebar-showcase{
padding: 0 0 1rem 0;
}
/**** navbar ****/
#mw-head{
border-width: 0 1px;
border-style: solid;
border-color: var(--theme-content-border-color);
width: unset;
background: linear-gradient(to top, var(--theme-box-hover-mask), transparent 30%), var(--theme-navbar-background);
position: relative;
display: flex;
justify-content: space-between;
align-items: flex-end;
padding-top: 18px;
}
#mw-head::before{
content: '';
display: block;
width: 100%;
padding: 0 1px;
height: 15px;
background: var(--theme-navbar-background-top);
position: absolute;
top: -4px;
left: -1px;
}
#mw-head #left-navigation,
#mw-head #right-navigation{
float: none;
margin: 0;
display: flex;
align-items: flex-end;
flex: 1 1 auto;
}
#mw-head #left-navigation{
margin-left: var(--main-box-padding);
justify-content: flex-start;
}
#mw-head #right-navigation{
margin-right: var(--main-box-padding);
justify-content: flex-end;
}
/* reset */
#p-search,
.vectorMenu,
.vectorTabs,
.vectorTabs ul,
.vectorTabs span,
.vectorTabs li,
#mw-head .vectorMenu h3,
.vectorTabs li.selected a,
.vectorTabs li.selected a:visited,
.vectorTabs li a,
.vectorMenu h3 span {
background-image: none;
float: none;
height: auto;
display: block;
}
#mw-head input{
appearance: none;
}
#mw-head input:focus{
outline: 0;
}
.vectorTabs ul{
display: flex;
}
.vectorTabs ul li,
.vectorMenu{
display: block;
white-space: nowrap;
}
.vectorTabs li.selected a,
.vectorTabs li.selected a:visited,
.vectorTabs li a,
.vectorMenu h3 span {
color: var(--theme-text-color-em);
font-size: 15px;
line-height: 1.2;
text-decoration: none;
padding: 6px 12px 8px;
}
.vectorMenu h3:hover span {
color: var(--theme-text-color-em); /* reset */
}
.vectorTabs li,
.vectorMenu{
background: rgba(var(--theme-dark-color-rgb), 0.1);
border-style: solid;
border-color: var(--theme-content-border-color);
border-width: 1px 1px 0 1px;
border-radius: var(--main-box-border-radius) var(--main-box-border-radius) 0 0;
box-shadow: var(--theme-box-shadow);
position: relative;
margin-right: calc( var(--main-box-padding) / 2 );
}
.vectorTabs li:hover span,
.vectorMenu:hover h3,
.vectorMenu.open h3{
background: rgba(var(--theme-dark-color-rgb), 0.1);
}
.vectorTabs li.selected {
background: var(--theme-content-background);
background-attachment: fixed;
}
.vectorTabs li.selected:hover span{
background: none;
}
.vectorTabs li.selected::after{
content: "";
display: block;
width: 100%;
height: 2px;
background: var(--theme-content-background);
background-attachment: fixed;
position: absolute;
bottom: -2px;
z-index: 3;
}
/* todo: the star image */
.vectorTabs #ca-unwatch.icon span,
.vectorTabs #ca-watch.icon span{
padding: 0 3px;
}
.vectorTabs #ca-unwatch.icon a,
.vectorTabs #ca-watch.icon a,
.vectorTabs #ca-unwatch.icon a.loading,
.vectorTabs #ca-watch.icon a.loading{
display: block;
padding-top: 28px;
background-position: 50% 50%;
transform-origin: 50% 52%;
}
#mw-head .vectorMenu h3{
padding: 0;
margin: 0;
}
.vectorMenu h3 span::after {
content: "";
display: inline-block;
background: none;
position: unset;
width: 0;
height: 0;
border-color: currentColor transparent;
border-style: solid;
border-width: 6px 5px 0 5px;
margin-left: 4px;
vertical-align: middle;
}
/* drop down menu */
.vectorMenu.open .menu{
visibility: visible;
}
.vectorMenu .menu {
font-size: 15px;
background: var(--theme-box-background);
background-size: auto auto;
margin: 0;
border-radius: 0 0 var(--main-box-border-radius) var(--main-box-border-radius);
border-width: 1px;
border-style: solid;
border-color: var(--theme-content-border-color);
box-shadow: 0px 0 5px 0px rgba(var(--theme-dark-color-rgb), 0.3);
padding: 4px;
top: 100%;
left: -1px;
min-width: 8em;
}
.vectorMenu .menu li a{
text-decoration: none;
padding: 10px 8px;
border-radius: calc( var(--main-box-border-radius) - 2px );
font-size: 1em;
}
.vectorMenu .menu li a:hover{
background-color: var(--theme-box-hover-mask);
}
.vectorMenu li.selected{
color: var(--theme-text-color-em);
font-weight: bold;
display: none; /* just remove current selected (already displayed in header) */
}
/* search */
#p-search form,
#p-search input{
margin: 0;
}
#mw-head #p-search{
margin: 0 0 5px calc( var(--main-layout-gap) / 2 );
}
#simpleSearch{
background: none;
margin: 0;
border: 0;
color: var(--theme-text-color);
width: 15em;
padding: 0;
height: auto;
border-radius: 0;
transition: none;
display: flex;
align-items: stretch;
}
#simpleSearch #searchInput{
font-size: 14px;
background: rgba(var(--theme-dark-color-rgb),0.3);
border-radius: calc( var(--main-box-border-radius) - 2px ) 0 0 calc( var(--main-box-border-radius) - 2px );
padding: 4px 6px;
border-width: 1px;
border-style: solid;
border-color: var(--theme-inset-border-color);
border-right: 0;
line-height: 16px;
text-align: left;
word-wrap: break-word;
appearance: none;
-webkit-appearance: none;
flex: 1 1 auto;
color: inherit;
}
#simpleSearch #searchButton{
box-sizing: border-box;
display: block;
position: relative;
width: 2em;
height: auto;
flex: 0 0 auto;
background: var(--theme-image-icon-search) 45% center / 14px auto no-repeat, var(--theme-button-background);
border: 1px solid transparent;
border-color: var(--theme-button-border-color);
border-radius: 0 calc( var(--main-box-border-radius) - 2px ) calc( var(--main-box-border-radius) - 2px ) 0;
opacity: 0.7;
}
#simpleSearch #searchButton:hover,
#searchInput:focus ~ #searchButton{
opacity: 1;
}
@media screen and (max-width:1024px){
body{
grid-template-columns: [body-left] 0 [aside-left content-left] auto [aside-right content-right] 0 [body-right];
grid-template-rows: [page-start logo-start] var(--main-layout-logo-height) [logo-end nav-start] 0fr [nav-end content-start] 1fr [content-end footer-start] 0fr [footer-end aside-start] auto [aside-end page-end] 0fr [body-end];
}
#mw-panel{
grid-column: aside-left / aside-right;
grid-row: aside-start / aside-end;
margin-top: var(--main-layout-gap);
}
}
@media screen and (max-width:720px) {
:root{
--theme-site-logo-width: 210px;
--theme-site-logo-height: 70px;
}
body{
--main-layout-topbar-height: 90px; /* height of wiki.gg topbar */
grid-template-columns: [body-left aside-left content-left] auto [aside-right content-right body-right];
}
/*reset*/
div#content{
margin: 0;
}
#mw-head {
position: relative !important;
margin-top: 0;
top: 0;
padding-top: 60px; /*for search box*/
}
div#mw-navigation div#mw-panel {
display: block;
position:static;
width: auto;
overflow:hidden;
font-size: inherit;
}
body #footer {
padding-top: 0.75em;
}
body #footer #footer-info-lastmod,
body #footer #footer-info-viewcount {
display: block;
}
#mw-head div#left-navigation,
#mw-head div#right-navigation{
position: static;
width: auto !important; /*temp*/
}
#p-cactions .menu{
left: auto;
right: 0;
}
#mw-head #p-search{
display: block;
position: absolute;
left: 0;
top: 18px;
margin: auto 10%;
width: 80%;
}
div#simpleSearch{
width: auto;
}
#simpleSearch #searchButton{
opacity: 1;
}
div#p-logo{
display: block;
}
div.mw-body {
margin-top: 0px;
}
#mw-head #left-navigation{
margin-left: 2px;
}
#mw-head #right-navigation{
margin-right: 2px;
}
.vectorTabs li.selected a,
.vectorTabs li.selected a:visited,
.vectorTabs li a,
.vectorMenu h3 span {
font-size: 12px;
padding: 6px 6px 8px;
}
}
@media screen and (max-width:600px) {
#footer{
display: block;
}
#footer #footer-info-copyright{
padding-right: 0;
padding-bottom: 40px;
right: auto;
left: 0;
}
#footer-info-copyright img{
right: auto;
left: 0;
}
#footer #footer-icons{
position: absolute;
left: 106px;
right: auto;
bottom: 0.75em;
}
}
/**** logo ****/
#p-logo .mw-wiki-logo{
background-image: url(/images/e/e6/Site-logo.png);
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
width: 350px;
height: 100px;
margin: 0 auto;
}