Refactoring and generalize spinfield: share more CSS

Avoid to place rules within jssidebar.css that should be global
(it should affect any jsdialog class) and let jssidebar-only exceptions
in jssidebar file

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ib950f5c13522f3d91139d8eac52b5b4daa22fe05
This commit is contained in:
Pedro Pinto Silva 2022-04-28 09:12:33 +02:00 committed by Szymon Kłos
parent fadc3fb3b5
commit 4ccfdd598b
2 changed files with 22 additions and 17 deletions

View file

@ -422,6 +422,28 @@ input[type='checkbox']:checked.autofilter, .jsdialog input[type='checkbox']:chec
.jsdialog input[type='radio'][disabled='disabled'] ~ label {
color: var(--color-text-lighter);
}
/* spinfield */
.spinfieldcontainer input:hover {
border: 1px solid var(--color-border-darker);
color: var(--color-text-darker);
background-color: var(--color-background-lighter);
}
.spinfield {
padding: 4px 0 4px 4px;
height: 28px;
box-sizing: border-box;
margin-right: 1px;
}
.spinfieldunit {
font-size: var(--default-font-size);
color: var(--color-text-dark);
margin: 5px;
position: absolute;
margin-inline-start: calc(-40px);
}
/* spinfield (number) */
input[type='number'] {
padding-top: 0 !important;

View file

@ -40,23 +40,6 @@
.sidebar.spinfield {
max-width: 121px;
padding: 4px 0 4px 4px;
height: 28px;
box-sizing: border-box;
margin-right: 1px;
}
.sidebar .spinfieldcontainer input:hover {
border: 1px solid var(--color-border-darker);
color: var(--color-text-darker);
background-color: var(--color-background-lighter);
}
.spinfieldunit {
font-size: var(--default-font-size);
color: var(--color-text-dark);
margin: 5px;
position: absolute;
margin-inline-start: calc(-40px);
}
.sidebar.ui-listbox {