MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* CSS placed here will be applied to all skins */ | /* CSS placed here will be applied to all skins */ | ||
/* Ironclad pressable buttons */ | |||
.ic-btn { | .ic-btn { | ||
display: inline-block; | display: inline-block; | ||
border-radius: 10px; /* match | overflow: hidden; /* clips the bottom edge when pressed */ | ||
border-radius: 10px; /* match button art corners */ | |||
line-height: 0; /* removes unwanted gap around inline images */ | |||
} | } | ||
/* | /* Link and image inside the button */ | ||
.ic-btn > img { | .ic-btn > a, | ||
.ic-btn img { | |||
display: block; | display: block; | ||
border-radius: 10px; | border-radius: 10px; | ||
} | } | ||
.ic-btn img { | |||
.ic-btn | width: 100%; | ||
height: auto; | |||
pointer-events: none; /* clicks go to the link, not the image */ | |||
height: | |||
} | } | ||
/* | /* Animation target is the link itself */ | ||
.ic-btn | .ic-btn > a { | ||
transition: transform 120ms ease; | |||
transform | transform-origin: top center; | ||
transform-origin: top center; | |||
} | } | ||
.ic-btn:active | /* Pressed state — moves down and squashes slightly from the top */ | ||
.ic-btn.is-pressed | .ic-btn:active > a, | ||
transform: translateY( | .ic-btn.is-pressed > a { | ||
transform: translateY(8px) scaleY(0.94); | |||
} | } | ||
/* | /* No hover effect at all */ | ||
.ic-btn:hover | .ic-btn:hover, | ||
.ic-btn:hover | .ic-btn:hover > a { | ||
/* intentionally empty to prevent hover animations */ | |||
} | } | ||
Revision as of 21:20, 11 August 2025
/* CSS placed here will be applied to all skins */
/* Ironclad pressable buttons */
.ic-btn {
display: inline-block;
overflow: hidden; /* clips the bottom edge when pressed */
border-radius: 10px; /* match button art corners */
line-height: 0; /* removes unwanted gap around inline images */
}
/* Link and image inside the button */
.ic-btn > a,
.ic-btn img {
display: block;
border-radius: 10px;
}
.ic-btn img {
width: 100%;
height: auto;
pointer-events: none; /* clicks go to the link, not the image */
}
/* Animation target is the link itself */
.ic-btn > a {
transition: transform 120ms ease;
transform-origin: top center;
}
/* Pressed state — moves down and squashes slightly from the top */
.ic-btn:active > a,
.ic-btn.is-pressed > a {
transform: translateY(8px) scaleY(0.94);
}
/* No hover effect at all */
.ic-btn:hover,
.ic-btn:hover > a {
/* intentionally empty to prevent hover animations */
}