Jump to content

MediaWiki:Common.css: Difference between revisions

From English Mippedia, general encyclopedia
Tags: Mobile edit Mobile web edit
 
No edit summary
Tags: Mobile edit Mobile web edit
 
(34 intermediate revisions by the same user not shown)
Line 84: Line 84:


/* === Hilangkan judul "Halaman Utama" di tampilan MobileFrontend === */
/* === Hilangkan judul "Halaman Utama" di tampilan MobileFrontend === */
.page-Halaman_Utama #section_0,
.page-Main_Page #section_0,
.page-Halaman_Utama .content-header,
.page-Main_Page .content-header,
.page-Halaman_Utama h1.firstHeading,
.page-Main_Page h1.firstHeading,
.page-Halaman_Utama #firstHeading {
.page-Main_Page #firstHeading {
     display: none !important;
     display: none !important;
}
}


/* Opsional: rapikan jarak setelah header hilang */
/* Opsional: rapikan jarak setelah header hilang */
.page-Halaman_Utama .content {
.page-Main_Page .content {
     margin-top: 0 !important;
     margin-top: 0 !important;
     padding-top: 0.5em !important;
     padding-top: 0.5em !important;
}
}


/* ====== INFOBOX STYLE ====== */
@media screen {
 
.infobox {
.infobox {
background-color: var(--background-color-neutral-subtle, #f8f9fa);
    border: 1px solid #a2a9b1;
}
    border-collapse: collapse;
    background-color: #f8f9fa;
    color: #000;
    margin: 1em 0 1em 1em;
    padding: 0;
    width: 100%;
    max-width: 330px; /* biar mobile rapi */
    float: right;
    clear: right;
    font-size: 65%;/* ukuran HP */
}
}


/* HEADER ATAS (TITLE) */
@media (max-width: 640px) {
/* Warna biru muda + teks rata tengah */
.infobox {
.infobox-title, .infobox .infobox-above {
width: 100%;
    background: #cedff2;
}
     text-align: center;
      
    font-size: 120%;
.infobox .nowrap {
    font-weight: bold;
white-space: normal;
    padding: 8px;
}
    border-bottom: 1px solid #a2a9b1;
}
}


/* ====== GARIS SETIAP BARIS ====== */
@media (min-width: 640px) {
.infobox td, .infobox th {
.infobox {
    border-top: 1px solid #a2a9b1 !important;
/* @noflip */
    padding: 6px;
margin-left: 1em;
/* @noflip */
float: right;
/* @noflip */
clear: right;
width: 22em;
}
}
}


/* LABEL KIRI */
.infobox-header,
.infobox-label {
.infobox-label,
    font-weight: bold;
.infobox-above,
    width: 40%;
.infobox-full-data,
    vertical-align: top;
.infobox-data,
.infobox-below,
.infobox-subheader,
.infobox-image,
.infobox-navbar,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox th,
.infobox td {
vertical-align: top;
}
}


/* Data infobox rata tengah */
.infobox-label,
.infobox-label {
.infobox-data,
    text-align: center !important;
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox th,
.infobox td {
/* @noflip */
text-align: center;
}
}


/* DATA KANAN */
/* Remove .infobox when element selectors above are removed */
.infobox-data {
.infobox .infobox-above,
    width: 50%;
.infobox .infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox caption {
font-size: 125%;
font-weight: bold;
text-align: center;
}
}


/* Data infobox rata tengah */
.infobox-title,
.infobox-data {
/* Remove element selector when every .infobox thing is using the standard module/templates  */
    text-align: center !important;
.infobox caption {
padding: 0.2em;
}
}


/* BAGIAN HEADING DALAM (seperti “Informasi latar belakang”) */
/* Remove .infobox when element selectors above are removed */
.infobox-header, .infobox-subheader {
.infobox .infobox-header,
    background: #e2e6ea;
.infobox .infobox-subheader,
    font-weight: bold;
.infobox .infobox-image,
    text-align: center;
.infobox .infobox-full-data,
    padding: 6px;
.infobox .infobox-below {
    border-top: 1px solid #a2a9b1;
text-align: center;
    border-bottom: 1px solid #a2a9b1;
}
}


/* GAMBAR */
/* Remove .infobox when element selectors above are removed */
.infobox img {
.infobox .infobox-navbar {
    width: 100%;
/* @noflip */
    height: auto;
text-align: right;
    display: block;
}
}


/* MOBILE FIX */
/* ==========================================================
@media screen and (max-width: 600px) {
  ➕ HANYA MENAMBAHKAN DI BAWAH INI (Sesuai Perintah)
    .infobox {
  ========================================================== */
        float: none;
        margin: 0 auto 1em;
        width: 100%;
    }
}


/* ============================================
/* 1. Menambahkan garis bawah halus abu-abu di setiap baris data */
  FIX #1 — HEADER BIRU TIDAK RATA TENGAH
.infobox th,
  ============================================ */
.infobox td,
.infobox-title,  
.infobox-label,
.infobox .infobox-above {
.infobox-data,
    text-align: center !important; /* paksa center */
.infobox-header,
    font-size: 100% !important;   /* biar besar seperti Wikipedia mobile */
.infobox-subheader {
border-bottom: 1px solid #eaecf0;
padding: 6px 4px; /* Memberikan space halus agar tidak kaku */
}
}


/* ============================================
/* 2. Mengatur ukuran huruf caption foto agak kecil dan TETAP TEGAK (tidak miring) */
  FIX #2 — INFOBOX TERLALU KECIL DI HP
.infobox .infobox-image,
  BIKIN LEBARNYA 100% SEPERTI DI WIKIPEDIA MOBILE
.infobox tr:has(img) + tr td {
  ============================================ */
font-size: 88% !important;
@media screen and (max-width: 600px) {
font-style: normal !important;
    .infobox {
color: #54595d;
        width: 100% !important;      /* full width */
        max-width: 100% !important;  /* hilangin batas 330px */
        margin: 0 auto 1em !important;
        float: none !important;      /* biar tidak mengecil ke kanan */
        font-size: 100% !important; /* otomatis sesuai layar */
    }
 
    /* gambar jangan mepet kiri-kanan */
    .infobox img {
        width: 100% !important;
        height: auto !important;
    }
}
}


/* ============================================
#siteSub {
  FIX #3 — JARAK ANTAR BORDER TERLALU BESAR
display: block;
  ============================================ */
}
.infobox td, .infobox th {
    padding: 8px 10px !important;
}

Latest revision as of 09:33, 30 May 2026

/* --- FIX UKURAN DAN SKALA LOGO (UNTUK SEMUA SKIN) --- */

/* Menargetkan elemen wadah logo */
#p-logo {
    /* Memaksa elemen wadah memiliki ukuran standar */
    width: 135px;
    height: 135px;
}

/* Menargetkan elemen link di dalam wadah logo */
#p-logo a, .mw-wiki-logo {
    /* Memaksa ukuran area gambar agar sesuai */
    width: 135px !important;
    height: 135px !important;
    
    /* Memastikan gambar diskala (terutama untuk SVG) */
    background-size: contain !important;
    
    /* Memastikan gambar berada di tengah dan tidak berulang */
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* ---------- CAPTCHA STYLING ---------- */
.captcha-code {
  display: inline-block;
  padding: 10px 16px;
  font-size: 1.8em;
  font-weight: 700;
  font-family: monospace;
  border-radius: 10px;
  letter-spacing: 4px;
  user-select: none;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  margin: 10px auto;
  text-align: center;
  animation: fadeIn 0.4s ease-in-out;
}

/* Bikin background captcha punya warna acak */
.captcha-code {
  background: linear-gradient(135deg, #f8f8f8, #e8e8e8);
  border: 1px solid #bbb;
  color: #2c3e50;
}

/* Variasi warna random */
.captcha-code:nth-child(3n) {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-color: #90caf9;
  color: #0d47a1;
}
.captcha-code:nth-child(3n+1) {
  background: linear-gradient(135deg, #f1f8e9, #dcedc8);
  border-color: #aed581;
  color: #33691e;
}
.captcha-code:nth-child(3n+2) {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border-color: #ffb74d;
  color: #e65100;
}

/* Label agar center di HP */
.mw-confirmedit-captcha label {
  display: block;
  text-align: center;
  margin: 12px 0;
  font-size: 1em;
  font-weight: 500;
  color: #444;
}

/* Responsif untuk seluler */
@media (max-width: 720px) {
  .captcha-code { font-size: 2.2em; padding: 12px 18px; }
}

/* Animasi halus saat muncul */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* === Hilangkan judul "Halaman Utama" di tampilan MobileFrontend === */
.page-Main_Page #section_0,
.page-Main_Page .content-header,
.page-Main_Page h1.firstHeading,
.page-Main_Page #firstHeading {
    display: none !important;
}

/* Opsional: rapikan jarak setelah header hilang */
.page-Main_Page .content {
    margin-top: 0 !important;
    padding-top: 0.5em !important;
}

@media screen {
	.infobox {
		background-color: var(--background-color-neutral-subtle, #f8f9fa);
	}
}

@media (max-width: 640px) {
	.infobox {
		width: 100%;
	}
    
	.infobox .nowrap {
		white-space: normal;
	}
}

@media (min-width: 640px) {
	.infobox {
		/* @noflip */
		margin-left: 1em;
		/* @noflip */
		float: right;
		/* @noflip */
		clear: right;
		width: 22em;
	}
}

.infobox-header,
.infobox-label,
.infobox-above,
.infobox-full-data,
.infobox-data,
.infobox-below,
.infobox-subheader,
.infobox-image,
.infobox-navbar,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox th,
.infobox td {
	vertical-align: top;
}

.infobox-label,
.infobox-data,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox th,
.infobox td {
	/* @noflip */
	text-align: center;
}

/* Remove .infobox when element selectors above are removed */
.infobox .infobox-above,
.infobox .infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox caption {
	font-size: 125%;
	font-weight: bold;
	text-align: center;
}

.infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox caption {
	padding: 0.2em;
}

/* Remove .infobox when element selectors above are removed */
.infobox .infobox-header,
.infobox .infobox-subheader,
.infobox .infobox-image,
.infobox .infobox-full-data,
.infobox .infobox-below {
	text-align: center;
}

/* Remove .infobox when element selectors above are removed */
.infobox .infobox-navbar {
	/* @noflip */
	text-align: right;
}

/* ==========================================================
   ➕ HANYA MENAMBAHKAN DI BAWAH INI (Sesuai Perintah)
   ========================================================== */

/* 1. Menambahkan garis bawah halus abu-abu di setiap baris data */
.infobox th, 
.infobox td,
.infobox-label,
.infobox-data,
.infobox-header,
.infobox-subheader {
	border-bottom: 1px solid #eaecf0;
	padding: 6px 4px; /* Memberikan space halus agar tidak kaku */
}

/* 2. Mengatur ukuran huruf caption foto agak kecil dan TETAP TEGAK (tidak miring) */
.infobox .infobox-image,
.infobox tr:has(img) + tr td {
	font-size: 88% !important;
	font-style: normal !important;
	color: #54595d;
}

#siteSub {
		display: block;
	}