mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-25 06:47:16 +00:00
c172966ce4
This will align the style with OOUI and Codex
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 {
|
|
border-color: var( --border-color-base );
|
|
border-radius: var( --border-radius--small );
|
|
background-color: var( --color-surface-2 );
|
|
color: var( --color-base--emphasized );
|
|
font-weight: var( --font-weight-medium );
|
|
|
|
&:not( :disabled ) {
|
|
&:visited {
|
|
color: var( --color-base--emphasized );
|
|
}
|
|
|
|
// Simplify hover style to only change background color
|
|
&:hover {
|
|
border-color: var( --border-color-base );
|
|
background-color: var( --color-surface-2--hover );
|
|
color: var( --color-base--emphasized );
|
|
}
|
|
|
|
&:focus {
|
|
border-color: var( --color-primary );
|
|
box-shadow: inset 0 0 0 1px var( --color-primary ), inset 0 0 0 2px var( --color-surface-0 );
|
|
color: var( --color-base--emphasized );
|
|
}
|
|
|
|
&:active,
|
|
&.is-on {
|
|
border-color: var( --color-surface-2--active );
|
|
background-color: var( --color-surface-2--active );
|
|
color: var( --color-base--subtle );
|
|
}
|
|
}
|
|
|
|
&:disabled {
|
|
border-color: var( --color-surface-4 );
|
|
background-color: var( --color-surface-4 );
|
|
color: var( --color-base--subtle );
|
|
}
|
|
|
|
&.mw-ui-quiet,
|
|
&.mw-ui-quiet.mw-ui-progressive,
|
|
&.mw-ui-quiet.mw-ui-destructive {
|
|
color: var( --color-base--emphasized );
|
|
font-weight: var( --font-weight-medium );
|
|
|
|
input[ type='checkbox' ]:hover + &,
|
|
&:hover {
|
|
background-color: var( --background-color-quiet--hover );
|
|
color: var( --color-base--emphasized );
|
|
}
|
|
|
|
input[ type='checkbox' ]:focus + &,
|
|
&:focus {
|
|
border-color: var( --color-primary );
|
|
box-shadow: inset 0 0 0 1px var( --color-primary ), inset 0 0 0 2px var( --color-surface-0 );
|
|
color: var( --color-base--emphasized );
|
|
}
|
|
|
|
input[ type='checkbox' ]:active + &,
|
|
&:active {
|
|
border-color: transparent;
|
|
background-color: var( --background-color-quiet--active );
|
|
color: var( --color-base--subtle );
|
|
}
|
|
|
|
&:disabled,
|
|
&:disabled:hover,
|
|
&:disabled:active {
|
|
color: var( --color-base--subtle );
|
|
}
|
|
}
|
|
|
|
&.mw-ui-progressive {
|
|
&:not( :disabled ) {
|
|
border-color: var( --color-primary );
|
|
background-color: var( --color-primary );
|
|
|
|
&:hover {
|
|
border-color: var( --color-primary--hover );
|
|
background-color: var( --color-primary--hover );
|
|
color: #fff;
|
|
}
|
|
|
|
&:focus {
|
|
box-shadow: inset 0 0 0 1px var( --color-primary ), inset 0 0 0 2px #fff;
|
|
}
|
|
|
|
&:active,
|
|
&.is-on {
|
|
border-color: var( --color-primary--active );
|
|
background-color: var( --color-primary--active );
|
|
color: #fff;
|
|
}
|
|
}
|
|
|
|
&:disabled {
|
|
border-color: var( --color-surface-4 );
|
|
background-color: var( --color-surface-4 );
|
|
color: var( --color-base--subtle );
|
|
}
|
|
|
|
&.mw-ui-quiet {
|
|
color: var( --color-primary );
|
|
|
|
input[ type='checkbox' ]:hover + &,
|
|
&:hover {
|
|
// Simplify quiet hover style
|
|
background-color: var( --background-color-quiet--hover );
|
|
color: var( --color-primary--hover );
|
|
}
|
|
|
|
input[ type='checkbox' ]:focus + &,
|
|
&:focus {
|
|
border-color: var( --color-primary );
|
|
color: var( --color-primary );
|
|
}
|
|
|
|
input[ type='checkbox' ]:active + &,
|
|
&:active {
|
|
border-color: var( --color-primary--active );
|
|
background-color: var( --color-primary--active );
|
|
}
|
|
}
|
|
}
|
|
|
|
&.mw-ui-destructive {
|
|
&:not( :disabled ) {
|
|
border-color: var( --color-destructive );
|
|
background-color: var( --color-destructive );
|
|
|
|
&:hover {
|
|
border-color: var( --color-destructive--hover );
|
|
background-color: var( --color-destructive--hover );
|
|
color: #fff;
|
|
}
|
|
|
|
&:focus {
|
|
box-shadow: inset 0 0 0 1px var( --color-destructive ), inset 0 0 0 2px #fff;
|
|
}
|
|
|
|
&:active,
|
|
&.is-on {
|
|
border-color: var( --color-destructive--active );
|
|
background-color: var( --color-destructive--active );
|
|
color: #fff;
|
|
}
|
|
}
|
|
|
|
&:disabled {
|
|
border-color: var( --color-surface-4 );
|
|
background-color: var( --color-surface-4 );
|
|
color: var( --color-base--subtle );
|
|
}
|
|
|
|
&.mw-ui-quiet {
|
|
color: var( --color-destructive );
|
|
|
|
input[ type='checkbox' ]:hover + &,
|
|
&:hover {
|
|
// Simplify quiet hover style
|
|
background-color: var( --background-color-quiet--hover );
|
|
color: var( --color-destructive--hover );
|
|
}
|
|
|
|
input[ type='checkbox' ]:focus + &,
|
|
&:focus {
|
|
border-color: var( --color-destructive );
|
|
color: var( --color-destructive );
|
|
}
|
|
|
|
input[ type='checkbox' ]:active + &,
|
|
&:active {
|
|
border-color: var( --color-destructive--active );
|
|
background-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-bottom-left-radius: var( --border-radius--small );
|
|
border-top-left-radius: var( --border-radius--small );
|
|
}
|
|
|
|
&:last-child {
|
|
border-bottom-right-radius: var( --border-radius--small );
|
|
border-top-right-radius: var( --border-radius--small );
|
|
}
|
|
}
|
|
}
|