Template:Insert quote panel/styles.css: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 30: | Line 30: | ||
flex: 1; |
flex: 1; |
||
min-width: 0; |
min-width: 0; |
||
width: 100%; |
width: 100%; |
||
} |
} |
||
| Line 43: | Line 43: | ||
/* --- 5. SCENARIO: WITH IMAGE (Transparent, Clean) --- */ |
/* --- 5. SCENARIO: WITH IMAGE (Transparent, Clean) --- */ |
||
.insert-quote-panel.has-image { |
.insert-quote-panel.has-image { |
||
gap: 15px; /* This is the ONLY space between face and text now */ |
|||
gap: 15px; |
|||
} |
} |
||
.insert-quote-panel.has-image .insert-quote-content { |
.insert-quote-panel.has-image .insert-quote-content { |
||
background: transparent !important; |
background: transparent !important; |
||
border: none !important; |
border: none !important; |
||
padding: 0 !important; |
padding: 0 !important; |
||
margin: 0 !important; |
margin: 0 !important; |
||
color: #202122; |
color: #202122; |
||
| Line 55: | Line 55: | ||
/* ================================================================= |
/* ================================================================= |
||
THE FIXES |
|||
THE RESET: HIDE BORDERS BUT KEEP STRUCTURE (INDENTATION) |
|||
================================================================= */ |
================================================================= */ |
||
/* 1. |
/* 1. RESET BLOCKQUOTE (Fixes "Text too far from image") */ |
||
.insert-quote-content .quotebox, |
|||
.insert-quote-content blockquote { |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
box-sizing: border-box; |
|||
| ⚫ | |||
/* 2. When an image is present: |
|||
- Hide the inner gray background/borders of the {{Quote}} |
|||
- BUT DO NOT remove padding/margins. This preserves the indent. */ |
|||
.insert-quote-panel.has-image .insert-quote-content .quotebox, |
.insert-quote-panel.has-image .insert-quote-content .quotebox, |
||
.insert-quote-panel.has-image .insert-quote-content blockquote { |
.insert-quote-panel.has-image .insert-quote-content blockquote { |
||
background: transparent !important; |
background: transparent !important; |
||
border: none !important; |
border: none !important; /* Removes gray bar */ |
||
box-shadow: none !important; |
box-shadow: none !important; |
||
| ⚫ | |||
/* KEY FIX: Overrides Common.css "padding: 0 40px" */ |
|||
padding: 0 !important; |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
} |
} |
||
/* |
/* 2. ALIGNMENT FIX: Ensure text starts at the very top */ |
||
.insert-quote-panel.has-image .insert-quote-content > .quotebox > *:first-child, |
.insert-quote-panel.has-image .insert-quote-content > .quotebox > *:first-child, |
||
.insert-quote-panel.has-image .insert-quote-content > *:first-child { |
.insert-quote-panel.has-image .insert-quote-content > *:first-child { |
||
| Line 85: | Line 80: | ||
} |
} |
||
/* 3. AUTHOR SPACING FIX (Vertical gap only) */ |
|||
/* (Deleted the aggressive "Author Fix" block completely. |
|||
/* We target the container of the author to add space above it */ |
|||
This allows MediaWiki's default .templatequote-cite padding to take over.) */ |
|||
.insert-quote-panel.has-image .insert-quote-content .templatequotecite, |
|||
.insert-quote-panel.has-image .insert-quote-content cite, |
|||
.insert-quote-panel.has-image .insert-quote-content small { |
|||
display: block !important; /* Ensures margin works */ |
|||
margin-top: 1.5em !important; /* Adds the space between text and author */ |
|||
| ⚫ | |||
| ⚫ | |||
Revision as of 22:12, 16 December 2025
/* Template:Insert quote panel/styles.css */
/* --- 1. MAIN CONTAINER --- */
.insert-quote-panel {
clear: both;
width: 100%;
box-sizing: border-box;
margin: 0 0 2em 0;
display: flex;
flex-direction: row;
align-items: flex-start;
}
/* --- 2. IMAGE STYLING --- */
.insert-quote-image {
flex: 0 0 auto;
line-height: 0;
margin-top: 0;
}
.insert-quote-image img {
border-radius: 50%;
border: 1px solid #ffffff;
width: 50px;
height: 50px;
object-fit: cover;
}
/* --- 3. CONTENT WRAPPER --- */
.insert-quote-content {
flex: 1;
min-width: 0;
width: 100%;
}
/* --- 4. SCENARIO: NO IMAGE (Original Gray Box) --- */
.insert-quote-panel.no-image .insert-quote-content {
background: #F8F9FA;
border: 0 solid #9CA4AC;
padding: .5em;
color: #202122;
}
/* --- 5. SCENARIO: WITH IMAGE (Transparent, Clean) --- */
.insert-quote-panel.has-image {
gap: 15px; /* This is the ONLY space between face and text now */
}
.insert-quote-panel.has-image .insert-quote-content {
background: transparent !important;
border: none !important;
padding: 0 !important;
margin: 0 !important;
color: #202122;
}
/* =================================================================
THE FIXES
================================================================= */
/* 1. RESET BLOCKQUOTE (Fixes "Text too far from image") */
.insert-quote-panel.has-image .insert-quote-content .quotebox,
.insert-quote-panel.has-image .insert-quote-content blockquote {
background: transparent !important;
border: none !important; /* Removes gray bar */
box-shadow: none !important;
/* KEY FIX: Overrides Common.css "padding: 0 40px" */
padding: 0 !important;
margin: 0 !important;
width: 100% !important;
max-width: 100% !important;
}
/* 2. ALIGNMENT FIX: Ensure text starts at the very top */
.insert-quote-panel.has-image .insert-quote-content > .quotebox > *:first-child,
.insert-quote-panel.has-image .insert-quote-content > *:first-child {
margin-top: 0 !important;
padding-top: 0 !important;
}
/* 3. AUTHOR SPACING FIX (Vertical gap only) */
/* We target the container of the author to add space above it */
.insert-quote-panel.has-image .insert-quote-content .templatequotecite,
.insert-quote-panel.has-image .insert-quote-content cite,
.insert-quote-panel.has-image .insert-quote-content small {
display: block !important; /* Ensures margin works */
margin-top: 1.5em !important; /* Adds the space between text and author */
/* We DO NOT touch padding-left here, so default indent remains */
}