2022-11-30 20:38:59 +00:00
|
|
|
/*
|
|
|
|
* Citizen
|
|
|
|
*
|
|
|
|
* SkinStyles for MediaWiki
|
|
|
|
* Module: mediawiki.ui.button
|
|
|
|
* Version: REL1_39
|
|
|
|
*
|
|
|
|
* Date: 2022-11-30
|
|
|
|
*/
|
|
|
|
|
|
|
|
.mw-ui-button {
|
2023-07-28 01:19:27 +00:00
|
|
|
font-weight: var( --font-weight-medium );
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-emphasized );
|
2023-07-28 01:19:27 +00:00
|
|
|
background-color: var( --color-surface-2 );
|
2022-12-02 03:03:42 +00:00
|
|
|
border-color: var( --border-color-base );
|
2022-12-08 18:41:43 +00:00
|
|
|
border-radius: var( --border-radius--small );
|
2022-11-30 20:38:59 +00:00
|
|
|
|
|
|
|
&:not( :disabled ) {
|
|
|
|
&:visited {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-emphasized );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Simplify hover style to only change background color
|
|
|
|
&:hover {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-emphasized );
|
2023-07-28 01:19:27 +00:00
|
|
|
background-color: var( --color-surface-2--hover );
|
|
|
|
border-color: var( --border-color-base );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-emphasized );
|
|
|
|
border-color: var( --color-progressive );
|
|
|
|
box-shadow: inset 0 0 0 1px var( --color-progressive ), inset 0 0 0 2px var( --color-surface-0 );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active,
|
|
|
|
&.is-on {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-subtle );
|
2023-07-28 01:19:27 +00:00
|
|
|
background-color: var( --color-surface-2--active );
|
|
|
|
border-color: var( --color-surface-2--active );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-subtle );
|
2023-07-28 01:19:27 +00:00
|
|
|
background-color: var( --color-surface-4 );
|
|
|
|
border-color: var( --color-surface-4 );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.mw-ui-quiet,
|
|
|
|
&.mw-ui-quiet.mw-ui-progressive,
|
|
|
|
&.mw-ui-quiet.mw-ui-destructive {
|
2022-12-02 03:03:42 +00:00
|
|
|
font-weight: var( --font-weight-medium );
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-emphasized );
|
2022-11-30 20:38:59 +00:00
|
|
|
|
|
|
|
input[ type='checkbox' ]:hover + &,
|
|
|
|
&:hover {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-emphasized );
|
2024-07-01 00:41:31 +00:00
|
|
|
background-color: var( --background-color-button-quiet--hover );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
input[ type='checkbox' ]:focus + &,
|
|
|
|
&:focus {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-emphasized );
|
|
|
|
border-color: var( --color-progressive );
|
|
|
|
box-shadow: inset 0 0 0 1px var( --color-progressive ), inset 0 0 0 2px var( --color-surface-0 );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
input[ type='checkbox' ]:active + &,
|
|
|
|
&:active {
|
2024-07-01 00:41:31 +00:00
|
|
|
color: var( --color-emphasized );
|
|
|
|
background-color: var( --background-color-button-quiet--active );
|
2023-07-28 01:19:27 +00:00
|
|
|
border-color: transparent;
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled,
|
|
|
|
&:disabled:hover,
|
|
|
|
&:disabled:active {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-subtle );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.mw-ui-progressive {
|
|
|
|
&:not( :disabled ) {
|
2024-06-30 05:04:30 +00:00
|
|
|
background-color: var( --color-progressive );
|
|
|
|
border-color: var( --color-progressive );
|
2022-11-30 20:38:59 +00:00
|
|
|
|
|
|
|
&:hover {
|
2024-06-10 23:47:49 +00:00
|
|
|
color: var( --color-inverted-primary );
|
2024-06-30 05:04:30 +00:00
|
|
|
background-color: var( --color-progressive--hover );
|
|
|
|
border-color: var( --color-progressive--hover );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
2024-06-30 05:04:30 +00:00
|
|
|
box-shadow: inset 0 0 0 1px var( --color-progressive ), inset 0 0 0 2px var( --color-inverted-primary );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active,
|
|
|
|
&.is-on {
|
2024-06-10 23:47:49 +00:00
|
|
|
color: var( --color-inverted-primary );
|
2024-06-30 05:04:30 +00:00
|
|
|
background-color: var( --color-progressive--active );
|
|
|
|
border-color: var( --color-progressive--active );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-subtle );
|
2023-07-28 01:19:27 +00:00
|
|
|
background-color: var( --color-surface-4 );
|
|
|
|
border-color: var( --color-surface-4 );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.mw-ui-quiet {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-progressive );
|
2022-11-30 20:38:59 +00:00
|
|
|
|
|
|
|
input[ type='checkbox' ]:hover + &,
|
|
|
|
&:hover {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-progressive--hover );
|
2022-11-30 20:38:59 +00:00
|
|
|
// Simplify quiet hover style
|
2024-07-01 00:41:31 +00:00
|
|
|
background-color: var( --background-color-button-quiet--hover );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
input[ type='checkbox' ]:focus + &,
|
|
|
|
&:focus {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-progressive );
|
|
|
|
border-color: var( --color-progressive );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
input[ type='checkbox' ]:active + &,
|
|
|
|
&:active {
|
2024-06-30 05:04:30 +00:00
|
|
|
background-color: var( --color-progressive--active );
|
|
|
|
border-color: var( --color-progressive--active );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.mw-ui-destructive {
|
|
|
|
&:not( :disabled ) {
|
|
|
|
background-color: var( --color-destructive );
|
2023-07-28 01:19:27 +00:00
|
|
|
border-color: var( --color-destructive );
|
2022-11-30 20:38:59 +00:00
|
|
|
|
|
|
|
&:hover {
|
2024-06-10 23:47:49 +00:00
|
|
|
color: var( --color-inverted-fixed );
|
2023-07-28 01:19:27 +00:00
|
|
|
background-color: var( --color-destructive--hover );
|
|
|
|
border-color: var( --color-destructive--hover );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
2024-06-10 23:47:49 +00:00
|
|
|
box-shadow: inset 0 0 0 1px var( --color-destructive ), inset 0 0 0 2px var( --color-inverted-fixed );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active,
|
|
|
|
&.is-on {
|
2024-06-10 23:47:49 +00:00
|
|
|
color: var( --color-inverted-fixed );
|
2023-07-28 01:19:27 +00:00
|
|
|
background-color: var( --color-destructive--active );
|
|
|
|
border-color: var( --color-destructive--active );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled {
|
2024-06-30 05:04:30 +00:00
|
|
|
color: var( --color-subtle );
|
2023-07-28 01:19:27 +00:00
|
|
|
background-color: var( --color-surface-4 );
|
|
|
|
border-color: var( --color-surface-4 );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.mw-ui-quiet {
|
|
|
|
color: var( --color-destructive );
|
|
|
|
|
|
|
|
input[ type='checkbox' ]:hover + &,
|
|
|
|
&:hover {
|
2023-07-28 01:19:27 +00:00
|
|
|
color: var( --color-destructive--hover );
|
2022-11-30 20:38:59 +00:00
|
|
|
// Simplify quiet hover style
|
2024-07-01 00:41:31 +00:00
|
|
|
background-color: var( --background-color-button-quiet--hover );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
input[ type='checkbox' ]:focus + &,
|
|
|
|
&:focus {
|
|
|
|
color: var( --color-destructive );
|
2023-07-28 01:19:27 +00:00
|
|
|
border-color: var( --color-destructive );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
input[ type='checkbox' ]:active + &,
|
|
|
|
&:active {
|
|
|
|
background-color: var( --color-destructive--active );
|
2023-07-28 01:19:27 +00:00
|
|
|
border-color: var( --color-destructive--active );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.mw-ui-big {
|
|
|
|
// Smaller font size since MW UI assume a 14px base font size
|
|
|
|
font-size: 1.125em;
|
|
|
|
}
|
|
|
|
|
|
|
|
& > * {
|
|
|
|
&:first-child {
|
|
|
|
border-top-left-radius: var( --border-radius--small );
|
2023-07-28 01:19:27 +00:00
|
|
|
border-bottom-left-radius: var( --border-radius--small );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
border-top-right-radius: var( --border-radius--small );
|
2023-07-28 01:19:27 +00:00
|
|
|
border-bottom-right-radius: var( --border-radius--small );
|
2022-11-30 20:38:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|