MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
Joeeasterly (talk | contribs) 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..." |
Joeeasterly (talk | contribs) No edit summary |
||
| Line 12: | Line 12: | ||
/* Individual Dashboard Cards */ | /* Individual Dashboard Cards */ | ||
.dashboard-card { | .dashboard-card { | ||
flex: 1 1 250px; | flex: 1 1 250px; | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
background-color: | /* DYNAMIC COLOR: Matches the skin's card/surface color */ | ||
border: 1px solid | background-color: var(--background-color-surface); | ||
border-radius: 8px; | /* DYNAMIC BORDER: Subtle in both light/dark modes */ | ||
border: 1px solid var(--border-color-subtle); | |||
border-radius: var(--border-radius-base, 8px); | |||
padding: 15px; | padding: 15px; | ||
box-shadow: 0 2px 5px rgba(0,0,0,0. | /* Shadow uses a transparent black so it works on dark backgrounds too */ | ||
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; | ||
/* Ensure text color inherits from the skin */ | |||
color: var(--color-base); | |||
} | } | ||
.dashboard-card:hover { | .dashboard-card:hover { | ||
transform: translateY(-3px); | transform: translateY(-3px); | ||
box-shadow: 0 5px 15px rgba(0,0,0,0. | box-shadow: 0 5px 15px rgba(0,0,0,0.2); | ||
border-color: | /* DYNAMIC: Highlight border using the skin's primary link color */ | ||
border-color: var(--color-primary); | |||
background-color: var(--background-color-interactive-hover); | |||
} | } | ||
/* The Icon Box */ | /* The Icon Box */ | ||
.dashboard-icon { | .dashboard-icon { | ||
/* Fixed square size so they align perfectly */ | |||
width: 48px; | |||
height: 48px; | |||
flex-shrink: 0; | |||
margin-right: 15px; | margin-right: 15px; | ||
color: | |||
/* DYNAMIC: This is your "distance" color. | |||
It is always slightly distinct from the surface. */ | |||
background-color: var(--background-color-overlay); | |||
border-radius: 8px; | |||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
justify-content: center; | justify-content: center; | ||
/* Icon Color: Use primary skin color */ | |||
color: var(--color-primary); | |||
} | |||
/* Force the icon font size inside the box */ | |||
.dashboard-icon .mdi { | |||
font-size: 28px; | |||
line-height: 1; | |||
} | } | ||
| Line 50: | Line 74: | ||
font-weight: bold; | font-weight: bold; | ||
font-size: 1.1em; | font-size: 1.1em; | ||
color: | color: var(--color-base); | ||
} | } | ||
.dashboard-desc { | .dashboard-desc { | ||
font-size: 0.85em; | font-size: 0.85em; | ||
color: | /* DYNAMIC: Subtle text color */ | ||
color: var(--color-subtle); | |||
margin-top: 2px; | margin-top: 2px; | ||
} | } | ||
/* | /* 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; | ||
} | } | ||
Revision as of 17:41, 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: 15px;
margin-bottom: 20px;
}
/* Individual Dashboard Cards */
.dashboard-card {
flex: 1 1 250px;
display: flex;
align-items: center;
/* DYNAMIC COLOR: Matches the skin's card/surface color */
background-color: var(--background-color-surface);
/* DYNAMIC BORDER: Subtle in both light/dark modes */
border: 1px solid var(--border-color-subtle);
border-radius: var(--border-radius-base, 8px);
padding: 15px;
/* Shadow uses a transparent black so it works on dark backgrounds too */
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;
/* Ensure text color inherits from the skin */
color: var(--color-base);
}
.dashboard-card:hover {
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
/* DYNAMIC: Highlight border using the skin's primary link color */
border-color: var(--color-primary);
background-color: var(--background-color-interactive-hover);
}
/* The Icon Box */
.dashboard-icon {
/* Fixed square size so they align perfectly */
width: 48px;
height: 48px;
flex-shrink: 0;
margin-right: 15px;
/* DYNAMIC: This is your "distance" color.
It is always slightly distinct from the surface. */
background-color: var(--background-color-overlay);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
/* Icon Color: Use primary skin color */
color: var(--color-primary);
}
/* Force the icon font size inside the box */
.dashboard-icon .mdi {
font-size: 28px;
line-height: 1;
}
/* The Text Area */
.dashboard-text {
display: flex;
flex-direction: column;
}
.dashboard-label {
font-weight: bold;
font-size: 1.1em;
color: var(--color-base);
}
.dashboard-desc {
font-size: 0.85em;
/* DYNAMIC: Subtle text color */
color: var(--color-subtle);
margin-top: 2px;
}
/* Kill the external link icon */
.dashboard-card a.external {
background-image: none !important;
padding-right: 0 !important;
}