mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-30 09:04:26 +00:00
206 lines
4.8 KiB
Plaintext
206 lines
4.8 KiB
Plaintext
/*
|
|
* Citizen
|
|
*
|
|
* SkinStyles for MediaWiki
|
|
* Module: mediawiki.ui.button
|
|
* Version: REL1_39
|
|
*
|
|
* Date: 2022-11-30
|
|
*/
|
|
|
|
.mw-ui-button {
|
|
font-weight: var( --font-weight-medium );
|
|
color: var( --color-base--emphasized );
|
|
background-color: var( --color-surface-2 );
|
|
border-color: var( --border-color-base );
|
|
border-radius: var( --border-radius--small );
|
|
|
|
&:not( :disabled ) {
|
|
&:visited {
|
|
color: var( --color-base--emphasized );
|
|
}
|
|
|
|
// Simplify hover style to only change background color
|
|
&:hover {
|
|
color: var( --color-base--emphasized );
|
|
background-color: var( --color-surface-2--hover );
|
|
border-color: var( --border-color-base );
|
|
}
|
|
|
|
&:focus {
|
|
color: var( --color-base--emphasized );
|
|
border-color: var( --color-primary );
|
|
box-shadow: inset 0 0 0 1px var( --color-primary ), inset 0 0 0 2px var( --color-surface-0 );
|
|
}
|
|
|
|
&:active,
|
|
&.is-on {
|
|
color: var( --color-base--subtle );
|
|
background-color: var( --color-surface-2--active );
|
|
border-color: var( --color-surface-2--active );
|
|
}
|
|
}
|
|
|
|
&:disabled {
|
|
color: var( --color-base--subtle );
|
|
background-color: var( --color-surface-4 );
|
|
border-color: var( --color-surface-4 );
|
|
}
|
|
|
|
&.mw-ui-quiet,
|
|
&.mw-ui-quiet.mw-ui-progressive,
|
|
&.mw-ui-quiet.mw-ui-destructive {
|
|
font-weight: var( --font-weight-medium );
|
|
color: var( --color-base--emphasized );
|
|
|
|
input[ type='checkbox' ]:hover + &,
|
|
&:hover {
|
|
color: var( --color-base--emphasized );
|
|
background-color: var( --background-color-quiet--hover );
|
|
}
|
|
|
|
input[ type='checkbox' ]:focus + &,
|
|
&:focus {
|
|
color: var( --color-base--emphasized );
|
|
border-color: var( --color-primary );
|
|
box-shadow: inset 0 0 0 1px var( --color-primary ), inset 0 0 0 2px var( --color-surface-0 );
|
|
}
|
|
|
|
input[ type='checkbox' ]:active + &,
|
|
&:active {
|
|
color: var( --color-base--subtle );
|
|
background-color: var( --background-color-quiet--active );
|
|
border-color: transparent;
|
|
}
|
|
|
|
&:disabled,
|
|
&:disabled:hover,
|
|
&:disabled:active {
|
|
color: var( --color-base--subtle );
|
|
}
|
|
}
|
|
|
|
&.mw-ui-progressive {
|
|
&:not( :disabled ) {
|
|
background-color: var( --color-primary );
|
|
border-color: var( --color-primary );
|
|
|
|
&:hover {
|
|
color: #fff;
|
|
background-color: var( --color-primary--hover );
|
|
border-color: var( --color-primary--hover );
|
|
}
|
|
|
|
&:focus {
|
|
box-shadow: inset 0 0 0 1px var( --color-primary ), inset 0 0 0 2px #fff;
|
|
}
|
|
|
|
&:active,
|
|
&.is-on {
|
|
color: #fff;
|
|
background-color: var( --color-primary--active );
|
|
border-color: var( --color-primary--active );
|
|
}
|
|
}
|
|
|
|
&:disabled {
|
|
color: var( --color-base--subtle );
|
|
background-color: var( --color-surface-4 );
|
|
border-color: var( --color-surface-4 );
|
|
}
|
|
|
|
&.mw-ui-quiet {
|
|
color: var( --color-primary );
|
|
|
|
input[ type='checkbox' ]:hover + &,
|
|
&:hover {
|
|
color: var( --color-primary--hover );
|
|
// Simplify quiet hover style
|
|
background-color: var( --background-color-quiet--hover );
|
|
}
|
|
|
|
input[ type='checkbox' ]:focus + &,
|
|
&:focus {
|
|
color: var( --color-primary );
|
|
border-color: var( --color-primary );
|
|
}
|
|
|
|
input[ type='checkbox' ]:active + &,
|
|
&:active {
|
|
background-color: var( --color-primary--active );
|
|
border-color: var( --color-primary--active );
|
|
}
|
|
}
|
|
}
|
|
|
|
&.mw-ui-destructive {
|
|
&:not( :disabled ) {
|
|
background-color: var( --color-destructive );
|
|
border-color: var( --color-destructive );
|
|
|
|
&:hover {
|
|
color: #fff;
|
|
background-color: var( --color-destructive--hover );
|
|
border-color: var( --color-destructive--hover );
|
|
}
|
|
|
|
&:focus {
|
|
box-shadow: inset 0 0 0 1px var( --color-destructive ), inset 0 0 0 2px #fff;
|
|
}
|
|
|
|
&:active,
|
|
&.is-on {
|
|
color: #fff;
|
|
background-color: var( --color-destructive--active );
|
|
border-color: var( --color-destructive--active );
|
|
}
|
|
}
|
|
|
|
&:disabled {
|
|
color: var( --color-base--subtle );
|
|
background-color: var( --color-surface-4 );
|
|
border-color: var( --color-surface-4 );
|
|
}
|
|
|
|
&.mw-ui-quiet {
|
|
color: var( --color-destructive );
|
|
|
|
input[ type='checkbox' ]:hover + &,
|
|
&:hover {
|
|
color: var( --color-destructive--hover );
|
|
// Simplify quiet hover style
|
|
background-color: var( --background-color-quiet--hover );
|
|
}
|
|
|
|
input[ type='checkbox' ]:focus + &,
|
|
&:focus {
|
|
color: var( --color-destructive );
|
|
border-color: var( --color-destructive );
|
|
}
|
|
|
|
input[ type='checkbox' ]:active + &,
|
|
&:active {
|
|
background-color: var( --color-destructive--active );
|
|
border-color: var( --color-destructive--active );
|
|
}
|
|
}
|
|
}
|
|
|
|
&.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 );
|
|
border-bottom-left-radius: var( --border-radius--small );
|
|
}
|
|
|
|
&:last-child {
|
|
border-top-right-radius: var( --border-radius--small );
|
|
border-bottom-right-radius: var( --border-radius--small );
|
|
}
|
|
}
|
|
}
|