Don't overwrite Obsidian CSS in a plugin

This commit is contained in:
friebetill 2023-02-22 11:56:48 +08:00
parent cd0be499d5
commit 705176ef6b
3 changed files with 8 additions and 8 deletions

View file

@ -33,7 +33,9 @@ export class DeleteFileModal extends Modal {
`irreversible.`,
})
const buttonContainer = this.contentEl.createDiv('button-container')
const buttonContainer = this.contentEl.createDiv(
'file-diff__button-container'
)
const deleteButton = buttonContainer.createEl('button', {
text: 'Delete',

View file

@ -20,7 +20,9 @@ export class RiskyActionModal extends Modal {
`accepting of the associated risks.`,
})
const buttonContainer = this.contentEl.createDiv('button-container')
const buttonContainer = this.contentEl.createDiv(
'file-diff__button-container'
)
const deleteButton = buttonContainer.createEl('button', {
text: 'Accept Risk',

View file

@ -9,14 +9,10 @@
padding: 0.1rem 0;
}
.button-container {
.file-diff__button-container {
text-align: right;
}
button:focus-visible {
box-shadow: var(--input-shadow);
}
@media (prefers-color-scheme: light) {
.file-diff__top-line__bg {
background-color: #d9f4ef;
@ -69,7 +65,7 @@ button:focus-visible {
/* Rename from py-0.5 to py-0-5, as dots aren't allowed in selector names */
.py-0-5 {
padding-top: 0.125rem; /* 2px */
padding-bottom: 0.125rem; /* 2px */
padding-bottom: 0.125rem; /* 2px */
}
.mr-2 {