2019-08-15 17:40:13 +00:00
|
|
|
/*
|
|
|
|
* Citizen - Mixins
|
|
|
|
* https://starcitizen.tools
|
|
|
|
*/
|
|
|
|
|
2021-07-25 23:16:05 +00:00
|
|
|
.citizen-card( @border-radius: true ) {
|
|
|
|
background-color: var( --color-surface-1 );
|
2022-04-24 19:24:09 +00:00
|
|
|
box-shadow: var( --box-shadow-dialog );
|
2021-07-25 23:16:05 +00:00
|
|
|
|
|
|
|
& when ( @border-radius ) {
|
|
|
|
border-radius: var( --border-radius--medium );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-08-15 17:40:13 +00:00
|
|
|
// To hide objects, but keep them accessible for screen-readers
|
|
|
|
.hidden() {
|
|
|
|
position: absolute;
|
|
|
|
top: -9999px;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Set content to be at the center
|
|
|
|
.content-center() {
|
2021-01-16 21:14:04 +00:00
|
|
|
max-width: var( --width-layout );
|
2019-08-15 17:40:13 +00:00
|
|
|
margin-right: auto;
|
2021-01-11 16:45:52 +00:00
|
|
|
margin-left: auto;
|
2019-08-15 17:40:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Prepare for RL icons
|
|
|
|
.resource-loader-icon-link() {
|
2021-01-11 16:45:52 +00:00
|
|
|
display: block;
|
2019-08-15 17:40:13 +00:00
|
|
|
width: @icon-box-size;
|
|
|
|
height: @icon-box-size;
|
|
|
|
}
|
|
|
|
|
|
|
|
.resource-loader-icon-link-small() {
|
2021-01-11 16:45:52 +00:00
|
|
|
display: block;
|
2019-08-15 17:40:13 +00:00
|
|
|
width: @icon-size;
|
|
|
|
height: @icon-size;
|
|
|
|
}
|
|
|
|
|
|
|
|
.resource-loader-icon() {
|
|
|
|
position: absolute;
|
|
|
|
width: inherit;
|
|
|
|
height: inherit;
|
|
|
|
background-position: center;
|
2021-01-11 16:45:52 +00:00
|
|
|
background-repeat: no-repeat;
|
|
|
|
content: '';
|
2019-08-15 17:40:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.resource-loader-menu-icon() {
|
|
|
|
position: absolute;
|
|
|
|
width: @icon-box-size;
|
|
|
|
height: @icon-box-size;
|
|
|
|
background-position: center;
|
2021-01-11 16:45:52 +00:00
|
|
|
background-repeat: no-repeat;
|
|
|
|
content: '';
|
2019-08-15 17:40:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.resource-loader-list-icon() {
|
|
|
|
position: relative;
|
|
|
|
width: @icon-size;
|
|
|
|
height: @icon-size;
|
2021-01-11 16:45:52 +00:00
|
|
|
flex-shrink: 0;
|
|
|
|
align-self: center;
|
2019-08-15 17:40:13 +00:00
|
|
|
background-position: center;
|
2021-01-11 16:45:52 +00:00
|
|
|
background-repeat: no-repeat;
|
2021-01-28 17:59:24 +00:00
|
|
|
background-size: contain;
|
2021-01-11 16:45:52 +00:00
|
|
|
content: '';
|
2019-08-15 17:40:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.menu-item-link() {
|
|
|
|
display: flex;
|
2021-01-12 19:31:35 +00:00
|
|
|
color: var( --color-base ) !important;
|
|
|
|
font-weight: 450;
|
2019-08-15 17:40:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.menu-item-link-hover() {
|
2021-01-12 22:03:52 +00:00
|
|
|
background-color: var( --background-color-primary--hover );
|
2019-08-15 17:40:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.menu-item-link-active() {
|
2021-01-12 22:03:52 +00:00
|
|
|
background-color: var( --background-color-primary--active );
|
2019-08-15 17:40:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Button Styles
|
|
|
|
.button-blue() {
|
2021-01-19 20:56:42 +00:00
|
|
|
background-color: var( --color-primary );
|
|
|
|
color: #fff !important;
|
2019-08-15 17:40:13 +00:00
|
|
|
transition: @transition-background-quick, @transition-color-quick;
|
|
|
|
}
|
|
|
|
|
2021-01-19 20:56:42 +00:00
|
|
|
.button-blue-hover() {
|
|
|
|
background-color: var( --color-primary--hover );
|
|
|
|
}
|
|
|
|
|
2019-08-15 17:40:13 +00:00
|
|
|
.button-blue-active() {
|
2021-01-19 20:56:42 +00:00
|
|
|
background-color: var( --color-primary--active );
|
2019-08-15 17:40:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.button-red() {
|
2021-01-19 20:56:42 +00:00
|
|
|
background-color: var( --color-destructive );
|
|
|
|
color: #fff !important;
|
2019-08-15 17:40:13 +00:00
|
|
|
transition: @transition-background-quick, @transition-color-quick;
|
|
|
|
}
|
|
|
|
|
2021-01-19 20:56:42 +00:00
|
|
|
.button-red-hover() {
|
|
|
|
background-color: var( --color-destructive--hover );
|
|
|
|
}
|
|
|
|
|
2019-08-15 17:40:13 +00:00
|
|
|
.button-red-active() {
|
2021-01-19 20:56:42 +00:00
|
|
|
background-color: var( --color-destructive--active );
|
2019-08-15 17:40:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Gradient overflow
|
|
|
|
.gradient-overflow(@position) {
|
|
|
|
position: fixed;
|
|
|
|
z-index: 3;
|
|
|
|
width: 100%;
|
|
|
|
height: @margin-side * 2;
|
|
|
|
background: @position;
|
2021-01-11 16:45:52 +00:00
|
|
|
content: '';
|
2019-08-15 17:40:13 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 06:31:15 +00:00
|
|
|
// Borrowed from Mediawiki core 1.35
|
|
|
|
// “Clearfix Reloaded” Mixin
|
|
|
|
// The mixin is used on a container with floating children.
|
|
|
|
// Margin collapsing is a feature, not a bug, hence relying on `display: block` as default.
|
|
|
|
// With `.mixin-clearfix( @collapse: false; );` you call it to let `margin`s not collapse.
|
|
|
|
// See https://www.cssmojo.com/the-very-latest-clearfix-reloaded/
|
|
|
|
// In future we might replace the `&:after` pseudo-element with
|
|
|
|
// `display: flow-root;` altogether.
|
|
|
|
// Support: Firefox 3.5+, Safari 4+, Chrome, Opera 15+, IE 8+
|
|
|
|
.mixin-clearfix( @collapse: true ) {
|
|
|
|
&:after {
|
|
|
|
clear: both;
|
|
|
|
// Margin collapsing as feature. Apply it.
|
|
|
|
& when ( @collapse ) {
|
|
|
|
display: block;
|
2021-01-11 16:45:52 +00:00
|
|
|
content: '';
|
2020-07-04 06:31:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// Margin collapsing as bug. Prevent it.
|
|
|
|
& when not ( @collapse ) {
|
|
|
|
&:before,
|
|
|
|
&:after {
|
|
|
|
display: table;
|
2021-01-11 16:45:52 +00:00
|
|
|
content: '';
|
2020-07-04 06:31:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|