mirror of
https://github.com/Steffo99/bluelib.git
synced 2025-01-03 00:54:20 +00:00
🔧 Refactor .status-*
and revert @all
changes
This commit is contained in:
parent
a5c3840f73
commit
3e81a2c0e0
10 changed files with 123 additions and 92 deletions
35
src/rules/skeleton.less
vendored
35
src/rules/skeleton.less
vendored
|
@ -234,6 +234,26 @@
|
||||||
max-height: max(14.1vw, 25vh);
|
max-height: max(14.1vw, 25vh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// ===== Status =====
|
||||||
|
/// Statuses are classes that can be applied to elements to indicate that special interactions are available
|
||||||
|
|
||||||
|
@{status-hoverable} {
|
||||||
|
cursor: help;
|
||||||
|
}
|
||||||
|
|
||||||
|
@{status-clickable} {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
@{status-disabled} {
|
||||||
|
opacity: 50%;
|
||||||
|
|
||||||
|
// All sub-elements of a disabled element should have a not-allowed cursor
|
||||||
|
&, @{all} {
|
||||||
|
cursor: not-allowed !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// ===== Forms =====
|
/// ===== Forms =====
|
||||||
/// Forms are containers where interactable elements are contained.
|
/// 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
|
/// Every interactable is split in two parts: a label on the left and the control on the right
|
||||||
|
@ -542,21 +562,6 @@
|
||||||
border-radius: 0 4px 4px 0;
|
border-radius: 0 4px 4px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Element status ---
|
|
||||||
|
|
||||||
@{status-hoverable} {
|
|
||||||
cursor: help;
|
|
||||||
}
|
|
||||||
|
|
||||||
@{status-clickable} {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
@{status-disabled} {
|
|
||||||
cursor: not-allowed !important;
|
|
||||||
opacity: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- Elements ---
|
// --- Elements ---
|
||||||
|
|
||||||
@{element-title} {
|
@{element-title} {
|
||||||
|
|
|
@ -141,18 +141,18 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
.bluelib,
|
.bluelib,
|
||||||
.bluelib .bluelib *,
|
.bluelib *,
|
||||||
.bluelib .all {
|
.bluelib .all {
|
||||||
color: rgba(var(--bluelib-color-r), var(--bluelib-color-g), var(--bluelib-color-b), 1);
|
color: rgba(var(--bluelib-color-r), var(--bluelib-color-g), var(--bluelib-color-b), 1);
|
||||||
}
|
}
|
||||||
.bluelib,
|
.bluelib,
|
||||||
.bluelib .bluelib *,
|
.bluelib *,
|
||||||
.bluelib .all,
|
.bluelib .all,
|
||||||
.bluelib::before,
|
.bluelib::before,
|
||||||
.bluelib .bluelib *::before,
|
.bluelib *::before,
|
||||||
.bluelib .all::before,
|
.bluelib .all::before,
|
||||||
.bluelib::after,
|
.bluelib::after,
|
||||||
.bluelib .bluelib *::after,
|
.bluelib *::after,
|
||||||
.bluelib .all::after {
|
.bluelib .all::after {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
@ -228,11 +228,11 @@
|
||||||
background-color: rgba(var(--bluelib-color-r), var(--bluelib-color-g), var(--bluelib-color-b), 0.025);
|
background-color: rgba(var(--bluelib-color-r), var(--bluelib-color-g), var(--bluelib-color-b), 0.025);
|
||||||
border-color: rgba(var(--bluelib-color-r), var(--bluelib-color-g), var(--bluelib-color-b), 0.1);
|
border-color: rgba(var(--bluelib-color-r), var(--bluelib-color-g), var(--bluelib-color-b), 0.1);
|
||||||
}
|
}
|
||||||
.bluelib .panel > .bluelib *:first-child,
|
.bluelib .panel > *:first-child,
|
||||||
.bluelib .panel .all:first-child {
|
.bluelib .panel .all:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
.bluelib .panel > .bluelib *:last-child,
|
.bluelib .panel > *:last-child,
|
||||||
.bluelib .panel .all:last-child {
|
.bluelib .panel .all:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@
|
||||||
.bluelib .split > .panel {
|
.bluelib .split > .panel {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.bluelib .split > .bluelib *,
|
.bluelib .split > *,
|
||||||
.bluelib .split .all {
|
.bluelib .split .all {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
@ -295,6 +295,20 @@
|
||||||
.bluelib .image-limit-quarter {
|
.bluelib .image-limit-quarter {
|
||||||
max-height: max(14.1vw, 25vh);
|
max-height: max(14.1vw, 25vh);
|
||||||
}
|
}
|
||||||
|
.bluelib .status-hoverable {
|
||||||
|
cursor: help;
|
||||||
|
}
|
||||||
|
.bluelib .status-clickable {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.bluelib .status-disabled {
|
||||||
|
opacity: 50%;
|
||||||
|
}
|
||||||
|
.bluelib .status-disabled,
|
||||||
|
.bluelib .status-disabled *,
|
||||||
|
.bluelib .status-disabled .all {
|
||||||
|
cursor: not-allowed !important;
|
||||||
|
}
|
||||||
.bluelib .form {
|
.bluelib .form {
|
||||||
display: grid;
|
display: grid;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -521,16 +535,6 @@
|
||||||
border-width: 0 0 0 2px;
|
border-width: 0 0 0 2px;
|
||||||
border-radius: 0 4px 4px 0;
|
border-radius: 0 4px 4px 0;
|
||||||
}
|
}
|
||||||
.bluelib .status-hoverable {
|
|
||||||
cursor: help;
|
|
||||||
}
|
|
||||||
.bluelib .status-clickable {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.bluelib .status-disabled {
|
|
||||||
cursor: not-allowed !important;
|
|
||||||
opacity: 50%;
|
|
||||||
}
|
|
||||||
.bluelib .element-title {
|
.bluelib .element-title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
--bluelib-color-r: 24;
|
--bluelib-color-r: 24;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -383,6 +383,34 @@ body .image-limit-quarter,
|
||||||
.bluelib .image-limit-quarter {
|
.bluelib .image-limit-quarter {
|
||||||
max-height: max(14.1vw, 25vh);
|
max-height: max(14.1vw, 25vh);
|
||||||
}
|
}
|
||||||
|
body [title],
|
||||||
|
.bluelib [title],
|
||||||
|
body .status-hoverable,
|
||||||
|
.bluelib .status-hoverable {
|
||||||
|
cursor: help;
|
||||||
|
}
|
||||||
|
body [onclick],
|
||||||
|
.bluelib [onclick],
|
||||||
|
body .status-clickable,
|
||||||
|
.bluelib .status-clickable {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
body [disabled],
|
||||||
|
.bluelib [disabled],
|
||||||
|
body .status-disabled,
|
||||||
|
.bluelib .status-disabled {
|
||||||
|
opacity: 50%;
|
||||||
|
}
|
||||||
|
body [disabled],
|
||||||
|
.bluelib [disabled],
|
||||||
|
body .status-disabled,
|
||||||
|
.bluelib .status-disabled,
|
||||||
|
body [disabled] *,
|
||||||
|
.bluelib [disabled] *,
|
||||||
|
body .status-disabled *,
|
||||||
|
.bluelib .status-disabled * {
|
||||||
|
cursor: not-allowed !important;
|
||||||
|
}
|
||||||
body form,
|
body form,
|
||||||
.bluelib form,
|
.bluelib form,
|
||||||
body .form,
|
body .form,
|
||||||
|
@ -939,25 +967,6 @@ body .input-multiselect,
|
||||||
border-width: 0 0 0 2px;
|
border-width: 0 0 0 2px;
|
||||||
border-radius: 0 4px 4px 0;
|
border-radius: 0 4px 4px 0;
|
||||||
}
|
}
|
||||||
body [title],
|
|
||||||
.bluelib [title],
|
|
||||||
body .status-hoverable,
|
|
||||||
.bluelib .status-hoverable {
|
|
||||||
cursor: help;
|
|
||||||
}
|
|
||||||
body [onclick],
|
|
||||||
.bluelib [onclick],
|
|
||||||
body .status-clickable,
|
|
||||||
.bluelib .status-clickable {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
body [disabled],
|
|
||||||
.bluelib [disabled],
|
|
||||||
body .status-disabled,
|
|
||||||
.bluelib .status-disabled {
|
|
||||||
cursor: not-allowed !important;
|
|
||||||
opacity: 50%;
|
|
||||||
}
|
|
||||||
body .element-title,
|
body .element-title,
|
||||||
.bluelib .element-title,
|
.bluelib .element-title,
|
||||||
body h1,
|
body h1,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -141,18 +141,18 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
.bluelib,
|
.bluelib,
|
||||||
.bluelib .bluelib *,
|
.bluelib *,
|
||||||
.bluelib .all {
|
.bluelib .all {
|
||||||
color: rgba(var(--bluelib-color-r), var(--bluelib-color-g), var(--bluelib-color-b), 1);
|
color: rgba(var(--bluelib-color-r), var(--bluelib-color-g), var(--bluelib-color-b), 1);
|
||||||
}
|
}
|
||||||
.bluelib,
|
.bluelib,
|
||||||
.bluelib .bluelib *,
|
.bluelib *,
|
||||||
.bluelib .all,
|
.bluelib .all,
|
||||||
.bluelib::before,
|
.bluelib::before,
|
||||||
.bluelib .bluelib *::before,
|
.bluelib *::before,
|
||||||
.bluelib .all::before,
|
.bluelib .all::before,
|
||||||
.bluelib::after,
|
.bluelib::after,
|
||||||
.bluelib .bluelib *::after,
|
.bluelib *::after,
|
||||||
.bluelib .all::after {
|
.bluelib .all::after {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
@ -228,11 +228,11 @@
|
||||||
background-color: rgba(var(--bluelib-color-r), var(--bluelib-color-g), var(--bluelib-color-b), 0.025);
|
background-color: rgba(var(--bluelib-color-r), var(--bluelib-color-g), var(--bluelib-color-b), 0.025);
|
||||||
border-color: rgba(var(--bluelib-color-r), var(--bluelib-color-g), var(--bluelib-color-b), 0.1);
|
border-color: rgba(var(--bluelib-color-r), var(--bluelib-color-g), var(--bluelib-color-b), 0.1);
|
||||||
}
|
}
|
||||||
.bluelib .panel > .bluelib *:first-child,
|
.bluelib .panel > *:first-child,
|
||||||
.bluelib .panel .all:first-child {
|
.bluelib .panel .all:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
.bluelib .panel > .bluelib *:last-child,
|
.bluelib .panel > *:last-child,
|
||||||
.bluelib .panel .all:last-child {
|
.bluelib .panel .all:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@
|
||||||
.bluelib .split > .panel {
|
.bluelib .split > .panel {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.bluelib .split > .bluelib *,
|
.bluelib .split > *,
|
||||||
.bluelib .split .all {
|
.bluelib .split .all {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
@ -295,6 +295,20 @@
|
||||||
.bluelib .image-limit-quarter {
|
.bluelib .image-limit-quarter {
|
||||||
max-height: max(14.1vw, 25vh);
|
max-height: max(14.1vw, 25vh);
|
||||||
}
|
}
|
||||||
|
.bluelib .status-hoverable {
|
||||||
|
cursor: help;
|
||||||
|
}
|
||||||
|
.bluelib .status-clickable {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.bluelib .status-disabled {
|
||||||
|
opacity: 50%;
|
||||||
|
}
|
||||||
|
.bluelib .status-disabled,
|
||||||
|
.bluelib .status-disabled *,
|
||||||
|
.bluelib .status-disabled .all {
|
||||||
|
cursor: not-allowed !important;
|
||||||
|
}
|
||||||
.bluelib .form {
|
.bluelib .form {
|
||||||
display: grid;
|
display: grid;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -521,16 +535,6 @@
|
||||||
border-width: 0 0 0 2px;
|
border-width: 0 0 0 2px;
|
||||||
border-radius: 0 4px 4px 0;
|
border-radius: 0 4px 4px 0;
|
||||||
}
|
}
|
||||||
.bluelib .status-hoverable {
|
|
||||||
cursor: help;
|
|
||||||
}
|
|
||||||
.bluelib .status-clickable {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.bluelib .status-disabled {
|
|
||||||
cursor: not-allowed !important;
|
|
||||||
opacity: 50%;
|
|
||||||
}
|
|
||||||
.bluelib .element-title {
|
.bluelib .element-title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
--bluelib-color-r: 255;
|
--bluelib-color-r: 255;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -383,6 +383,34 @@ body .image-limit-quarter,
|
||||||
.bluelib .image-limit-quarter {
|
.bluelib .image-limit-quarter {
|
||||||
max-height: max(14.1vw, 25vh);
|
max-height: max(14.1vw, 25vh);
|
||||||
}
|
}
|
||||||
|
body [title],
|
||||||
|
.bluelib [title],
|
||||||
|
body .status-hoverable,
|
||||||
|
.bluelib .status-hoverable {
|
||||||
|
cursor: help;
|
||||||
|
}
|
||||||
|
body [onclick],
|
||||||
|
.bluelib [onclick],
|
||||||
|
body .status-clickable,
|
||||||
|
.bluelib .status-clickable {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
body [disabled],
|
||||||
|
.bluelib [disabled],
|
||||||
|
body .status-disabled,
|
||||||
|
.bluelib .status-disabled {
|
||||||
|
opacity: 50%;
|
||||||
|
}
|
||||||
|
body [disabled],
|
||||||
|
.bluelib [disabled],
|
||||||
|
body .status-disabled,
|
||||||
|
.bluelib .status-disabled,
|
||||||
|
body [disabled] *,
|
||||||
|
.bluelib [disabled] *,
|
||||||
|
body .status-disabled *,
|
||||||
|
.bluelib .status-disabled * {
|
||||||
|
cursor: not-allowed !important;
|
||||||
|
}
|
||||||
body form,
|
body form,
|
||||||
.bluelib form,
|
.bluelib form,
|
||||||
body .form,
|
body .form,
|
||||||
|
@ -939,25 +967,6 @@ body .input-multiselect,
|
||||||
border-width: 0 0 0 2px;
|
border-width: 0 0 0 2px;
|
||||||
border-radius: 0 4px 4px 0;
|
border-radius: 0 4px 4px 0;
|
||||||
}
|
}
|
||||||
body [title],
|
|
||||||
.bluelib [title],
|
|
||||||
body .status-hoverable,
|
|
||||||
.bluelib .status-hoverable {
|
|
||||||
cursor: help;
|
|
||||||
}
|
|
||||||
body [onclick],
|
|
||||||
.bluelib [onclick],
|
|
||||||
body .status-clickable,
|
|
||||||
.bluelib .status-clickable {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
body [disabled],
|
|
||||||
.bluelib [disabled],
|
|
||||||
body .status-disabled,
|
|
||||||
.bluelib .status-disabled {
|
|
||||||
cursor: not-allowed !important;
|
|
||||||
opacity: 50%;
|
|
||||||
}
|
|
||||||
body .element-title,
|
body .element-title,
|
||||||
.bluelib .element-title,
|
.bluelib .element-title,
|
||||||
body h1,
|
body h1,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
||||||
@bluelib: ~".bluelib";
|
@bluelib: ~".bluelib";
|
||||||
@all: ~".bluelib *, .all";
|
@all: ~"*, .all";
|
||||||
|
|
||||||
@layout: ~".layout";
|
@layout: ~".layout";
|
||||||
@layout-fill: ~".layout-fill";
|
@layout-fill: ~".layout-fill";
|
||||||
|
|
Loading…
Reference in a new issue