2021-07-23 21:24:42 +00:00
|
|
|
/// ===== Root =====
|
|
|
|
/// Every HTML document using Bluelib must define a root, an element where all bluelib styles can start being applied.
|
|
|
|
/// Elements outside the root won't be styled at all, allowing Bluelib's styling to be contained in components or modules of a website.
|
|
|
|
|
2021-07-23 17:32:44 +00:00
|
|
|
@{bluelib} {
|
2021-07-19 16:21:57 +00:00
|
|
|
|
2021-07-23 21:24:42 +00:00
|
|
|
// Set the background defined in the palette
|
2021-07-19 16:21:57 +00:00
|
|
|
background-color: @hex-background;
|
2021-07-23 21:24:42 +00:00
|
|
|
|
|
|
|
// Set the base color to the foreground defined in the palette
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-foreground);
|
2021-07-23 21:24:42 +00:00
|
|
|
|
|
|
|
// By default, text should use the main font
|
2021-07-19 16:21:57 +00:00
|
|
|
.font-text();
|
|
|
|
|
2021-07-23 21:24:42 +00:00
|
|
|
/// ===== All =====
|
|
|
|
/// By default, browsers style elements with some weird rules.
|
|
|
|
/// This is an attempt to correct them, and to implement some Bluelib magic.
|
|
|
|
|
2021-03-23 21:55:35 +00:00
|
|
|
&, @{all} {
|
2021-07-23 21:24:42 +00:00
|
|
|
|
|
|
|
// Globally set the box-sizing to border-box, as content-box is completely insane
|
|
|
|
&, &::before, &::after {
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Bluelib magic!
|
|
|
|
// This rule sets the color of all text to be equal to the current .bluelib-color() at 100% opacity.
|
|
|
|
// Thanks, CSS variables!
|
2021-07-19 16:21:57 +00:00
|
|
|
color: @bA;
|
|
|
|
|
2021-01-24 03:56:06 +00:00
|
|
|
}
|
2021-01-23 22:44:06 +00:00
|
|
|
|
2021-07-23 21:24:42 +00:00
|
|
|
/// ===== Layouts =====
|
|
|
|
/// Layouts arrange the content displayed inside the root.
|
|
|
|
/// Layouts are the second element in the Bluelib hierarchy, immediately following the root.
|
|
|
|
/// Ideally, a single layout should be used per page.
|
|
|
|
|
|
|
|
// The base layout class.
|
|
|
|
@{layout} {
|
|
|
|
display: grid;
|
|
|
|
justify-content: stretch;
|
|
|
|
align-items: stretch;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
// A layout with a single container spanning the whole screen.
|
|
|
|
@{layout-fill} {
|
|
|
|
padding: 4px;
|
|
|
|
|
|
|
|
grid-template-areas:
|
|
|
|
"single";
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
grid-template-rows: 1fr;
|
|
|
|
}
|
|
|
|
|
|
|
|
@{layout-fill-single} {
|
|
|
|
grid-area: single;
|
|
|
|
}
|
|
|
|
|
|
|
|
// A layout with a centered 1024px wide main container and two symmetric containers at the sides.
|
|
|
|
@{layout-threecol} {
|
|
|
|
padding: 4px;
|
|
|
|
|
|
|
|
@media screen and (min-width: 1281px) {
|
|
|
|
grid-template-areas:
|
|
|
|
"left center right";
|
|
|
|
grid-template-columns: 1fr auto 1fr;
|
|
|
|
grid-template-rows: 1fr;
|
|
|
|
}
|
|
|
|
|
|
|
|
// If the side containers would be smaller than 128px (if the screen is narrower than 1280px), the smaller containers are moved below the main one.
|
|
|
|
@media screen and (max-width: 1280px) {
|
|
|
|
grid-template-areas:
|
|
|
|
"center center"
|
|
|
|
"left right";
|
|
|
|
grid-template-columns: 1fr 1fr;
|
|
|
|
grid-template-rows: auto auto;
|
|
|
|
|
|
|
|
// Keep the container limited to 1024px and centered
|
|
|
|
max-width: 1024px;
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@{layout-threecol-left} {
|
|
|
|
grid-area: left;
|
2021-03-23 21:55:35 +00:00
|
|
|
|
2021-07-23 21:24:42 +00:00
|
|
|
@media screen and (min-width: 1281px) {
|
|
|
|
justify-self: end;
|
|
|
|
}
|
2021-01-23 22:44:06 +00:00
|
|
|
|
2021-07-23 21:24:42 +00:00
|
|
|
@media screen and (max-width: 1280px) {
|
|
|
|
justify-self: stretch;
|
|
|
|
}
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-07-23 21:24:42 +00:00
|
|
|
@{layout-threecol-center} {
|
|
|
|
grid-area: center;
|
|
|
|
|
|
|
|
// Ensure the container doesn't eat up all the space
|
|
|
|
max-width: 1024px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@{layout-threecol-right} {
|
|
|
|
grid-area: right;
|
|
|
|
|
|
|
|
@media screen and (min-width: 1281px) {
|
|
|
|
justify-self: start;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (max-width: 1280px) {
|
|
|
|
justify-self: stretch;
|
|
|
|
}
|
|
|
|
}
|
2021-07-19 16:21:57 +00:00
|
|
|
|
2021-07-23 21:24:42 +00:00
|
|
|
/// ===== Panels =====
|
|
|
|
/// Panels are the main sectioning elements available in Bluelib.
|
|
|
|
/// Many instance of them should be present on the page!
|
|
|
|
/// They should group small amounts of tightly related content, which can be understood more or less separately from the rest of the page.
|
2021-01-23 22:44:06 +00:00
|
|
|
|
2021-07-23 21:24:42 +00:00
|
|
|
// The base panel class.
|
2021-03-20 03:10:00 +00:00
|
|
|
@{panel} {
|
2021-07-23 22:58:22 +00:00
|
|
|
// Panels have a margin to separate them from other elements
|
2021-01-23 22:44:06 +00:00
|
|
|
margin: 8px 0;
|
2021-07-23 22:58:22 +00:00
|
|
|
// And a padding to separate them from their contents
|
|
|
|
padding: 8px;
|
|
|
|
|
|
|
|
// Panels should try to fill the most space possible
|
2021-01-23 22:44:06 +00:00
|
|
|
width: 100%;
|
|
|
|
|
2021-07-23 22:58:22 +00:00
|
|
|
background-color: @b0;
|
|
|
|
border-color: @b1;
|
|
|
|
|
|
|
|
// The first and last elements of a panel should not have a margin
|
2021-07-24 08:21:09 +00:00
|
|
|
> @{all} {
|
2021-01-23 22:44:06 +00:00
|
|
|
&:first-child {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-23 22:58:22 +00:00
|
|
|
// A panel which encloses its contents with a border.
|
2021-03-20 03:10:00 +00:00
|
|
|
@{panel-box} {
|
2021-01-23 22:44:06 +00:00
|
|
|
border-radius: 4px;
|
|
|
|
border-width: 2px;
|
2021-01-24 03:56:06 +00:00
|
|
|
border-style: solid;
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-07-23 22:58:22 +00:00
|
|
|
// A panel which encloses its contents with a quote-like border.
|
2021-03-20 03:10:00 +00:00
|
|
|
@{panel-blockquote} {
|
2021-07-23 22:58:22 +00:00
|
|
|
border-radius: 4px;
|
|
|
|
border-width: 0 0 0 2px;
|
|
|
|
border-style: solid;
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-07-23 22:58:22 +00:00
|
|
|
// A panel with no border whose contents are made smaller.
|
2021-03-20 03:10:00 +00:00
|
|
|
@{panel-aside} {
|
2021-01-23 22:44:06 +00:00
|
|
|
border-width: 0;
|
|
|
|
font-size: smaller;
|
|
|
|
}
|
|
|
|
|
2021-07-24 08:21:09 +00:00
|
|
|
/// ===== Split =====
|
|
|
|
/// A split is an element which splits everything contained inside in multiple columns of equal width.
|
|
|
|
|
|
|
|
@{split} {
|
2021-01-23 22:44:06 +00:00
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
2021-07-24 08:21:09 +00:00
|
|
|
gap: 4px 8px;
|
2021-01-23 22:44:06 +00:00
|
|
|
justify-content: center;
|
|
|
|
|
2021-07-24 08:21:09 +00:00
|
|
|
> @{panel} {
|
|
|
|
// Add a horizontal margin to panels
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Allow contained elements to grow
|
2021-03-21 01:00:14 +00:00
|
|
|
> @{all} {
|
2021-01-23 22:44:06 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
flex-shrink: 0;
|
|
|
|
flex-basis: 0;
|
|
|
|
}
|
2021-07-24 08:21:09 +00:00
|
|
|
}
|
2021-01-29 03:01:08 +00:00
|
|
|
|
2021-07-24 08:21:09 +00:00
|
|
|
// Force a split to wrap
|
|
|
|
@{split-forcewrap} {
|
|
|
|
flex-grow: 0;
|
|
|
|
flex-shrink: 0;
|
|
|
|
flex-basis: 100%;
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-07-27 02:04:18 +00:00
|
|
|
/// ===== Separators =====
|
|
|
|
/// Separators are horizontal lines separating elements.
|
|
|
|
|
|
|
|
@{separator} {
|
|
|
|
border-width: 1px;
|
|
|
|
border-style: solid;
|
|
|
|
border-color: @b5;
|
|
|
|
}
|
|
|
|
|
|
|
|
@{separator-light} {
|
|
|
|
border-color: @b1;
|
|
|
|
}
|
|
|
|
|
|
|
|
@{separator-heavy} {
|
|
|
|
border-color: @bA;
|
|
|
|
}
|
|
|
|
|
2021-07-27 13:04:30 +00:00
|
|
|
/// ===== Images =====
|
2021-07-27 01:20:42 +00:00
|
|
|
/// Images are changed to block elements and are automatically centered.
|
2021-07-23 02:11:20 +00:00
|
|
|
|
|
|
|
@{image} {
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
|
|
|
|
|
|
|
object-fit: contain;
|
|
|
|
}
|
|
|
|
|
2021-07-27 13:09:37 +00:00
|
|
|
@{image-limit-half} {
|
|
|
|
max-height: max(28.2vw, 50vh);
|
|
|
|
}
|
|
|
|
|
|
|
|
@{image-limit-quarter} {
|
|
|
|
max-height: max(14.1vw, 25vh);
|
2021-07-23 02:11:20 +00:00
|
|
|
}
|
|
|
|
|
2021-07-27 02:04:18 +00:00
|
|
|
/// ===== Forms =====
|
2021-07-27 01:20:42 +00:00
|
|
|
/// Forms are containers where interactable elements are contained.
|
|
|
|
/// Every interactable is split in two parts: a label on the left and the control on the right
|
|
|
|
///
|
|
|
|
/// Example:
|
|
|
|
///
|
|
|
|
/// Username | Steffo
|
|
|
|
/// Email | ste.pigozzi@gmail.com
|
|
|
|
/// Password | ············
|
|
|
|
/// Country | Italy ↓
|
|
|
|
///
|
|
|
|
/// [Submit]
|
2021-07-19 16:21:57 +00:00
|
|
|
|
|
|
|
@{form} {
|
|
|
|
display: grid;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
row-gap: 4px;
|
|
|
|
column-gap: 8px;
|
|
|
|
|
2021-07-27 01:20:42 +00:00
|
|
|
// Labels should have the greater width between the one they require and 1/6 of the form width.
|
2021-07-19 16:21:57 +00:00
|
|
|
grid-template-columns: minmax(auto, 1fr) 5fr;
|
|
|
|
}
|
|
|
|
|
|
|
|
@{form-label} {
|
2021-07-27 01:20:42 +00:00
|
|
|
// Labels are on the left column of the grid
|
2021-07-19 16:21:57 +00:00
|
|
|
grid-column: 1;
|
2021-07-27 01:20:42 +00:00
|
|
|
// They should be right-aligned
|
2021-07-19 16:21:57 +00:00
|
|
|
justify-self: end;
|
2021-07-27 01:20:42 +00:00
|
|
|
text-align: right;
|
2021-07-19 16:21:57 +00:00
|
|
|
}
|
|
|
|
|
2021-07-23 13:39:02 +00:00
|
|
|
@{form-input} {
|
2021-07-27 01:20:42 +00:00
|
|
|
// Inputs are on the right column of the grid
|
2021-07-19 16:21:57 +00:00
|
|
|
grid-column: 2;
|
2021-07-27 01:20:42 +00:00
|
|
|
// They should occupy all the available space
|
2021-07-19 16:21:57 +00:00
|
|
|
justify-self: stretch;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
2021-07-27 01:20:42 +00:00
|
|
|
// An element filling a whole row of a form
|
|
|
|
// Useful for adding buttons or similar flow interruptions
|
|
|
|
@{form-row} {
|
2021-07-19 16:21:57 +00:00
|
|
|
grid-column-start: 1;
|
|
|
|
grid-column-end: 3;
|
|
|
|
|
|
|
|
display: flex;
|
2021-07-19 19:08:44 +00:00
|
|
|
gap: 8px;
|
2021-07-19 16:21:57 +00:00
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
margin-top: 8px;
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
2021-03-22 15:28:15 +00:00
|
|
|
|
2021-07-27 02:04:18 +00:00
|
|
|
/// ===== Buttons =====
|
|
|
|
/// Buttons are clickable elements which should trigger an action when clicked.
|
|
|
|
/// Their contents are elements containing either an icon or text, or possibly both.
|
2021-03-22 15:28:15 +00:00
|
|
|
|
|
|
|
@{button} {
|
2021-07-27 02:04:18 +00:00
|
|
|
// Buttons are rendered as inline elements, but should arrange their contents as if they were flex
|
2021-03-22 15:28:15 +00:00
|
|
|
display: inline-flex;
|
2021-07-27 02:04:18 +00:00
|
|
|
|
|
|
|
// Center the button contents both vertically and horizontally
|
2021-03-22 15:28:15 +00:00
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
|
2021-07-27 02:04:18 +00:00
|
|
|
// Disable the operating system appearance for the button
|
|
|
|
appearance: none;
|
|
|
|
|
|
|
|
// Button properties should be set explicitly, as otherwise every browser will display them in a different manner
|
2021-07-19 16:21:57 +00:00
|
|
|
background-color: @bA;
|
2021-07-27 02:04:18 +00:00
|
|
|
color: @hex-away;
|
2021-03-22 15:28:15 +00:00
|
|
|
border: none;
|
|
|
|
padding: 6px 16px;
|
|
|
|
border-radius: 4px;
|
|
|
|
font-family: inherit;
|
|
|
|
font-size: inherit;
|
|
|
|
|
2021-07-27 02:04:18 +00:00
|
|
|
// Buttons should display a pointer cursor
|
2021-03-22 15:28:15 +00:00
|
|
|
cursor: pointer;
|
|
|
|
|
2021-07-23 01:50:31 +00:00
|
|
|
&:hover {
|
2021-07-27 02:04:18 +00:00
|
|
|
// Hovered buttons should provide feedback
|
2021-07-19 16:21:57 +00:00
|
|
|
background-color: @bC;
|
2021-03-22 15:28:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
2021-07-27 02:04:18 +00:00
|
|
|
// Activated buttons should provide greater feedback
|
2021-07-19 16:21:57 +00:00
|
|
|
background-color: @bF;
|
2021-03-22 15:28:15 +00:00
|
|
|
}
|
2021-03-23 16:12:13 +00:00
|
|
|
|
2021-07-27 02:04:18 +00:00
|
|
|
// Disabled buttons shouldn't do anything
|
2021-03-23 16:12:13 +00:00
|
|
|
&@{status-disabled} {
|
2021-07-23 01:50:31 +00:00
|
|
|
&:hover {
|
2021-07-19 16:21:57 +00:00
|
|
|
background-color: @bA;
|
2021-03-23 16:12:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
2021-07-19 16:21:57 +00:00
|
|
|
background-color: @bA;
|
2021-03-23 16:12:13 +00:00
|
|
|
}
|
|
|
|
}
|
2021-07-27 02:04:18 +00:00
|
|
|
|
|
|
|
// If using keyboard navigation, display an outline to make the focused button more evident
|
|
|
|
&:focus-visible {
|
|
|
|
outline: 4px solid @b7 !important;
|
|
|
|
}
|
2021-03-22 15:28:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@{button-fill-width} {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
@{button-toggle} {
|
|
|
|
padding: 4px 14px;
|
|
|
|
border-width: 2px;
|
|
|
|
border-style: solid;
|
2021-03-23 16:18:02 +00:00
|
|
|
|
2021-07-17 01:23:58 +00:00
|
|
|
&@{status-disabled} {
|
2021-03-23 16:18:02 +00:00
|
|
|
border-style: dashed;
|
|
|
|
}
|
2021-03-22 15:28:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@{button-toggle-off} {
|
2021-07-19 16:21:57 +00:00
|
|
|
border-color: @bA;
|
|
|
|
color: @bA;
|
|
|
|
background-color: @b0;
|
2021-03-22 15:28:15 +00:00
|
|
|
|
|
|
|
&:hover {
|
2021-07-19 16:21:57 +00:00
|
|
|
border-color: @bC;
|
|
|
|
color: @bC;
|
|
|
|
background-color: @b1;
|
2021-03-22 15:28:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
2021-07-19 16:21:57 +00:00
|
|
|
border-color: @bF;
|
|
|
|
color: @bF;
|
|
|
|
background-color: @b2;
|
2021-03-22 15:28:15 +00:00
|
|
|
}
|
2021-03-23 16:12:13 +00:00
|
|
|
|
|
|
|
&@{status-disabled} {
|
|
|
|
border-style: dashed;
|
|
|
|
|
|
|
|
&:hover {
|
2021-07-19 16:21:57 +00:00
|
|
|
border-color: @bA;
|
|
|
|
color: @bA;
|
|
|
|
background-color: @b0;
|
2021-03-23 16:12:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
2021-07-19 16:21:57 +00:00
|
|
|
border-color: @bA;
|
|
|
|
color: @bA;
|
|
|
|
background-color: @b0;
|
2021-03-23 16:12:13 +00:00
|
|
|
}
|
|
|
|
}
|
2021-03-22 15:28:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@{button-toggle-on} {
|
2021-07-19 16:21:57 +00:00
|
|
|
border-color: @bF;
|
|
|
|
color: @bF;
|
|
|
|
background-color: @b2;
|
2021-03-22 15:28:15 +00:00
|
|
|
|
|
|
|
&:hover {
|
2021-07-19 16:21:57 +00:00
|
|
|
border-color: @bC;
|
|
|
|
color: @bC;
|
|
|
|
background-color: @b1;
|
2021-03-22 15:28:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
2021-07-19 16:21:57 +00:00
|
|
|
border-color: @bA;
|
|
|
|
color: @bA;
|
|
|
|
background-color: @b0;
|
2021-03-22 15:28:15 +00:00
|
|
|
}
|
2021-03-23 16:12:13 +00:00
|
|
|
|
|
|
|
&@{status-disabled} {
|
|
|
|
border-style: dashed;
|
|
|
|
|
|
|
|
&:hover {
|
2021-07-19 16:21:57 +00:00
|
|
|
border-color: @bF;
|
|
|
|
color: @bF;
|
|
|
|
background-color: @b2;
|
2021-03-23 16:12:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
2021-07-19 16:21:57 +00:00
|
|
|
border-color: @bF;
|
|
|
|
color: @bF;
|
|
|
|
background-color: @b2;
|
2021-03-23 16:12:13 +00:00
|
|
|
}
|
|
|
|
}
|
2021-03-22 15:28:15 +00:00
|
|
|
}
|
|
|
|
|
2021-07-19 16:21:57 +00:00
|
|
|
// --- Inputs ---
|
|
|
|
|
2021-07-23 17:25:27 +00:00
|
|
|
@{input} {
|
2021-07-19 16:21:57 +00:00
|
|
|
border-style: solid;
|
|
|
|
border-color: @b3;
|
|
|
|
color: @bA;
|
|
|
|
background-color: @b0;
|
|
|
|
|
2021-07-23 17:25:27 +00:00
|
|
|
font-family: inherit;
|
|
|
|
font-size: inherit;
|
|
|
|
|
2021-07-23 01:01:04 +00:00
|
|
|
&::placeholder {
|
|
|
|
color: @b4;
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
2021-07-23 17:25:27 +00:00
|
|
|
&:optional, &:optional::placeholder {
|
2021-07-23 00:57:25 +00:00
|
|
|
font-style: italic;
|
|
|
|
}
|
|
|
|
|
2021-07-23 17:25:27 +00:00
|
|
|
// &:valid:not(:placeholder-shown) {
|
|
|
|
// .bluelib-color(@hex-lime);
|
|
|
|
// }
|
|
|
|
|
2021-07-23 00:57:25 +00:00
|
|
|
&:invalid:not(:placeholder-shown) {
|
|
|
|
.bluelib-color(@hex-red);
|
|
|
|
}
|
|
|
|
|
2021-07-19 16:21:57 +00:00
|
|
|
&:hover, &:focus {
|
|
|
|
border-color: @b6;
|
|
|
|
color: @bF;
|
|
|
|
background-color: @b1;
|
2021-07-23 01:01:04 +00:00
|
|
|
|
|
|
|
&::placeholder {
|
|
|
|
color: @b7;
|
|
|
|
}
|
2021-07-19 16:21:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&@{status-disabled} {
|
|
|
|
border-style: dashed;
|
|
|
|
|
|
|
|
&:hover, &:focus {
|
|
|
|
border-color: @b3;
|
|
|
|
color: @bA;
|
|
|
|
background-color: @b0;
|
2021-07-23 01:01:04 +00:00
|
|
|
|
|
|
|
&::placeholder {
|
|
|
|
color: @b4;
|
|
|
|
}
|
2021-07-19 16:21:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-07-17 01:23:58 +00:00
|
|
|
|
2021-07-23 17:25:27 +00:00
|
|
|
@{input-field} {
|
|
|
|
cursor: text;
|
|
|
|
|
|
|
|
border-width: 0 0 2px 0;
|
|
|
|
border-radius: 4px 4px 0 0;
|
|
|
|
padding: 4px 6px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@{input-select}, @{input-multiselect} {
|
|
|
|
// Browsers add 4px of unremovable horizontal padding to options for some reason
|
|
|
|
padding: 4px 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@{input-select-option}, @{input-multiselect-option} {
|
|
|
|
font-weight: normal;
|
|
|
|
color: @bA;
|
|
|
|
|
|
|
|
padding: 4px 4px;
|
|
|
|
|
|
|
|
// TODO: style checked elements, when it will be possible
|
|
|
|
}
|
|
|
|
|
|
|
|
@{input-select-optgroup}, @{input-multiselect-optgroup} {
|
|
|
|
font-weight: bold;
|
|
|
|
color: @hex-accent;
|
|
|
|
|
|
|
|
padding: 4px 4px;
|
|
|
|
|
|
|
|
@{input-select-option}, @{input-multiselect-option} {
|
|
|
|
padding: 4px 20px;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@{input-select-optgroup}, @{input-select-option}, @{input-multiselect-optgroup}, @{input-multiselect-option} {
|
|
|
|
font-family: inherit;
|
|
|
|
font-size: inherit;
|
|
|
|
font-style: inherit;
|
|
|
|
}
|
|
|
|
|
|
|
|
@{input-select} {
|
|
|
|
cursor: context-menu;
|
|
|
|
|
|
|
|
border-width: 0 0 2px 0;
|
|
|
|
border-radius: 4px 4px 0 0;
|
|
|
|
|
|
|
|
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
|
|
|
@{input-select-option}, @{input-select-optgroup} {
|
|
|
|
background-color: @hex-background;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@{input-multiselect} {
|
|
|
|
cursor: vertical-text;
|
2021-07-23 13:39:02 +00:00
|
|
|
|
2021-07-23 17:25:27 +00:00
|
|
|
border-width: 0 0 0 2px;
|
|
|
|
border-radius: 0 4px 4px 0;
|
2021-07-23 13:39:02 +00:00
|
|
|
}
|
|
|
|
|
2021-03-23 16:14:26 +00:00
|
|
|
// --- Element status ---
|
|
|
|
|
|
|
|
@{status-hoverable} {
|
|
|
|
cursor: help;
|
|
|
|
}
|
|
|
|
|
|
|
|
@{status-clickable} {
|
|
|
|
cursor: pointer;
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-03-23 16:28:42 +00:00
|
|
|
@{status-disabled} {
|
|
|
|
cursor: not-allowed !important;
|
|
|
|
opacity: 50%;
|
|
|
|
}
|
|
|
|
|
2021-01-23 22:44:06 +00:00
|
|
|
// --- Elements ---
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{element-title} {
|
|
|
|
text-align: center;
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-accent);
|
|
|
|
.font-title();
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{element-paragraph} {
|
2021-01-23 22:44:06 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{element-list-item} {
|
2021-01-23 22:44:06 +00:00
|
|
|
margin: 10px 0;
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{element-anchor} {
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-link);
|
2021-07-23 01:10:33 +00:00
|
|
|
text-decoration-line: underline;
|
|
|
|
text-decoration-style: solid;
|
|
|
|
text-decoration-color: currentColor;
|
|
|
|
text-decoration-thickness: 1px;
|
2021-07-19 16:21:57 +00:00
|
|
|
|
2021-07-23 01:41:20 +00:00
|
|
|
&:hover, &:focus {
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-link-hover);
|
|
|
|
}
|
|
|
|
|
2021-07-23 01:41:20 +00:00
|
|
|
&:focus-visible {
|
|
|
|
text-decoration-thickness: 2px;
|
|
|
|
}
|
|
|
|
|
2021-07-19 16:21:57 +00:00
|
|
|
&:active {
|
|
|
|
.bluelib-color(@hex-link-active);
|
|
|
|
}
|
|
|
|
|
|
|
|
&@{status-disabled} {
|
|
|
|
text-decoration-style: dashed;
|
|
|
|
|
2021-07-23 01:41:20 +00:00
|
|
|
&:hover, &:focus {
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-link);
|
|
|
|
}
|
2021-01-24 03:50:18 +00:00
|
|
|
|
2021-07-19 16:21:57 +00:00
|
|
|
&:active {
|
|
|
|
.bluelib-color(@hex-link);
|
|
|
|
}
|
|
|
|
}
|
2021-01-24 03:50:18 +00:00
|
|
|
}
|
|
|
|
|
2021-01-23 22:44:06 +00:00
|
|
|
// --- Alignment ---
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{align-left} {
|
2021-01-23 22:44:06 +00:00
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{align-center} {
|
2021-01-23 22:44:06 +00:00
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{align-right} {
|
2021-01-23 22:44:06 +00:00
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
|
|
|
|
// --- Sizes ---
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{size-xxl} {
|
2021-01-23 22:44:06 +00:00
|
|
|
font-size: xx-large;
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{size-xl} {
|
2021-01-23 22:44:06 +00:00
|
|
|
font-size: x-large;
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{size-l} {
|
2021-01-23 22:44:06 +00:00
|
|
|
font-size: large;
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{size-m} {
|
2021-01-23 22:44:06 +00:00
|
|
|
font-size: medium;
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{size-s} {
|
2021-01-23 22:44:06 +00:00
|
|
|
font-size: small;
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{size-xs} {
|
2021-01-23 22:44:06 +00:00
|
|
|
font-size: x-small;
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{size-xxs} {
|
2021-01-23 22:44:06 +00:00
|
|
|
font-size: xx-small;
|
|
|
|
}
|
|
|
|
|
|
|
|
// --- Styles ---
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{style-bold} {
|
2021-01-23 22:44:06 +00:00
|
|
|
font-weight: bold;
|
2021-07-23 00:28:33 +00:00
|
|
|
.bluelib-color(@hex-accent);
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{style-italic} {
|
2021-01-23 22:44:06 +00:00
|
|
|
font-style: italic;
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{style-underline} {
|
2021-01-23 22:44:06 +00:00
|
|
|
text-decoration-line: underline;
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{style-strike} {
|
2021-01-23 22:44:06 +00:00
|
|
|
text-decoration-line: line-through;
|
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{style-monospace} {
|
2021-07-19 16:21:57 +00:00
|
|
|
.font-code();
|
2021-01-24 03:50:18 +00:00
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{style-keyboard} {
|
2021-07-19 16:21:57 +00:00
|
|
|
.font-code();
|
2021-03-23 21:55:35 +00:00
|
|
|
padding: 2px 4px;
|
2021-03-20 03:10:00 +00:00
|
|
|
border: 2px outset;
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
|
2021-01-23 22:44:06 +00:00
|
|
|
// --- Colors ---
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{color-red} {
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-red)
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{color-orange} {
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-orange)
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{color-yellow} {
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-yellow)
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{color-lime} {
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-lime)
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{color-cyan} {
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-cyan)
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{color-blue} {
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-blue)
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
|
|
|
|
2021-03-20 03:10:00 +00:00
|
|
|
@{color-magenta} {
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-magenta)
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
2021-03-20 03:10:00 +00:00
|
|
|
|
|
|
|
@{color-gray} {
|
2021-07-19 16:21:57 +00:00
|
|
|
.bluelib-color(@hex-gray)
|
2021-03-20 03:10:00 +00:00
|
|
|
}
|
2021-01-23 22:44:06 +00:00
|
|
|
}
|
2021-03-20 03:10:00 +00:00
|
|
|
|