Skip to content

Instantly share code, notes, and snippets.

@serpro69
Created September 6, 2023 12:02
Show Gist options
  • Save serpro69/b8de7950ba71cfad2c815f31074cedcb to your computer and use it in GitHub Desktop.
Save serpro69/b8de7950ba71cfad2c815f31074cedcb to your computer and use it in GitHub Desktop.
obsidian canvas diamond shape
.canvas-node-container:has(.diamond) {
transform:rotate(42deg);
overflow: visible;
contain: none;
position: absolute;
width: 150px;
height: 150px;
}
.canvas-node-content:has(.diamond) {
will-change: transform;
text-align: center;
position: relative;
margin: 0 auto;
}
.canvas-node-content:has(.diamond) p {
transform: rotate(-45deg) translate(-50%, -50%);
position: absolute;
top: 50%;
left: 50%;
transform-origin: center center;
text-align: center;
white-space: nowrap;
}
cssclass
diamond

some text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment