Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
Created page with "Import Material Design Icons: @import url('https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css'); Dashboard Grid Container: .dashboard-grid { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; } Individual Dashboard Cards: .dashboard-card { flex: 1 1 250px; Grow to fill, shrink, base width 250px: display: flex; align-items: center; background-color: #ffffff; /* Or whatever matche..."
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Import Material Design Icons */
/* Import Material Design Icons */
@import url('https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css');
@import url('https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css');
/* Target the logo icon in the header */
.citizen-header__logo .mw-logo-icon {
    /* Step 1: Hide the actual <img> content (the default black) */
    content: "";
    display: inline-block;
   
    /* Step 2: Use the SVG as a mask */
    -webkit-mask-image: url('/assets/momoiro_logo.svg');
    mask-image: url('/assets/momoiro_logo.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    /* Step 3: Fill the mask with the Citizen icon color variable */
    background-color: var(--color-base, #202122);
   
    /* Maintain dimensions from your HTML */
    width: 32px;
    height: 32px;
}
/* Ensure the drawer version also scales correctly */
.citizen-drawer__logo .mw-logo-icon {
    width: 80px;
    height: 80px;
    background-color: var(--color-base, #202122);
}


/* Dashboard Grid Container */
/* Dashboard Grid Container */
Line 6: Line 35:
     display: flex;
     display: flex;
     flex-wrap: wrap;
     flex-wrap: wrap;
     gap: 15px;
     gap: 12px; /* Slightly tighter gap */
     margin-bottom: 20px;
     margin-bottom: 20px;
}
}
Line 12: Line 41:
/* Individual Dashboard Cards */
/* Individual Dashboard Cards */
.dashboard-card {
.dashboard-card {
     flex: 1 1 250px; /* Grow to fill, shrink, base width 250px */
     flex: 1 1 220px;
     display: flex;
     display: flex;
     align-items: center;
    flex-direction: row; /* Force row direction explicitly */
     background-color: #ffffff; /* Or whatever matches your skin */
     align-items: center; /* Vertically center everything */
     border: 1px solid #e0e0e0;
     background-color: var(--background-color-surface);
     border-radius: 8px;
     border: 1px solid var(--border-color-subtle);
     padding: 15px;
     border-radius: var(--border-radius-base, 8px);
     box-shadow: 0 2px 5px rgba(0,0,0,0.05);
     padding: 12px; /* Reduced from 15px to look less puffy */
     box-shadow: 0 2px 5px rgba(0,0,0,0.1);
     transition: all 0.2s ease-in-out;
     transition: all 0.2s ease-in-out;
     text-decoration: none !important; /* Kill the underline */
     text-decoration: none !important;
     min-width: 200px;
     min-width: 200px;
    color: var(--color-base);
    overflow: hidden; /* Safety mechanism against rogue scrollbars */
}
}


.dashboard-card:hover {
.dashboard-card:hover {
     transform: translateY(-3px);
     transform: translateY(-2px);
     box-shadow: 0 5px 15px rgba(0,0,0,0.1);
     box-shadow: 0 4px 12px rgba(0,0,0,0.15);
     border-color: #b0b0b0;
     border-color: var(--color-primary);
    background-color: var(--background-color-interactive-hover);
}
}


/* The Icon Box */
/* The Icon Box - NO SCROLLBARS ALLOWED */
.dashboard-icon {
.dashboard-icon {
     font-size: 24px;
     width: 42px; /* Fixed width */
     margin-right: 15px;
    height: 42px; /* Fixed height */
     color: #555;
    flex-shrink: 0; /* Do not let the text crush the icon */
     margin-right: 12px;
     background-color: var(--background-color-overlay);
    border-radius: 6px;
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     justify-content: center;
     justify-content: center;
    color: var(--color-primary);
    overflow: hidden; /* The nuclear option for scrollbars */
}
/* The actual icon font */
.dashboard-icon .mdi {
    font-size: 24px; /* Ensure this fits inside the 42px box */
    line-height: 1; /* Stop line-height from adding phantom vertical space */
    display: block; /* Behaves better than inline for transform/sizing */
}
}


Line 45: Line 90:
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
    justify-content: center;
    line-height: 1.3; /* Tighten text spacing */
    flex-grow: 1; /* Take up remaining space */
    min-width: 0; /* CSS Grid/Flex hack to prevent text overflow issues */
}
}


.dashboard-label {
.dashboard-label {
     font-weight: bold;
     font-weight: 700;
     font-size: 1.1em;
     font-size: 1rem;
     color: #333;
     color: var(--color-base);
    white-space: nowrap; /* Keep title on one line if you prefer */
    overflow: hidden;
    text-overflow: ellipsis; /* ... if it's too long */
}
}


.dashboard-desc {
.dashboard-desc {
     font-size: 0.85em;
     font-size: 0.8rem;
     color: #666;
     color: var(--color-subtle);
     margin-top: 2px;
     margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
}


/* Remove external link icon for these cards if you hate them */
/* Kill the external link icon */
.dashboard-card a.external {
.dashboard-card a.external {
     background-image: none !important;
     background-image: none !important;
     padding-right: 0 !important;
     padding-right: 0 !important;
}
/* Dashboard Quick-Jump Highlighting */
.dashboard-jump-active {
    /* A nice, sharp border to indicate focus */
    outline: 2px solid var(--color-primary, #36c);
    outline-offset: 2px;
   
    /* Subtle background shift to show it's "hot" */
    background-color: var(--background-color-interactive-subtle, #f8f9fa);
   
    /* A tiny scale pop, because we aren't barbarians */
    transform: scale(1.02);
    transition: all 0.1s ease-out;
    z-index: 10; /* Ensure it pops over neighbors */
    border-radius: var(--border-radius-base, 4px);
}
/* Ensure the text inside doesn't disappear if the theme shifts colors on hover/active */
.dashboard-jump-active .dashboard-label a {
    text-decoration: underline;
    color: var(--color-primary--hover, #447ff5);
}
}

Latest revision as of 00:12, 2 February 2026

/* Import Material Design Icons */
@import url('https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css');

/* Target the logo icon in the header */
.citizen-header__logo .mw-logo-icon {
    /* Step 1: Hide the actual <img> content (the default black) */
    content: ""; 
    display: inline-block;
    
    /* Step 2: Use the SVG as a mask */
    -webkit-mask-image: url('/assets/momoiro_logo.svg');
    mask-image: url('/assets/momoiro_logo.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;

    /* Step 3: Fill the mask with the Citizen icon color variable */
    background-color: var(--color-base, #202122);
    
    /* Maintain dimensions from your HTML */
    width: 32px;
    height: 32px;
}

/* Ensure the drawer version also scales correctly */
.citizen-drawer__logo .mw-logo-icon {
    width: 80px;
    height: 80px;
    background-color: var(--color-base, #202122);
}

/* Dashboard Grid Container */
.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px; /* Slightly tighter gap */
    margin-bottom: 20px;
}

/* Individual Dashboard Cards */
.dashboard-card {
    flex: 1 1 220px;
    display: flex;
    flex-direction: row; /* Force row direction explicitly */
    align-items: center; /* Vertically center everything */
    background-color: var(--background-color-surface);
    border: 1px solid var(--border-color-subtle);
    border-radius: var(--border-radius-base, 8px);
    padding: 12px; /* Reduced from 15px to look less puffy */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
    text-decoration: none !important;
    min-width: 200px;
    color: var(--color-base);
    overflow: hidden; /* Safety mechanism against rogue scrollbars */
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--color-primary);
    background-color: var(--background-color-interactive-hover);
}

/* The Icon Box - NO SCROLLBARS ALLOWED */
.dashboard-icon {
    width: 42px; /* Fixed width */
    height: 42px; /* Fixed height */
    flex-shrink: 0; /* Do not let the text crush the icon */
    margin-right: 12px;
    background-color: var(--background-color-overlay);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    overflow: hidden; /* The nuclear option for scrollbars */
}

/* The actual icon font */
.dashboard-icon .mdi {
    font-size: 24px; /* Ensure this fits inside the 42px box */
    line-height: 1; /* Stop line-height from adding phantom vertical space */
    display: block; /* Behaves better than inline for transform/sizing */
}

/* The Text Area */
.dashboard-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3; /* Tighten text spacing */
    flex-grow: 1; /* Take up remaining space */
    min-width: 0; /* CSS Grid/Flex hack to prevent text overflow issues */
}

.dashboard-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-base);
    white-space: nowrap; /* Keep title on one line if you prefer */
    overflow: hidden;
    text-overflow: ellipsis; /* ... if it's too long */
}

.dashboard-desc {
    font-size: 0.8rem;
    color: var(--color-subtle);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Kill the external link icon */
.dashboard-card a.external {
    background-image: none !important;
    padding-right: 0 !important;
}
/* Dashboard Quick-Jump Highlighting */
.dashboard-jump-active {
    /* A nice, sharp border to indicate focus */
    outline: 2px solid var(--color-primary, #36c); 
    outline-offset: 2px;
    
    /* Subtle background shift to show it's "hot" */
    background-color: var(--background-color-interactive-subtle, #f8f9fa);
    
    /* A tiny scale pop, because we aren't barbarians */
    transform: scale(1.02);
    transition: all 0.1s ease-out;
    z-index: 10; /* Ensure it pops over neighbors */
    border-radius: var(--border-radius-base, 4px);
}

/* Ensure the text inside doesn't disappear if the theme shifts colors on hover/active */
.dashboard-jump-active .dashboard-label a {
    text-decoration: underline;
    color: var(--color-primary--hover, #447ff5);
}