|
|
Zeile 1: |
Zeile 1: |
| /** | | /* |
| You are editing the global css file for all mobile site users.
| | * Das folgende CSS wird für alle Nutzer der Mobilen Version geladen. |
| With Great Power Comes Great Responsibility.
| | * Die [[MediaWiki:Common.css]] steht in der Mobilen Version nicht zur |
| | * Verfügung, weshalb sich einiges von dort hier wiederholt. |
| | * Sofern sinnvoll, sollten aber eigene Definitionen genutzt werden. |
| | * Derzeit (Mai 2016) wird diese Datei aus Performancegründen erst am Seitenende |
| | * geladen. Deshalb führen Definitionen, die die Dimensionen oder Positionen von |
| | * Boxen betreffen, zu einem „flash of unstyled content“, vgl. [[phab:T126137]]. |
| | * Es ist vorgesehen, dieses Problem durch „echtes“ CSS in Vorlagen zu lösen, |
| | * vgl. [[phab:T483]]. |
| | */ |
|
| |
|
| Some words of caution:
| | /* Klassen für die Ausrichtung von Bausteinen, Tabellen, ... */ |
| * Avoid any changes which impact layout on a mobile device.
| |
| ** Please be careful not to introduce any margin / padding rules. These should be done inside the template itself via an inline style.
| |
| ** Be especially cautious when a template is likely to be used within the top 480px of the screen (the content that the user will see first on a mobile device). | |
| * Do not use display:none. Instead edit the template and markup the element you want to hide with the `nomobile` class.
| |
| * Try to keep rules as generic and minimal as possible. Do not have 2 selectors doing the same thing. Introduce a common class and use that instead. | |
| * For big changes consult the [https://grafana.wikimedia.org/dashboard/db/mobile-2g grafana dashboard] to ensure you don't introduce any performance regressions.
| |
| * Group common css rules together where possible.
| |
|
| |
|
| If you are looking for .mobile-float-reset (see [[:phab:T56176]]), use TemplateStyles instead.
| | /* @noflip */ |
| .mobile-float-reset { | | div.float-left, |
| float: none !important; | | table.float-left, |
| width: 100% !important; | | ul.float-left, |
| } | | .float-left { |
| */ | | clear: left; |
| | | float: left; |
| /* Reset user agent styles. We don't reset small or blockquote here deliberately */
| | margin: 1em 1em 1em 0; |
| cite,
| | } |
| dfn {
| | /* @noflip */ |
| font-style: inherit; | | div.float-right, |
| | table.float-right, |
| | ul.float-right, |
| | .float-right { |
| | clear: right; |
| | float: right; |
| | margin: 1em 0 1em 1em; |
| } | | } |
| | | div.centered, |
| q {
| | table.centered, |
| quotes: '"' '"' "'" "'"; | | ul.centered, |
| | .centered { |
| | margin-left: auto; |
| | margin-right: auto; |
| } | | } |
|
| |
|
| /* Hide the images */ | | /* Obenbündige Textausrichtung in Tabellen */ |
| .geo-nondefault, .geo-multi-punct,
| | .toptextcells > * > * > td { |
| /* Hide stuff meant for accounts with special permissions. Made visible again in
| | vertical-align: top; |
| [[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-patroller.css]] and
| |
| [[MediaWiki:Group-autoconfirmed.css]]. */
| |
| .checkuser-show,
| |
| .sysop-show,
| |
| .templateeditor-show,
| |
| .extendedmover-show,
| |
| .patroller-show,
| |
| .extendedconfirmed-show,
| |
| .autoconfirmed-show,
| |
| /* Copied from Common.css - allow for hiding text in compact form e.g. clean up templates */
| |
| .hide-when-compact, | |
| /* portal pages are badly formatted. Until this changes these should be hidden. (see https://phabricator.wikimedia.org/T86495) */
| |
| .noprint.portal {
| |
| display: none; | |
| } | | } |
|
| |
|
| /* | | /* Farbdefinitionen für Rahmen und Hintergründe von Textbausteinen */ |
| .infobox
| |
| DO NOT style infobox's here. That should be taken care of in the associated templates via template styles. Styles here will lead to flash of unstyled content on mobile.
| |
| */ | |
| /* removed inline from module as we work toward Tstyles support
| |
| * Use three classes to match specificity of MobileFrontend/Minerva selectors */
| |
| .content .mw-parser-output .infobox-header,
| |
| .content .mw-parser-output .infobox-subheader,
| |
| .content .mw-parser-output .infobox-above,
| |
| .content .mw-parser-output .infobox-title,
| |
| .content .mw-parser-output .infobox-image,
| |
| .content .mw-parser-output .infobox-full-data,
| |
| .content .mw-parser-output .infobox-below {
| |
| text-align: center;
| |
| }
| |
|
| |
|
| /* Unbulleted lists e.g. Barack Obama page*/ | | /* Wie Inhaltsverzeichnis (mediawiki.skinning/content.css) */ |
| .plainlist ul { | | .rahmenfarbe1 { |
| list-style: none; | | border: 1px #a2a9b1; |
| padding-left: 0; /* Reset Minerva defaults */
| |
| } | | } |
| | | /* Unauffällig, geringer Kontrast */ |
| /* Prevent line breaks in silly places: | | .rahmenfarbe2 { |
| 1) Where desired
| | border: 1px #eaecf0; |
| 2) Links when we don't want them to
| |
| */ | |
| .mw-parser-output .nowrap, | |
| .nowraplinks a {
| |
| white-space: nowrap; | |
| } | | } |
| .mw-parser-output .infobox .nowrap { | | /* „Rot“, auffällig */ |
| white-space: normal !important; | | .rahmenfarbe3 { |
| | border: 1px #c00000; |
| } | | } |
| /* But allow wrapping where desired: */ | | /* Neutrale Farbe, deutlich */ |
| .wrap, | | .rahmenfarbe4 { |
| .wraplinks a {
| | border: 1px #88a; |
| white-space: normal; | |
| } | | } |
| | | /* „Schwarz“, hoher Kontrast */ |
| /* Generic class texhtml class for inline math */ | | .rahmenfarbe5 { |
| span.texhtml {
| | border: 1px #000; |
| font-family: serif; | |
| white-space: nowrap;
| |
| } | | } |
|
| |
|
| /* Prevent flags in tables from collapsing | | /* Wie Inhaltsverzeichnis (mediawiki.skinning/content.css) */ |
| Fix for T116318
| | table > * > tr.hintergrundfarbe1 > th, |
| */ | | table > * > tr > th.hintergrundfarbe1, |
| .flagicon img { | | table.hintergrundfarbe1, |
| min-width: 25px; | | .hintergrundfarbe1 { |
| | background-color: #f8f9fa; |
| } | | } |
| | | /* „Weiß“, für Nicht-Artikel-Seiten, neutral */ |
| /* Prevent unnecessary margin at the bottom of centralnotices */ | | table > * > tr.hintergrundfarbe2 > th, |
| .cnotice { | | table > * > tr > th.hintergrundfarbe2, |
| margin-bottom: 0 !important; | | table.hintergrundfarbe2, |
| | .hintergrundfarbe2 { |
| | background-color: #fff; |
| } | | } |
| | | /* „Gelb“, auffällig */ |
| /* Normal font styling for wikitable row headers with scope="row" tag */ | | table > * > tr.hintergrundfarbe3 > th, |
| .wikitable.plainrowheaders th[scope=row], | | table > * > tr > th.hintergrundfarbe3, |
| .wikitable.plainrowheaders th[scope=rowgroup] { | | table.hintergrundfarbe3, |
| font-weight: normal; | | .hintergrundfarbe3 { |
| /* @noflip */
| | background-color: #ffff40; |
| text-align: left;
| |
| } | | } |
| | | /* Sehr auffällig */ |
| | | table > * > tr.hintergrundfarbe4 > th, |
| /** | | table > * > tr > th.hintergrundfarbe4, |
| ******************DEPRECATED STYLES ************************************ | | table.hintergrundfarbe4, |
| These styles will be removed shortly. Please see inline comments.
| | .hintergrundfarbe4 { |
| **/ | | background-color: #fa0; |
| | |
| | |
| /*
| |
| FIXME: DUPLICATES Template:Hlist/styles.css
| |
| Note the mobile skin provides a `hlist-separated` class for this purpose. Use this class name alongside the hlist class instead as this will result in a FOUC.
| |
| Should be removed and moved to templates.
| |
| */
| |
| /* Counter hlist indenting of Minerva*/
| |
| .mw-parser-output .hlist ul, | |
| .mw-parser-output .hlist ol { | |
| padding-left: 0; | |
| } | | } |
| /* reset hlist margins of Minerva | | /* Neutral, abgesetzt */ |
| do not add li here (see T235416) */
| | table > * > tr.hintergrundfarbe5 > th, |
| .mw-parser-output .hlist dd, | | table > * > tr > th.hintergrundfarbe5, |
| .mw-parser-output .hlist dt { | | table.hintergrundfarbe5, |
| margin-right: 0; | | .hintergrundfarbe5 { |
| | background-color: #eaecf0; |
| } | | } |
| /* do not add li here. Minerva provides it already*/ | | /* Allgemein „bunt“, für Hervorhebungen und Unterscheidungen */ |
| .mw-parser-output .hlist dd:after { | | table > * > tr.hintergrundfarbe6 > th, |
| content: " · "; | | table > * > tr > th.hintergrundfarbe6, |
| font-weight: bold;
| | table.hintergrundfarbe6, |
| | .hintergrundfarbe6 { |
| | background-color: #b3b7ff; |
| } | | } |
| .mw-parser-output .hlist dt:after { | | /* Allgemein „bunt“, für Hervorhebungen und Unterscheidungen */ |
| content: ": "; | | table > * > tr.hintergrundfarbe7 > th, |
| | table > * > tr > th.hintergrundfarbe7, |
| | table.hintergrundfarbe7, |
| | .hintergrundfarbe7 { |
| | background-color: #ffcbcb; |
| } | | } |
| | | /* Allgemein „bunt“, für Hervorhebungen und Unterscheidungen */ |
| /* Should be removed and moved to templates once TemplateStyles is live */ | | table > * > tr.hintergrundfarbe8 > th, |
| .heading-holder .hlist li:after, | | table > * > tr > th.hintergrundfarbe8, |
| .mw-parser-output .hlist dd:last-child:after, | | table.hintergrundfarbe8, |
| .mw-parser-output .hlist dt:last-child:after, | | .hintergrundfarbe8 { |
| .mw-parser-output .hlist li:last-child:after { | | background-color: #ffebad; |
| content: none; | |
| } | | } |
| /* Add parentheses around nested lists */ | | /* Allgemein „bunt“, für Hervorhebungen und Unterscheidungen */ |
| /* Should be removed and moved to templates once TemplateStyles is live */
| | table > * > tr.hintergrundfarbe9 > th, |
| .mw-parser-output .hlist dd dd:first-child:before, | | table > * > tr > th.hintergrundfarbe9, |
| .mw-parser-output .hlist dd dt:first-child:before,
| | table.hintergrundfarbe9, |
| .mw-parser-output .hlist dd li:first-child:before,
| | .hintergrundfarbe9 { |
| .mw-parser-output .hlist dt dd:first-child:before,
| | background-color: #b9ffc5; |
| .mw-parser-output .hlist dt dt:first-child:before, | |
| .mw-parser-output .hlist dt li:first-child:before, | |
| .mw-parser-output .hlist li dd:first-child:before, | |
| .mw-parser-output .hlist li dt:first-child:before,
| |
| .mw-parser-output .hlist li li:first-child:before {
| |
| content: " ("; | |
| font-weight: normal;
| |
| } | | } |
| /* Should be removed and moved to templates once TemplateStyles is live */ | | |
| .mw-parser-output .hlist dd dd:last-child:after,
| | /* Gestaltung der Flagged-Revisions-Backlog-Sitenotice */ |
| .mw-parser-output .hlist dd dt:last-child:after, | | .fr-watchlist-pending-notice { |
| .mw-parser-output .hlist dd li:last-child:after,
| | background: transparent; |
| .mw-parser-output .hlist dt dd:last-child:after,
| | border: none; |
| .mw-parser-output .hlist dt dt:last-child:after,
| | margin: 0; |
| .mw-parser-output .hlist dt li:last-child:after,
| | padding: 0; |
| .mw-parser-output .hlist li dd:last-child:after,
| |
| .mw-parser-output .hlist li dt:last-child:after,
| |
| .mw-parser-output .hlist li li:last-child:after {
| |
| content: ") " !important; /* Override hlist-separated being dumb */ | |
| font-weight: normal; | |
| padding-left: 0; | |
| } | | } |
|
| |
|
| /* Put ordinals in front of ordered list items */ | | /* Standardmäßige Ausblendung der Flagged-Revisions-Kommentarbox */ |
| /* Should be removed and moved to templates once TemplateStyles is live */
| | .fr-comment-box { |
| .mw-parser-output .hlist ol { | | display: none; |
| counter-reset: listitem; | |
| } | | } |
|
| |
|
| /* Should be removed and moved to templates once TemplateStyles is live */ | | /* Metadaten, bspw. [[Hilfe:Personendaten|Personendaten]] */ |
| .mw-parser-output .hlist ol > li { | | .metadata { |
| counter-increment: listitem; | | display: none; |
| } | | } |
|
| |
|
| /* Should be removed and moved to templates once TemplateStyles is live */ | | /* Skinabhängige absolute Positionierungen ausblenden */ |
| .mw-parser-output .hlist ol > li:before { | | #mw-content-text #coordinates, |
| content: " " counter(listitem) " "; | | #mw-content-text #editcount, |
| white-space: nowrap;
| | #mw-content-text #shortcut, |
| | body.mw-mf-special #mw-content-text .specialpage-helplink { |
| | display: none; |
| } | | } |
|
| |
|
| /* Should be removed and moved to templates once TemplateStyles is live */ | | /* Normdaten im Kasten anzeigen, zur besseren optischen Trennung */ |
| .mw-parser-output .hlist dd ol > li:first-child:before,
| | #normdaten { |
| .mw-parser-output .hlist dt ol > li:first-child:before, | | border: 1px black solid; |
| .mw-parser-output .hlist li ol > li:first-child:before { | | padding: 1em; |
| content: " (" counter(listitem) " ";
| | margin-top: 0.5em; |
| | } |
| | /* Navileisten im Kasten anzeigen, zur besseren optischen Trennung */ |
| | .NavFrame { |
| | border: 1px black solid; |
| | padding: 1em; |
| | margin-top: 0.5em; |
| | } |
| | .read-more-container { |
| | display: none; |
| } | | } |
|
| |
|
| /* https://phabricator.wikimedia.org/T180396#5317728 */ | | /* phab:T270872 workaround */ |
| | span.subpages { |
| | display: block; |
| | } |
|
| |
|
| @media print {
| | /* Ausblendung des Links zur Markierung kontrollierter Versionen (patrolled) */ |
| .navbox,
| | .patrollink { |
| .hatnote, | | display: none; |
| .ambox {
| |
| display: none !important;
| |
| }
| |
| } | | } |