Template:Insert quote panel/styles.css: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
.insert-quote-panel { |
.insert-quote-panel { |
||
clear: both; |
clear: both; |
||
width: 100%; |
width: 100%; /* Ensures the main wrapper takes full page width */ |
||
box-sizing: border-box; |
box-sizing: border-box; |
||
margin: 0 0 2em 0; |
margin: 0 0 2em 0; |
||
display: flex; |
display: flex; |
||
flex-direction: row; |
flex-direction: row; |
||
align-items: flex-start; |
align-items: flex-start; |
||
} |
} |
||
| Line 26: | Line 26: | ||
} |
} |
||
/* --- 3. |
/* --- 3. CONTENT WRAPPER (Shared) --- */ |
||
.insert-quote-content { |
|||
flex: 1; /* Grow to fill remaining space */ |
|||
min-width: 0; /* CSS fix for flex containers */ |
|||
width: 100%; /* Ensures content tries to be full width */ |
|||
} |
|||
/* --- 4. SCENARIO: NO IMAGE (Gray Box) --- */ |
|||
.insert-quote-panel.no-image .insert-quote-content { |
.insert-quote-panel.no-image .insert-quote-content { |
||
background: #F8F9FA; |
background: #F8F9FA; |
||
| Line 34: | Line 41: | ||
} |
} |
||
/* --- |
/* --- 5. SCENARIO: WITH IMAGE (Clean, Transparent) --- */ |
||
.insert-quote-panel.has-image { |
.insert-quote-panel.has-image { |
||
gap: 15px; |
gap: 15px; |
||
} |
} |
||
.insert-quote-panel.has-image .insert-quote-content { |
.insert-quote-panel.has-image .insert-quote-content { |
||
/* Ensure OUR wrapper is invisible */ |
|||
background: transparent !important; |
background: transparent !important; |
||
border: none !important; |
border: none !important; |
||
| Line 49: | Line 55: | ||
/* ================================================================= |
/* ================================================================= |
||
DEEP RESET |
DEEP RESET & FIXES FOR {{Quote}} TEMPLATE |
||
This strips the gray bar/box from the {{Quote}} template itself |
|||
================================================================= */ |
================================================================= */ |
||
| ⚫ | |||
.insert-quote-content .quotebox, |
|||
.insert-quote-content blockquote { |
|||
| ⚫ | |||
| ⚫ | |||
float: none !important; /* Prevents it from sticking to one side */ |
|||
box-sizing: border-box; |
|||
} |
|||
/* 2. Remove gray styling specifically for the "Has Image" version */ |
|||
.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; |
||
padding: 0 !important; |
padding: 0 !important; |
||
margin: 0 !important; |
margin: 0 !important; |
||
| ⚫ | |||
float: none !important; /* Prevent floating issues */ |
|||
} |
} |
||
/* 3. Text Alignment & Positioning for "Has Image" */ |
|||
| ⚫ | |||
.insert-quote-panel.has-image .insert-quote-content p, |
.insert-quote-panel.has-image .insert-quote-content p, |
||
.insert-quote-panel.has-image .insert-quote-content div { |
.insert-quote-panel.has-image .insert-quote-content div { |
||
text-align: left !important; |
|||
} |
|||
/* 4. Fix Top Margin (Text too low) */ |
|||
.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; |
margin-top: 0 !important; |
||
padding-top: 0 !important; |
padding-top: 0 !important; |
||
} |
|||
| ⚫ | |||
/* 5. RESTORE AUTHOR SPACING (The fix for your second point) */ |
|||
/* We target the <small> or <cite> tag usually found in {{Quote}} */ |
|||
.insert-quote-panel.has-image .insert-quote-content small, |
|||
.insert-quote-panel.has-image .insert-quote-content cite, |
|||
.insert-quote-panel.has-image .insert-quote-content .cite { |
|||
display: block; |
|||
margin-top: 1em !important; /* Adds space between text and author */ |
|||
font-style: normal; /* Optional: standardizes author text */ |
|||
} |
} |
||
Revision as of 21:51, 16 December 2025
/* Template:Insert quote panel/styles.css */
/* --- 1. MAIN CONTAINER --- */
.insert-quote-panel {
clear: both;
width: 100%; /* Ensures the main wrapper takes full page width */
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 (Shared) --- */
.insert-quote-content {
flex: 1; /* Grow to fill remaining space */
min-width: 0; /* CSS fix for flex containers */
width: 100%; /* Ensures content tries to be full width */
}
/* --- 4. SCENARIO: NO IMAGE (Gray Box) --- */
.insert-quote-panel.no-image .insert-quote-content {
background: #F8F9FA;
border: 0 solid #9CA4AC;
padding: .5em;
color: #202122;
}
/* --- 5. SCENARIO: WITH IMAGE (Clean, Transparent) --- */
.insert-quote-panel.has-image {
gap: 15px;
}
.insert-quote-panel.has-image .insert-quote-content {
background: transparent !important;
border: none !important;
padding: 0 !important;
margin: 0 !important;
color: #202122;
}
/* =================================================================
DEEP RESET & FIXES FOR {{Quote}} TEMPLATE
================================================================= */
/* 1. Force the inner {{Quote}} box to be Full Width */
.insert-quote-content .quotebox,
.insert-quote-content blockquote {
width: 100% !important; /* Fixes the "limited width" issue */
max-width: 100% !important;
float: none !important; /* Prevents it from sticking to one side */
box-sizing: border-box;
}
/* 2. Remove gray styling specifically for the "Has Image" version */
.insert-quote-panel.has-image .insert-quote-content .quotebox,
.insert-quote-panel.has-image .insert-quote-content blockquote {
background: transparent !important;
border: none !important;
padding: 0 !important;
margin: 0 !important;
}
/* 3. Text Alignment & Positioning for "Has Image" */
.insert-quote-panel.has-image .insert-quote-content p,
.insert-quote-panel.has-image .insert-quote-content div {
text-align: left !important;
}
/* 4. Fix Top Margin (Text too low) */
.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;
}
/* 5. RESTORE AUTHOR SPACING (The fix for your second point) */
/* We target the <small> or <cite> tag usually found in {{Quote}} */
.insert-quote-panel.has-image .insert-quote-content small,
.insert-quote-panel.has-image .insert-quote-content cite,
.insert-quote-panel.has-image .insert-quote-content .cite {
display: block;
margin-top: 1em !important; /* Adds space between text and author */
font-style: normal; /* Optional: standardizes author text */
}