mirror of
https://github.com/gra0007/obsidian-css-inlay-colors.git
synced 2026-07-22 05:18:59 +00:00
38 lines
805 B
CSS
38 lines
805 B
CSS
.css-color-inlay {
|
|
height: 1em;
|
|
width: 1em;
|
|
border: 1px solid var(--code-normal);
|
|
display: inline-block;
|
|
border-radius: 0.2em;
|
|
vertical-align: middle;
|
|
margin-right: 0.3em;
|
|
margin-top: -0.1em;
|
|
background: currentColor;
|
|
|
|
&.css-color-name-hidden {
|
|
margin-right: 0;
|
|
}
|
|
|
|
input {
|
|
height: 0;
|
|
width: 0;
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
/* Make inlay colors in the live editor appear part of the code block */
|
|
.css-color-wrapper:not(:has(.css-color-name-hidden)).cm-inline-code:not(
|
|
.cm-formatting
|
|
) {
|
|
padding-inline-end: 0;
|
|
border-start-end-radius: 0;
|
|
border-end-end-radius: 0;
|
|
border-inline-end: 0;
|
|
|
|
& + .cm-inline-code:not(.cm-formatting) {
|
|
padding-inline-start: 0;
|
|
border-start-start-radius: 0;
|
|
border-end-start-radius: 0;
|
|
border-inline-start: 0;
|
|
}
|
|
}
|