1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 22:05:23 +02:00

fix(ui): fix ui bugs [EE-3847] (#7453)

This commit is contained in:
Chaim Lev-Ari 2022-08-12 06:47:56 +03:00 committed by GitHub
parent dd372637cb
commit 95fb5a4baa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 246 additions and 448 deletions

View file

@ -1,17 +1,24 @@
.btn {
@apply disabled:opacity-60;
@apply !outline-none;
@apply border border-solid border-transparent;
border-radius: 5px;
border-radius: 8px;
display: inline-flex;
justify-content: space-around;
align-items: center;
gap: 5px;
}
.btn-group {
display: inline-flex;
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
@apply opacity-40;
pointer-events: none;
touch-action: none;
}
.btn:hover {
color: var(--text-button-hover-color);
}
.btn.active {
@ -19,12 +26,11 @@
}
.btn-primary {
@apply bg-blue-8 border-blue-8;
@apply hover:bg-blue-9 hover:border-blue-9;
@apply text-white bg-blue-8 border-blue-8;
@apply hover:text-white hover:bg-blue-9 hover:border-blue-9;
@apply th-dark:hover:bg-blue-7 th-dark:hover:border-blue-7;
}
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
@ -40,20 +46,17 @@
/* Button Secondary */
.btn-secondary {
@apply border border-solid;
@apply disabled:border-transparent;
@apply text-blue-9 bg-blue-2 border-blue-8;
@apply hover:bg-blue-3 focus:bg-blue-3;
@apply hover:bg-blue-3;
@apply th-dark:text-blue-3 th-dark:bg-gray-10 th-dark:border-blue-7;
@apply th-dark:hover:bg-blue-11;
@apply th-dark:focus:bg-gray-10 th-dark:focus:border-blue-5;
}
.btn-danger {
@apply bg-error-8 border-error-8;
@apply hover:bg-error-7 hover:border-error-7 hover:text-white;
@apply focus:bg-error-8 focus:text-white focus:border-blue-5;
}
.btn-danger:active,
@ -68,19 +71,25 @@
@apply hover:bg-error-2 th-dark:hover:bg-error-11;
@apply border-error-5 th-dark:border-error-7 th-highcontrast:border-error-7;
@apply border border-solid;
@apply focus:border-blue-5;
}
.btn-success {
background-color: var(--ui-success-7);
}
.btn-success:hover {
color: var(--white-color);
}
/* secondary-grey */
.btn-default,
.btn-light {
@apply hover:bg-gray-2 th-dark:hover:bg-gray-9;
background-color: var(--bg-button-group-color);
border: 1px solid var(--border-button-group);
color: var(--text-button-group-color);
@apply bg-white border-gray-5 text-gray-9;
@apply hover:bg-gray-3 hover:border-gray-5 hover:text-gray-10;
/* dark mode */
@apply th-dark:bg-gray-warm-10 th-dark:border-gray-warm-7 th-dark:text-gray-warm-4;
@apply th-dark:hover:bg-gray-warm-9 th-dark:hover:border-gray-6 th-dark:hover:text-gray-warm-4;
}
.btn-light:active,
@ -89,15 +98,51 @@
background-color: var(--ui-gray-3);
}
form a,
.form-group a,
.hyperlink {
color: var(--ui-blue-8);
}
form a:hover,
.form-group a:hover,
.hyperlink:hover {
text-decoration: underline;
color: var(--ui-blue-9);
}
.btn-group {
display: inline-flex;
}
.input-group-btn .btn.active,
.btn-group .btn.active {
@apply bg-blue-2 text-blue-10 border-blue-5;
@apply th-dark:bg-blue-11 th-dark:text-blue-2 th-dark:border-blue-9;
}
/* focus */
.btn-primary:focus,
.btn-secondary:focus,
.btn-light:focus {
@apply border-blue-5;
}
.btn-danger:focus,
.btn-dangerlight:focus {
@apply border-blue-6;
}
.btn-primary:focus,
.btn-secondary:focus,
.btn-light:focus,
.btn-danger:focus,
.btn-dangerlight:focus {
--btn-focus-color: var(--ui-blue-3);
box-shadow: 0px 0px 0px 4px var(--btn-focus-color);
}
[theme='dark'] .btn-primary:focus,
[theme='dark'] .btn-secondary:focus,
[theme='dark'] .btn-light:focus,
[theme='dark'] .btn-danger:focus,
[theme='dark'] .btn-dangerlight:focus {
--btn-focus-color: var(--ui-blue-11);
}