Skip to content

Build your personal knowledge base with Trilium Notes

style/overlay buttons: fix corner rounding issue when there is just one item in the group

Adorian Doran8fced882df2e
diff --git a/apps/client/src/stylesheets/theme-next/forms.css b/apps/client/src/stylesheets/theme-next/forms.css
index 8816b629e0..faccf9e478 100644
--- a/apps/client/src/stylesheets/theme-next/forms.css
+++ b/apps/client/src/stylesheets/theme-next/forms.css
@@ -268,11 +268,18 @@ button.tn-low-profile:hover {
}
&:first-child {
- border-radius: var(--overlay-button-border-radius) 0 0 var(--overlay-button-border-radius);
+ --_start-border-radius: var(--overlay-button-border-radius);
}
&:last-child {
- border-radius: 0 var(--overlay-button-border-radius) var(--overlay-button-border-radius) 0;
+ --_end-border-radius: var(--overlay-button-border-radius);
+ }
+
+ /* Reboot sets `button { border-radius: 0 }` (specificity 0,0,1), so the rounding must live on
+ these end selectors (0,1,0) to out-specify it; middle buttons keep Reboot's square corners. */
+ &:first-child,
+ &:last-child {
+ border-radius: var(--_start-border-radius, 0) var(--_end-border-radius, 0) var(--_end-border-radius, 0) var(--_start-border-radius, 0);
}
}