MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
Joeeasterly (talk | contribs) No edit summary |
Joeeasterly (talk | contribs) No edit summary |
||
| Line 6: | Line 6: | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
gap: | gap: 12px; /* Slightly tighter gap */ | ||
margin-bottom: 20px; | margin-bottom: 20px; | ||
} | } | ||
| Line 12: | Line 12: | ||
/* Individual Dashboard Cards */ | /* Individual Dashboard Cards */ | ||
.dashboard-card { | .dashboard-card { | ||
flex: 1 1 | flex: 1 1 220px; | ||
display: flex; | display: flex; | ||
align-items: center; | flex-direction: row; /* Force row direction explicitly */ | ||
align-items: center; /* Vertically center everything */ | |||
background-color: var(--background-color-surface); | background-color: var(--background-color-surface); | ||
border: 1px solid var(--border-color-subtle); | border: 1px solid var(--border-color-subtle); | ||
border-radius: var(--border-radius-base, 8px); | border-radius: var(--border-radius-base, 8px); | ||
padding: | padding: 12px; /* Reduced from 15px to look less puffy */ | ||
box-shadow: 0 2px 5px rgba(0,0,0,0.1); | 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; | text-decoration: none !important; | ||
min-width: 200px; | min-width: 200px; | ||
color: var(--color-base); | color: var(--color-base); | ||
overflow: hidden; /* Safety mechanism against rogue scrollbars */ | |||
} | } | ||
.dashboard-card:hover { | .dashboard-card:hover { | ||
transform: translateY(- | transform: translateY(-2px); | ||
box-shadow: 0 | box-shadow: 0 4px 12px rgba(0,0,0,0.15); | ||
border-color: var(--color-primary); | border-color: var(--color-primary); | ||
background-color: var(--background-color-interactive-hover); | background-color: var(--background-color-interactive-hover); | ||
} | } | ||
/* The Icon Box */ | /* The Icon Box - NO SCROLLBARS ALLOWED */ | ||
.dashboard-icon { | .dashboard-icon { | ||
/* Fixed | width: 42px; /* Fixed width */ | ||
height: 42px; /* Fixed height */ | |||
flex-shrink: 0; /* Do not let the text crush the icon */ | |||
flex-shrink: 0; | margin-right: 12px; | ||
margin-right: | |||
background-color: var(--background-color-overlay); | background-color: var(--background-color-overlay); | ||
border-radius: 6px; | |||
border-radius: | |||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
justify-content: center; | justify-content: center; | ||
color: var(--color-primary); | color: var(--color-primary); | ||
overflow: hidden; /* The nuclear option for scrollbars */ | |||
} | } | ||
/* | /* The actual icon font */ | ||
.dashboard-icon .mdi { | .dashboard-icon .mdi { | ||
font-size: | font-size: 24px; /* Ensure this fits inside the 42px box */ | ||
line-height: 1; | line-height: 1; /* Stop line-height from adding phantom vertical space */ | ||
display: block; /* Behaves better than inline for transform/sizing */ | |||
} | } | ||
| Line 69: | Line 61: | ||
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: | font-weight: 700; | ||
font-size: | font-size: 1rem; | ||
color: var(--color-base); | 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. | font-size: 0.8rem; | ||
color: var(--color-subtle); | color: var(--color-subtle); | ||
margin-top: 2px; | margin-top: 2px; | ||
white-space: nowrap; | |||
overflow: hidden; | |||
text-overflow: ellipsis; | |||
} | } | ||
Revision as of 17:45, 27 January 2026
/* 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: 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;
}