/* * Citizen - Common Styles * https://starcitizen.tools */ @import 'mediawiki.mixins'; /* * Framework */ html { font-size: @html-font-size; scroll-behavior: smooth; // not supported by IE, Edge, Safari, and Opera, use JQuery as fallback } html, body { height: 100%; margin: 0; padding: 0; font-family: @fonts; // font-smoothing: antialiased; // -webkit-font-smoothing: antialiased; /* Chrome, Safari */ // -moz-osx-font-smoothing: grayscale; /* Firefox */ } ul { list-style-type: square; } ol { list-style-type: none; } ul, ol { padding: 0; } p, ul, ol { margin: 0.8rem 0 0 0; } pre, code, tt, kbd, samp, .mw-code { font-family: @fonts-monospace; font-size: @content-monospace-size; } pre, code, .mw-code { color: @base-0; background-color: @base-90; border: 1px solid @base-80; } code { padding: 1px 4px; } pre, .mw-code { padding: 1rem; /* Wrap lines in overflow. T2260, T103780 */ white-space: pre-wrap; } a { color: @color-link; text-decoration: none!important; &:not( [ href ] ) { cursor: pointer; /* Always cursor:pointer even without href */ } &:hover { color: @color-link-active; } &.new { color: @color-link-new!important; // Override visited &:hover { color: @color-link-new-active!important; } } &:visited { color: @color-link; &:hover { color: @color-link-active; } } } .error { padding: 2px 4px; background-color: @red-90; font-size: unset; font-weight: 400; } .firstHeading { padding-top: 1.2rem; line-height: 1.2; } /* * Content */ .mw-body, .parsoid-body { margin-top: @header-height + @margin-side; padding: 0 @margin-side 120px; min-height: 60vh; // avoid footer being in the middle of the page direction: ltr; } .mw-wiki-title { font-family: @fonts-secondary!important; text-transform: uppercase; a& { color: @base-50; transition: @transition-opacity; &:hover, &:active, &:focus { color: @base-30; text-decoration: none; } } } .mw-body { // h1's can exist outside of mw-body-content so some heading styles // need to be defined in mw-body as well & h1, &-content h1, &-content h2, &-content h3, &-content h4 { font-family: @fonts-secondary; } & h1, &-content h1 { font-size: @content-h1-size; } .firstHeading { margin: 0; font-weight: 600; overflow: inherit; // black magic to wrap in small screen devices } #siteSub { display: block; margin: .4rem 0 1.6rem; color: @base-30; font-size: @content-caption-size; } .mw-indicators { float: right; line-height: @content-line-height; font-size: @content-body-size; /* Ensure that this is displayed on top of .mw-body-content and clickable */ position: relative; z-index: 1; } .mw-indicator { display: inline-block; zoom: 1; *display: inline; // stylelint-disable declaration-block-no-duplicate-properties } .firstHeading, #siteSub { .content-center; } } .mw-body-content { position: relative; .content-center; line-height: @content-line-height; font-size: @content-body-size; z-index: 0; color: @color-content-text; #mw-content-text { .mw-parser-output { .mw-headline { order: -1; // Make sure that header is the first } p { overflow-wrap: break-word; } &>h1, &>h2 { margin-top: @content-margin-top * 3; } &>h3, &>h4, &>h5, &>h6, &>p+p { margin-top: @content-margin-top * 2; } &>h1+h2, &>h2+h3, &>h3+h4, &>h4+h5, &>h5+h6, &>p, &>table { margin-top: @content-margin-top; } &>h1, &>h2, &>h3, &>h4, &>h5, &>h6 { display: flex; align-items: center; justify-content: space-between; } a:not(.external) { .link-content-text(@color-link-active); &.new { background-image: linear-gradient(to right, @color-link-new-active 0, @color-link-new-active 100%); } /* Doesn't work for some reason &:visited { background-image: linear-gradient(to right, @color-link-visited 0, @color-link-visited 100%)!important; } */ } .mw-editsection { position: absolute; display: flex; margin: 0; left: 0; transform: ~'translateX(calc(-100% - @{margin-side}))'; a { .resource-loader-icon-link-small; padding: @margin-side / 4; opacity: @opacity-icon; transition: @transition-opacity; text-indent: -9999px; // Hide text background: 0!important; // Cancel above styles &:before { .resource-loader-icon; background-size: contain; display: block; } &:hover, &:active, &:focus { opacity: @opacity-icon-active; } } > span { display: none; } } .toc { position: fixed; max-width: 450px; height: ~'calc( 100vh - @{header-height} * 2 - @{margin-side} * 4 )'; top: @header-height; right: 0; padding: @margin-side * 2 @margin-side; color: #cccccc; overflow: auto; &::-webkit-scrollbar { width: 0; // Hide bar on toc } @top: linear-gradient(white, rgba(255, 255, 255, 0.001)); @bottom: linear-gradient(rgba(255, 255, 255, 0.001), white); &:before { top: @header-height; .gradient-overflow(@top); } &:after { bottom: @header-height; .gradient-overflow(@bottom); } .toctitle { h2 { color: @base-50; font-size: @ui-menu-text-big; } } .toctoggle { display: none; } .toctext { max-width: 250px; display: flex; } a { display: inline-block; margin-top: @content-margin-top; color: @base-50; background: 0; &:hover { color: @base-30!important; } } &level { &-1 { font-size: @content-h2-size * @toc-scaling; } &-2 { font-size: @content-h3-size * @toc-scaling; } &-3 { font-size: @content-h4-size * @toc-scaling; } &-4 { font-size: @content-h5-size * @toc-scaling; } &-5 { font-size: @content-h6-size * @toc-scaling; } } .tocnumber { .mixin-screen-reader-text; } &.tochidden { > ul { display: block!important; // Force display } } > ul { direction: rtl; // Hack to force right alignment, need to fix for RTL margin: @content-margin-top / 2 3px 0 0; position: relative; z-index: 2; border-right: 1px dashed; display: block; > li { margin-right: -3px; } } ul { list-style-type: disc; list-style-position: inside; } ul, .toctitle { text-align: right; } } } } p { line-height: inherit; } h2 { font-size: @content-h2-size; } h3 { font-size: @content-h3-size; } h4 { font-size: @content-h4-size; } h5 { font-size: @content-h5-size; } h6 { font-size: @content-h6-size; } table { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; color: @color-content-header; font-weight: 400; } h5, h6 { font-weight: 600; } ul { margin: 0.8rem 0 0 1.6rem; } } // Namespace button #p-namespaces { &-label { .mixin-screen-reader-text; } ul{ margin: 1.6rem 0 0 0; display: flex; li { list-style: none; a { display: flex; align-items: center; padding: 0.4rem 0.8rem; border: 1px solid @base-80; background-color: @base-90; transition: @transition-background; &:hover { background-color: @base-80; } span { color: @base-20; } &:after { order: -1; content: ""; position: relative; width: 14px; height: 14px; margin-right: 8px; background-size: contain; background-repeat: no-repeat; background-position: center; opacity: 0.5; } } } } } // TODO: Flexible value @media only screen and (max-width: 1250px) { .mw-editsection { position: relative!important; transform: none!important; } } @media only screen and (max-width: 1450px) { .webfonts-changed .toc { display: block!important; // Hide until everything is loaded } .mw-body-content #mw-content-text .mw-parser-output .toc { display: none; background: @base-100; z-index: 1; height: 100vh; margin-top: -@header-height; padding: 0; box-shadow: @shadow-button; &:before, &:after { content: unset; // Disable fade } .toctoggle { display: block; font-size: 0; a { position: fixed; z-index: 7; right: 0; bottom: 0; margin: @margin-side; padding: 0 @margin-side / 2; width: 39px; height: 56px; display: block; background-color: @base-90; border-radius: 100%; box-shadow: @shadow-button; transform: translate(0px, @header-height + @margin-side); transition: @transition-opacity, @transition-transform; &:hover { &:before { opacity: @opacity-icon-active; } } &:before { .resource-loader-icon; display: block; opacity: @opacity-icon; } } } .toctitle h2 { display: none; } &.tochidden { > ul { display: none!important; // Reset hide transform: translateX(300px + @margin-side); } } > ul { margin: 0 @margin-side; padding: @header-height + @margin-side 0 @header-height + @margin-side * 2; // More scroll spaces transform: none; transition: @transition-transform; } } .nav-up { ~ .mw-body .mw-body-content #mw-content-text .mw-parser-output .toc .toctoggle a { transform: none; } } } /* // Logged in styles .not-logged { .mw-editsection { display: none!important; // Hide edit icons when not logged in } } */