MediaWiki:Mobile.css

From Cookie Clicker Wiki
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.
:root {
	--mobile-top-offset: 60px;
	/* probably longer than they should be */
	--icon-category: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' class='icon icon-tabler icon-tabler-category-2' width='24' height='24' viewBox='0 0 24 24' stroke-width='2' stroke='currentColor' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M14 4h6v6h-6z'%3E%3C/path%3E%3Cpath d='M4 14h6v6h-6z'%3E%3C/path%3E%3Cpath d='M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0'%3E%3C/path%3E%3Cpath d='M7 7m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0'%3E%3C/path%3E%3C/svg%3E");
	--icon-language: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' class='icon icon-tabler icon-tabler-language' width='24' height='24' viewBox='0 0 24 24' stroke-width='2' stroke='currentColor' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M4 5h7'%3E%3C/path%3E%3Cpath d='M9 3v2c0 4.418 -2.239 8 -5 8'%3E%3C/path%3E%3Cpath d='M5 9c0 2.144 2.952 3.908 6.7 4'%3E%3C/path%3E%3Cpath d='M12 20l4 -9l4 9'%3E%3C/path%3E%3Cpath d='M19.1 18h-6.2'%3E%3C/path%3E%3C/svg%3E");
}

.nomobile {
	display: none !important;
}

/* remove spacing that's left by pc layout */
#footer {
	margin-left: 0;
	margin-top: calc(var(--main-content-top-offset) - 50px) !important;
	height: auto !important;
}
#footer-info {
	margin-top: 5px !important;
}

#p-namespaces {
	margin-left: 17px !important;
}

#p-logo {
	top: -180px !important;
}

.wikitable {
	/* remove whatever appears behind tables */
	background-color: transparent;
	border: none;
}
.wikitable > caption {
	margin: 0px !important;
}

.vector-menu-heading-label {
	/* prevent actual name element of sidebar headers from being clickable */
	pointer-events: none;
}

.vector-menu-portal .vector-menu-heading {
	/* remove margin to prevent toggle logic from freaking out */
	margin: 0;
}
.vector-menu-portal .vector-menu-heading::after {
	/* remove heading line */
	content: none !important;
}

#mw-panel {
	/* move sidebar to top of screen with some adjustments */
	display: flex;
	position: absolute;
	transform: translateY(110px);
	margin: 60px 0.5em 0px 0.5em !important;
	width: calc(100% - 1em);
	justify-content: space-between;
}
#mw-panel::before {
	content: "";
	position: absolute;
	width: 100px;
	height: 32px;
	border: 3.5px solid;
	border-color: var(--theme-border);
	border-radius: 5px;
	background: linear-gradient(to right, var(--theme-left-gradient) 10%, var(--theme-border) 60%);
	z-index: -2;
	left: 10px;
	width: calc(100% - 30px);
}

#p-logo {
	/* move logo parent and remove boundary */
	height: 0px;
}

#p-logo a {
	/* make logo boundary more reasonable */
	height: 70px;
	background-size: contain !important;
	z-index: -3;
}

/* icons for nav and other langs sidebar headers */
#p-Navigation-label,
#p-lang-label {
	padding: 0px;
}
#p-Navigation-label span,
#p-lang span {
  font-size: 0px;
}
#p-lang a span {
  font-size: 14px;
}
#p-Navigation-label::before,
#p-lang-label::before {
    content:"";
  display: block;
  width: 26px;
  height: 26px;
  background: url("https://cookieclicker.wiki.gg/images/6/65/NavCookie.png") no-repeat;
  background-position: center;
  background-size: 26px;
}
#p-lang-label::before {
	background: url("https://cookieclicker.wiki.gg/images/4/43/LanguageCookie.png") no-repeat;
	background-position: center;
	background-size: 26px;
}
#p-Navigation .vector-menu-content,
#p-lang .vector-menu-content {
	margin-top: -22px;
}

/* sidebar body */
.vector-menu-portal .body {
	position: absolute;
	margin: -2px 0px 0px 0px;
    font-size: 20px;
    text-align: center;
    left: 0;
    visibility: hidden;
	width: calc(100% - 6px);
	background: var(--theme-background);
	border: 3.5px solid;
	border-color: var(--theme-border);
	border-radius: 5px;
	z-index: -1;
}

.vector-menu-portal {
	margin: 0px;
	position: static !important; /* make body independent */
	padding: 0px 4px 0px 4px;
	height: 32px;
	z-index: -2;
}
.vector-menu-portal.selected {
	z-index: auto;
	border-bottom: none;
	border-radius: 5px 5px 0px 0px;
}
.vector-menu-portal::before {
	/* remove sidebar upper body */
	content: none !important;
}

.vector-menu-portal .body ul {
	/* remove weird top padding from sidebar link list */
	padding-top: 0;
}

.vector-menu-portal .body ul li {
	/* add some vertical space to sidebar links */
	margin: 5px 0px 5px 0px;
}

.vector-menu-portal .body ul li a span {
	/* use fancier text for sidebar links */
	font-family: Tahoma;
	text-decoration: underline;
}

/* center theme-toggle label */
body #p-personal li#p-themes,
#p-personal li#p-themes .vector-menu-content
{
	display: flex;
	justify-content: center;
}

.mw-body {
	margin-top: 0px;
}

#mw-head {
	top: calc(var(--mobile-top-offset) + 139px) !important;
}

#content {
	margin-top: 179px !important;
}

.content-wrapper {
	/* offset content */
	margin-top: var(--mobile-top-offset);
}
.content-wrapper::before {
	content: "";
	position: absolute;
	width: calc(100% - 7px);
	height: 40px;
	background: linear-gradient(to right, var(--theme-left-gradient) 10%, var(--theme-border) 60%);
	top: calc(var(--mobile-top-offset) + 226px);
	border: 3.5px solid;
	border-color: var(--theme-border);
	border-radius: 20px 20px 0px 0px;
	z-index: -1;
}

.thumbinner {
  width: auto !important;;
}
div.tright {
  margin: 0px 0px 10px 0px;
}

/* search bar */
.vector-search-box {
	left: 0;
	position: absolute;
	width: calc(100% - 20px);
	transform: translateY(-75px);
}

.vector-search-box-inner {
	max-width: 100%;
	width: 100%;
}	

/* search bar input */
.vector-search-box-input {
    border: 3.5px solid var(--theme-border);
    background-color: var(--theme-unselected-background);
    color: var(--theme-text);
    border-radius: 5px;
    height: 40px;
}

.vector-search-box-input::placeholder {
	color: var(--theme-alt-text);
}

.thumb {
	/* don't allow text between thumbnails */
	width: 100% !important;
}

table {
	display: block !important;
}