mediawiki-skins-Citizen/resources/skins.citizen.preferences/skins.citizen.preferences.less
2024-04-24 20:31:16 -04:00

173 lines
3.4 KiB
Plaintext

@import '../mixins.less';
.citizen-pref {
&__button {
&[ aria-expanded='true' ] {
background-color: var( --background-color-primary--active );
}
}
&-item {
display: grid;
gap: 0.25rem;
&__label {
display: flex;
justify-content: space-between;
width: 100%;
}
&__title {
font-size: var( --font-size-x-small );
color: var( --color-base--subtle );
letter-spacing: 0.05em;
}
&__value {
font-weight: var( --font-weight-medium );
color: var( --color-base--emphasized );
}
}
// We only show min and max value
&__tickmarks {
display: flex;
justify-content: space-between;
font-size: var( --font-size-x-small );
color: var( --color-base--subtle );
}
}
#citizen-pref {
&-header {
padding: var( --space-lg ) var( --space-md ) 0;
font-size: 1rem;
font-weight: var( --font-weight-semibold );
color: var( --color-base--emphasized );
}
// TODO: unify the dropdown menu style somewhere
&-panel {
.citizen-header-card( right );
&.citizen-pref-panel--active {
.citizen-card-show;
}
fieldset {
padding: 0 var( --space-md );
margin: 0;
font-size: var( --font-size-small );
appearance: none;
border: 0;
}
> * {
opacity: 0;
}
}
&-form {
display: grid;
gap: var( --space-md );
margin: var( --space-md ) 0;
}
&-resetbutton {
width: 100%;
padding: var( --space-sm ) var( --space-md );
font-family: inherit;
font-size: var( --font-size-small );
font-weight: var( --font-weight-medium );
color: #fff;
appearance: none;
cursor: pointer;
background: var( --color-destructive );
border: 0;
border-radius: 0 0 var( --border-radius--medium ) var( --border-radius--medium );
&:hover {
background: var( --color-destructive--hover );
}
&:active {
background: var( --color-destructive--active );
}
}
}
// New clientPrefs styles
.citizen-client-prefs {
&-radio {
&__input {
// Hide radio button because we use label as button
display: none;
&:checked {
~ .citizen-client-prefs-radio__label {
border-color: var( --color-primary );
}
}
}
&__label {
display: block;
padding: var( --space-xs ) var( --space-md );
font-weight: var( --font-weight-medium );
cursor: pointer;
border: 2px solid var( --border-color-base );
border-radius: var( --border-radius--medium );
&:hover {
border-color: var( --color-primary--hover );
}
&:active {
border-color: var( --color-primary--active );
}
}
}
}
#citizen-client-prefs {
.citizen-menu {
&__content {
padding: 0 var( --space-md );
}
}
}
#skin-client-prefs-skin-theme {
form {
display: grid;
// This is not the best because it does not adapt to the text length but will revisit later
grid-template-columns: 1fr 1fr;
gap: var( --space-xxs );
text-align: center;
}
label {
background: var( --color-surface-0 );
&[ for='skin-client-pref-skin-theme-value-day' ] {
// color-base of day theme
color: ~'hsl( var( --color-primary__h ), 30%, 20% )';
// color-surface-0 of day theme
background: ~'hsl( var( --color-primary__h ), 30%, 96% )';
}
&[ for='skin-client-pref-skin-theme-value-night' ] {
// color-base of night theme
color: ~'hsl( var( --color-primary__h ), 25%, 80% )';
// color-surface-0 of night theme
background: ~'hsl( var( --color-primary__h ), 20%, 10% )';
}
}
}
@media ( hover: hover ) {
.citizen-pref:hover .citizen-pref__button .citizen-ui-icon::before {
transform: rotate3d( 0, 0, 1, 90deg );
}
}