2024-10-23 23:46:15 +00:00
|
|
|
/**
|
|
|
|
* Microinteractions for icons
|
|
|
|
* TODO: Look into animating the SVG directly
|
2024-10-19 06:21:05 +00:00
|
|
|
*/
|
|
|
|
:is( a,
|
|
|
|
button,
|
|
|
|
summary ) {
|
|
|
|
.citizen-ui-icon {
|
|
|
|
transition: var( --transition-hover );
|
|
|
|
transition-property: transform;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ( hover: hover ) {
|
|
|
|
&:hover {
|
|
|
|
.citizen-ui-icon {
|
2024-10-23 23:46:15 +00:00
|
|
|
// Move pen to the right like drawing a line
|
|
|
|
// TODO: Perhaps we can add a line somehow through CSS
|
2024-10-19 06:27:42 +00:00
|
|
|
&.mw-ui-icon-wikimedia-edit {
|
2024-10-23 23:46:15 +00:00
|
|
|
transform: translateX( 2px );
|
2024-10-19 06:27:42 +00:00
|
|
|
}
|
|
|
|
|
2024-10-23 23:46:15 +00:00
|
|
|
// Spin anti-clockwise like a door handle, to open a vertical menu
|
2024-10-19 06:21:05 +00:00
|
|
|
&.mw-ui-icon-wikimedia-ellipsis {
|
2024-10-19 06:21:59 +00:00
|
|
|
transform: rotate( -90deg );
|
2024-10-19 06:21:05 +00:00
|
|
|
}
|
|
|
|
|
2024-10-23 23:46:15 +00:00
|
|
|
// Move up
|
|
|
|
&.mw-ui-icon-wikimedia-speechBubbles,
|
|
|
|
&.mw-ui-icon-wikimedia-userAdd {
|
|
|
|
transform: translateY( -2px );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Move up to indicate going to the top
|
|
|
|
// rotate( 90deg ) is needed because of how the icon is set up
|
2024-10-19 06:21:05 +00:00
|
|
|
&.mw-ui-icon-wikimedia-first {
|
|
|
|
transform: translateY( -2px ) rotate( 90deg );
|
|
|
|
}
|
|
|
|
|
2024-10-23 23:46:15 +00:00
|
|
|
// Spin anti-clockwise and get the arrow to point backward
|
2024-10-19 06:21:05 +00:00
|
|
|
&.mw-ui-icon-wikimedia-history {
|
|
|
|
transform: rotate( -270deg );
|
|
|
|
}
|
|
|
|
|
2024-10-23 23:46:15 +00:00
|
|
|
// Move towards where the arrow is pointing
|
2024-10-19 06:27:42 +00:00
|
|
|
&.mw-ui-icon-wikimedia-logIn,
|
2024-10-19 06:21:05 +00:00
|
|
|
&.mw-ui-icon-wikimedia-share {
|
|
|
|
transform: translateX( 2px );
|
|
|
|
}
|
|
|
|
|
2024-10-23 23:46:15 +00:00
|
|
|
// Rotate the icon
|
2024-10-19 06:21:05 +00:00
|
|
|
&.mw-ui-icon-wikimedia-settings {
|
|
|
|
transform: rotate( 90deg );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-10-23 23:46:15 +00:00
|
|
|
|
|
|
|
.citizen-header__logo {
|
|
|
|
.mw-logo-icon,
|
|
|
|
.citizen-ui-icon {
|
|
|
|
transition-timing-function: var( --transition-timing-function-ease );
|
|
|
|
transition-duration: var( --transition-duration-base );
|
|
|
|
transition-property: transform, opacity;
|
|
|
|
transform-origin: center center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.citizen-header__button:hover {
|
|
|
|
.mw-logo-icon {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-logo-icon,
|
|
|
|
.citizen-ui-icon {
|
|
|
|
transition-duration: var( --transition-duration-medium );
|
|
|
|
transform: rotate( 360deg );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|