Jump to content

Template:Insert quote panel/styles.css: Difference between revisions

From Insurer Brain
Content deleted Content added
No edit summary
No edit summary
Line 37: Line 37:
background: #F8F9FA;
background: #F8F9FA;
border: 0 solid #9CA4AC;
border: 0 solid #9CA4AC;
padding: .5em;
padding: .5em; /* Creates the space inside the gray box */
color: #202122;
color: #202122;
}
}


/* --- 5. SCENARIO: WITH IMAGE (Transparent, Clean) --- */
/* --- 5. SCENARIO: WITH IMAGE (Transparent) --- */
.insert-quote-panel.has-image {
.insert-quote-panel.has-image {
gap: 15px; /* This is the ONLY space between face and text */
gap: 15px; /* Space between photo and text */
}
}


Line 55: Line 55:


/* =================================================================
/* =================================================================
THE FIX: UNIVERSAL ALIGNMENT RESET
THE FIXES
Force Text and Author to align flush left in ALL scenarios
================================================================= */
================================================================= */


/* 1. RESET BLOCKQUOTE (Fixes "Text too far from image") */
/* A. RESET THE QUOTE TEXT (Removes default indentation) */
.insert-quote-content .quotebox,
.insert-quote-content blockquote,
.insert-quote-content p,
.insert-quote-content div {
margin-left: 0 !important;
padding-left: 0 !important;
width: 100% !important;
max-width: 100% !important;
box-sizing: border-box;
}

/* Special fix for "Has Image": Remove all margins from the blockquote wrapper */
.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 {
margin: 0 !important;
padding: 0 !important;
border: none !important;
background: transparent !important;
background: transparent !important;
}
border: none !important;

box-shadow: none !important;
/* B. RESET THE AUTHOR (Removes default indentation) */
.insert-quote-content .templatequotecite,
.insert-quote-content cite,
.insert-quote-content small {
display: block !important;
/* KEY FIX: Overrides Common.css "padding: 0 40px" */
/* FORCE LEFT ALIGNMENT */
padding: 0 !important;
text-align: left !important;
margin: 0 !important;
padding-left: 0 !important;
margin-left: 0 !important;
width: 100% !important;
/* Vertical Spacing */
max-width: 100% !important;
margin-top: 1.5em !important;
margin-bottom: 0 !important;
margin-right: 0 !important;
}
}


/* 2. ALIGNMENT FIX: Ensure text starts at the very top */
/* C. REMOVE TOP GAP (Align text with image 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 {
margin-top: 0 !important;
margin-top: 0 !important;
padding-top: 0 !important;
padding-top: 0 !important;
}

/* 3. AUTHOR SPACING & ALIGNMENT FIX (Has Image Only) */
.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;
margin-top: 1.5em !important; /* Adds the vertical space */
/* LEFT ALIGN FIX: Kills the default indent so it matches the quote text */
padding-left: 0 !important;
margin-left: 0 !important;
text-align: left !important;
}
}

Revision as of 22:20, 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; /* Creates the space inside the gray box */
  color: #202122;
}

/* --- 5. SCENARIO: WITH IMAGE (Transparent) --- */
.insert-quote-panel.has-image {
  gap: 15px; /* Space between photo and text */
}

.insert-quote-panel.has-image .insert-quote-content {
  background: transparent !important; 
  border: none !important;            
  padding: 0 !important;              
  margin: 0 !important;
  color: #202122;
}

/* =================================================================
   THE FIX: UNIVERSAL ALIGNMENT RESET
   Force Text and Author to align flush left in ALL scenarios
   ================================================================= */

/* A. RESET THE QUOTE TEXT (Removes default indentation) */
.insert-quote-content .quotebox,
.insert-quote-content blockquote,
.insert-quote-content p,
.insert-quote-content div {
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100% !important; 
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Special fix for "Has Image": Remove all margins from the blockquote wrapper */
.insert-quote-panel.has-image .insert-quote-content .quotebox,
.insert-quote-panel.has-image .insert-quote-content blockquote {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* B. RESET THE AUTHOR (Removes default indentation) */
.insert-quote-content .templatequotecite,
.insert-quote-content cite,
.insert-quote-content small {
    display: block !important;
    
    /* FORCE LEFT ALIGNMENT */
    text-align: left !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    
    /* Vertical Spacing */
    margin-top: 1.5em !important;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
}

/* C. REMOVE TOP GAP (Align text with image 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;
}