/* * Hacks * TODO: Find a place to put them */ // Hide RSS icon a.feedlink { background: none !important; } // CSS checkbox hack .mw-checkbox-hack { width: @icon-box-size + @margin-side + @icon-padding; height: @header-height; position: absolute; z-index: 8; margin: 0; display: block; opacity: 0; cursor: pointer; -webkit-touch-callout: none; } /* * Framework */ html { scroll-padding-top: @header-height + @margin-side; // fixed header offset, supported by major browsers scroll-behavior: smooth; // not supported by IE, Edge, Safari, and Opera, use JQuery as fallback } html, body { min-height: 100%; overflow-x: hidden; // prevent overflow from scrollbar margin: 0; padding: 0; background: @base-100; color: @color-content-text; } table { display: block; max-width: 100vw; overflow: auto; } hr { display: none; } ul { list-style-type: square; } ul, ol { padding: 0; } p, ul, ol, dl { margin: @content-margin-top 0 0 0; } 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; } fieldset { border: 1px solid @base-80; color: @base-30; margin: @content-margin-top 0; padding: @content-margin-top / 2 @margin-side; } fieldset > table { margin-top: 0 !important; } legend { color: @base-20; margin: 0; padding: 4px; } textarea { width: 100%; } blockquote { margin: @content-margin-top * 2 * @content-scaling; padding: 0 @content-margin-top * 4 * @content-scaling; color: @base-30; cite { display: block; margin-top: @content-margin-top * @content-scaling; &:before { content: '— '; } } } dd { margin-left: @content-margin-top * 2; margin-bottom: 0.1rem; } td { > p, > ul, > ol { &:first-child { margin-top: 0; // Remove margin for the first element in td } } } 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; } } &.mw-selflink { color: inherit; font-weight: bold; text-decoration: inherit; &:hover { cursor: inherit; text-decoration: inherit; } &:active { color: inherit; } } } .error { padding: 2px 4px; background-color: @red-90; } .nowrap { white-space: nowrap; } .screen-reader-text { //.mixin-screen-reader-text; display: block !important; position: absolute !important; clip: rect( 1px, 1px, 1px, 1px ) !important; width: 1px !important; height: 1px !important; margin: -1px !important; border: 0 !important; padding: 0 !important; overflow: hidden !important; } /* * Content */ .mw-body, .parsoid-body { margin-top: @header-height + @margin-side; padding: 0 @margin-side; min-height: 80vh; // avoid footer being in the middle of the page direction: ltr; } .mw-wiki-title { a& { color: @base-50; transition: @transition-opacity; &:hover, &:active, &:focus { color: @base-30; text-decoration: none; } } } figcaption, .thumbcaption { margin: @content-margin-top / 2 0 0; color: @base-30; } .mw-body { .firstHeading { margin: 0; color: @base-10; overflow-wrap: break-word; // Break word instead of overflow if title is too long } #siteSub { display: block; margin: 0.4rem 0 1.6rem; color: @base-30; } .mw-indicators { float: right; line-height: @content-line-height; /* 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; } } #contentSub, #contentSub2 { color: @base-30; } .mw-body-content { position: relative; .content-center; z-index: 0; #mw-content-text { .mw-parser-output { .mw-headline { order: -1; // Make sure that header is the first } & > h1, & > h2, & > h3, & > h4, & > h5, & > h6 { display: flex; align-items: center; justify-content: space-between; } .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; } } } } p { overflow-wrap: break-word; } table { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; color: @color-content-header; } 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; } ul { margin: @content-margin-top 0 0 @content-margin-top * 2; ul { margin: 0 0 0 @content-margin-top * 2; } } ol { margin: @content-margin-top 0 0 @content-margin-top * 3; ol { margin: 0 0 0 @content-margin-top * 3; } } img { vertical-align: middle; } .mw-references-wrap { margin: @content-margin-top 0 0 0; color: @base-30; &.mw-references-columns { margin: @content-margin-top @negative-margin 0 @negative-margin; } .references { margin: 0 @content-margin-top * 2; li { margin-bottom: @content-margin-top / 4; } } } .thumb { overflow: hidden; > .thumbinner { > a { transition: @transition-box-shadow-quick !important; &:hover:not( .lazy ):not( .new ) { background: 0 !important; .boxshadow(2); img { transform: scale( 1.1 ); } } &:before { content: none; } &.new { padding: @margin-side / 2; display: block; background-color: @base-80; transition: @transition-background-quick, @transition-color-quick !important; } } } } a.image { display: block; overflow: hidden; width: fit-content; // Get rid of extra pixels from thumbinner img { filter: none; transition: @transition-filter, @transition-transform-quick; &.lazy { display: block; background-color: @base-90; filter: blur( 8px ); overflow: hidden; } } } } // Namespace button #p-namespaces { position: relative; float: right; margin: 0 @negative-margin; padding: @margin-side; ul { margin: 1.6rem 0 0 0; display: flex; justify-content: flex-end; // Right align li { list-style: none; a { display: flex; align-items: center; padding: 0.4rem 0.8rem; border: 1px solid @base-80; color: @base-20; background-color: @base-90; transition: @transition-background-quick, @transition-box-shadow-quick; .boxshadow(1); &:hover { background-color: @base-80; .boxshadow(2); } &: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; } } } } } .plainlist ol, .plainlist ul { line-height: inherit; list-style: none none; margin: 0; } @media ( max-width: @screen1 ) { #p-namespaces { margin: 0 !important; // somehow got overrided padding: @margin-side 0; } } @media ( max-width: @screen2 ) { .mw-editsection { position: relative !important; transform: none !important; } #p-namespaces { margin: 0~'calc((100vw - @{page-width}) / -2)'; } .mw-body-content { .mw-references-wrap { &.mw-references-columns { margin: @content-margin-top 0 0 0; } } } }