mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 15:35:11 +00:00
Utils/Margins: Switch to Styles API
This commit is contained in:
parent
6235a7d9e5
commit
b029ce47a0
1 changed files with 6 additions and 4 deletions
|
@ -16,6 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { setStyle } from "@api/Styles";
|
||||||
|
|
||||||
let styleStr = "";
|
let styleStr = "";
|
||||||
|
|
||||||
export const Margins: Record<`${"top" | "bottom" | "left" | "right"}${8 | 16 | 20}`, string> = {} as any;
|
export const Margins: Record<`${"top" | "bottom" | "left" | "right"}${8 | 16 | 20}`, string> = {} as any;
|
||||||
|
@ -29,7 +31,7 @@ for (const dir of ["top", "bottom", "left", "right"] as const) {
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", () =>
|
document.addEventListener("DOMContentLoaded", () =>
|
||||||
document.head.append(Object.assign(document.createElement("style"), {
|
setStyle({
|
||||||
textContent: styleStr,
|
name: "vencord-margins",
|
||||||
id: "vencord-margins"
|
source: styleStr,
|
||||||
})), { once: true });
|
}), { once: true });
|
||||||
|
|
Loading…
Add table
Reference in a new issue