Merge branch 'define-inverse-colours' into 'v3'

Define custom colour style and their inverse in variables.less

See merge request openflexure/openflexure-microscope-server!624
This commit is contained in:
Joe Knapper 2026-06-25 08:35:54 +00:00
commit 84fba790ba
4 changed files with 23 additions and 29 deletions

View file

@ -160,27 +160,6 @@
@sidebar-right-left: 0px; @sidebar-right-left: 0px;
@sidebar-right-left-xl: 60px; @sidebar-right-left-xl: 60px;
/**
* Self inverting colours
*
* These invert automatically when the theme inverts. these need to be used as css variables.
* They can be used without importing uikit/src/less/uikit.theme.less fully into the
* component.
*/
:root {
--theme-text-colour: @global-color;
.hook-inverse() {
--theme-text-colour: @inverse-global-color;
}
--theme-primary-background: @global-primary-background;
.hook-inverse() {
--theme-primary-background: @inverse-primary-muted-color;
}
}
/* /*
* Navbar * Navbar
*/ */
@ -281,3 +260,23 @@
} }
} }
/*
* Interactive elements
*/
.ofm-muted-interactive-text{
color: @global-muted-color;
&:hover {
color: @global-color;
}
}
.hook-inverse() {
.ofm-muted-interactive-text{
&:hover {
color: @inverse-global-color;
}
}
}

View file

@ -63,7 +63,7 @@ export default {
.progress .indeterminate, .progress .indeterminate,
.progress .determinate { .progress .determinate {
background-color: var(--theme-primary-background); background-color: @global-primary-background;
} }
.progress .indeterminate::before { .progress .indeterminate::before {

View file

@ -81,7 +81,7 @@ export default {
.progress .indeterminate, .progress .indeterminate,
.progress .determinate { .progress .determinate {
background-color: var(--theme-primary-background); background-color: @global-primary-background;
} }
.progress .indeterminate::before { .progress .indeterminate::before {

View file

@ -15,7 +15,7 @@
</div> </div>
<button <button
class="copy-button" class="copy-button ofm-muted-interactive-text"
:class="{ success: copied }" :class="{ success: copied }"
:title="'Copy as Python list'" :title="'Copy as Python list'"
@click="copyMatrix" @click="copyMatrix"
@ -142,14 +142,9 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: @global-muted-color;
transition: color 0.2s ease; transition: color 0.2s ease;
} }
.copy-button:hover {
color: var(--themed-global-colour);
}
.copy-button.success { .copy-button.success {
color: #4caf50; color: #4caf50;