MediaWiki:Refreshed.css

From BIONICLEsector01
Revision as of 23:09, 20 July 2017 by Swert (talk | contribs) (Very minor edit)

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.
body,
#firstHeading,
.standard-toolbox,
.header-button,
#searchInput,
#content-wrapper,
#bodyContent,
#catlinks {
  font-family: "Franklin Gothic", sans-serif;
}

h2, h3 {
  font-weight: normal;
}
body {
  background: #a8dae3 url(//biosector01.com/wiki/skins/MonoBook/bgbio2015.jpg) no-repeat center center fixed;
  background-size: cover;
}

#header-wrapper {
  background: #54a1ac;
  top: 0; /* prevents changes to #content-wrapper's margin-top from pushing the header down */
}

.header-button:hover, .header-button-active, .header-dropdown-item:hover {
  background-color: initial;
  opacity: .5;
}

#site-info {
  width: 14.5em;
  position: relative;
}

#site-info:before {
  content: "";
  width: 100%;
  height: 0;
  position: absolute;
  top: 3em;
  left: 0;
  border-right: 1.5em solid transparent;
  border-top: 1.5em solid #54a1ac;
  z-index: 0;
  /* min-width: 15em; */
}

#site-info-main,
#site-info-main > .header-button {
  width: 100%;
}

.main.header-button img {
  height: 4em;
  padding-top: .25em;
  padding-left: .25em;
  width: auto;
  position: relative;
  margin-bottom: 0 !important;
}


#user-info,
.header-button {
  height: 100%;
  /* this combined with .username's max-height and overflow will
  cut off long usernames so they don't break the header */
}

.username {
    display: inline-block;
    text-align: left;
    vertical-align: middle;
    max-width: 100px;
    max-height: 100%;
    overflow: hidden;
    font-family: "Lato body", sans-serif;
    font-size: .7em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2em;
    margin-bottom: 0.3em;
    text-overflow: ellipsis;
}


#searchInput {
  padding: .4em;
}

#searchInput:focus {
  outline: 0;
  border-color: #056b7d;
  box-shadow: inset 0 0 0 0.2em #056b7d;
}

#searchInput::-webkit-input-placeholder {
    font-weight: normal;
}

#searchInput:-moz-placeholder {
    font-weight: normal;
}

#searchInput:-ms-input-placeholder {
    font-weight: normal;
}

#sidebar-wrapper {
  position: fixed;
  width: 10em;
  overflow: hidden;
}

#content-wrapper, #footer {
  margin-left: 10em;
}

#sidebar {
  top: 5.25em; /* extra 2em for the nevel part of the header (1.5em), and then some extra space */
  font-size: .9em;
  line-height: 1.6em;
  text-shadow: 0 0 2em #056b7d;
  height: 100%;
  padding-right: 100%; /* enough padding so that scrollbars are pushed outside #sidebar-wrapper and hidden */
}
#site-notice {
  padding-left: 5em;
  width: calc(100% - 5em);
  margin-top: -1em;
}
/*
.sidebar-section .main:before {
    content: "⟨";
    display: inline-block;
    transform: rotate(60deg);
    padding-right: .5em;
    margin-left: -.75em;
    font-size: .8em;
    height: 100%;
}
*/

.sidebar-section .main {
  text-transform: uppercase;
  font-weight: bold;
  overflow: visible; /* prevent text-shadow from being cut off */
  letter-spacing: .1em;
  font-weight: normal;
}

.sidebar-social-button {
  padding-left: 1em;
  margin-left: 5px !important;
}

#content-wrapper:before {
  content: "";
  width: calc(100% - 6em); /* (width of #content-wrapper: 100%) - (part of header bevel that pushes over into #content-wrapper: 14.5em [bevel width] + 1.5em [bevel border width] - 10em [sidebar width])*/
  height: 0;
  position: absolute;
  bottom: 100%;
  left: 4.5em; /* part of header bevel that pushes over into #content-wrapper: 14.5em [bevel width] + 1.5em [bevel border width] - 10em [sidebar width] */
  border-left: 1.5em solid transparent;
  border-bottom: 1.5em solid rgba(255, 255, 255, 0.75);
  z-index: 0;
  /* min-width: 15em; */
}


#content-wrapper {
  margin-top: 1.5em;
  padding-top: 0em;
  background-color: rgba(255, 255, 255, 0.75);
}

.fixed-toolbox {
  padding-left: initial;
  position: absolute;
  border-bottom: initial;
  background: initial;
  top: initial;
  left: initial;
  right: initial;
  z-index: initial;
}

.standard-toolbox a {
    padding-left: .25em;
    padding-right: .25em;
}

h1#firstHeading {
    font-size: 2.25em;
}

/***** BIONICLE: Encyclopedia-style image thumbnails *****/

div.thumbinner {
    background: none;
    border: none;
    /* get rid of min-width of 100px (looks bad with this style of thumbnail) */
    min-width: 0;
}

html .thumbimage {
    border: none;
}

html .thumbcaption {
    color: #fff;
    background-color: #000;
    position: relative;
    /* MediaWiki sets .thumbcaption's container to be 2px wider than the image; to compensate shrink the caption by 2px */
    margin-left: 1px;
    margin-right: 1px;
}

.thumbcaption a {
    color: inherit;
    font-weight: bold;
}

.thumbcaption:before {
    content: "";
    width: 30%;
    min-width: 10px;
    height: 0;
    position: absolute;
    top: -10px;
    left: 0;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #000;
}

.tleft {
    -webkit-clip-path: polygon(calc(100% - 2em) 0, 100% 2em, 100% 100%, 0 100%, 0 0);
    clip-path: polygon(calc(100% - 2em) 0, 100% 2em, 100% 100%, 0 100%, 0 0);
}

.tright {
    -webkit-clip-path: polygon(2em 0, 100% 0, 100% 100%, 0 100%, 0 2em);
    clip-path: polygon(2em 0, 100% 0, 100% 100%, 0 100%, 0 2em);
}

/***** Fonts *****/

/* Lato body (Refreshed's name for Lato 400) looks like the traditional Bionicle font Gill Sans when it's all uppercase */
h1, h2, h3, h4, h5, h6 {
    font-family: "Lato body", sans-serif;
    /* Makes font appear to be all caps (albeit with smaller characters), but copy/paste maintains original case.
        Good for wikis, as article names can be copy/pasted to make links that aren't all caps.
        Works for the major browsers except IE/Edge. */
    font-variant: all-small-caps;
    letter-spacing: .05em;
    line-height: 1em;
}

#firstHeading {
    font-family: "TradeMarker Light", sans-serif;
    line-height: .8em;
}

/* catches Edge (as of July 2017, Edge doesn't support all-small-caps yet) */
@supports not (font-variant: all-small-caps) {
    h1, h2, h3, h4, h5, h6 {
        /* text-transform doesn't affect copy/paste on IE/Edge, so setting this is fine. */
        text-transform: uppercase;
    }
    /* make the text a bit smaller (70%) as small-caps text appears smaller than normal text, and we're replicating small-caps */
    #firstHeading {
        /* 2.25em * .7 (scale factor). Math is necessary as #firstHeading doesn't wrap its contents in a span
            that we could target for an easy relative font downsize. */
        font-size: 1.575em;
        line-height: initial;
    }
    /* All article headlines wrap their contents in .mw-headline, making downsizing easy without math.
        Applies to sidebar h1s too (despite not using a wrapper span) since they happen to be 1em big,
        so 1em * .7 = .7em, so may as well combine the rules. */
    .mw-headline, h1.main {
        font-size: .7em;
    }
}

/* Catches IE10 and IE11. Regrettably the CSS has to be duplicated as, haha, the browsers don't support
    @supports We use @supports for now in addition to this, instead of one catch-all IE/Edge test,
    because @supports may catch other browsers that we haven't tested.
    Credit for media query: https://stackoverflow.com/a/28419263 */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    h1, h2, h3, h4, h5, h6 {
        /* text-transform doesn't affect copy/paste on IE/Edge, so setting this is fine. */
        text-transform: uppercase;
    }
    /* make the text a bit smaller (70%) as small-caps text appears smaller than normal text, and we're replicating small-caps */
    #firstHeading {
        /* 2.25em * .7 (scale factor). Math is necessary as #firstHeading doesn't wrap its contents in a span
            that we could target for an easy relative font downsize. */
        font-size: 1.575em;
        line-height: initial;
    }
    /* All article headlines wrap their contents in .mw-headline, making downsizing easy without math.
        Applies to sidebar h1s too (despite not using a wrapper span) since they happen to be 1em big,
        so 1em * .7 = .7em, so may as well combine the rules. */
    .mw-headline, h1.main {
        font-size: .7em;
    }
}