Hide block properties when block is collapsed

Actually I was rather bugged that the gap to .block-properties is preventing from easily hovering over the properties so I updated the solution with this:

@import url("https://cdn.jsdelivr.net/gh/henices/logseq-flow-nord@main/src/palettes/one-dark-pro.css");

/* Styles for Auto-Hiding and Revealing on Mouse Hover for Block Properties */
.block-content-inner:has(+.block-properties)::after {
  padding-left: 10px;
  color: hsl(var(--ct-accent-color));
  font-family: var(--ls-font-family-code);
  font-weight: bold;
  content: "P";
}

.block-properties {
  display: none;
}

/* Display Block Properties when hovering over the entire Block element, not just its text */
.block-main-container:has(.block-properties):hover .block-properties,
#right-sidebar .block-properties {
  display: block;
}
2 Likes