From 8d8107ec496446282a2d071de8d4eb18152f2265 Mon Sep 17 00:00:00 2001 From: CentreMetre Date: Sun, 14 Jun 2026 18:06:44 +0100 Subject: [PATCH] Remove CSS handling from Table Drop the loadCSS method and its constructor call. Styling is now the consumer's responsibility via the emitted class names, keeping the class self-contained and free of app-specific asset paths. --- abstract-table.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/abstract-table.ts b/abstract-table.ts index bc5792e..047418d 100644 --- a/abstract-table.ts +++ b/abstract-table.ts @@ -38,8 +38,6 @@ export abstract class Table { this.table.appendChild(this.tableBody); - this.loadCSS() - this.messageEl = messageElement === undefined ? document.createElement("p") : messageElement; } @@ -83,19 +81,6 @@ export abstract class Table { this.table.appendChild(thead); } - - /** - * Loads the CSS for tables into the html file for custom styling. - * @param relativePathAndName The path to go to for the cess file, including the filename and extension. - */ - loadCSS(relativePathAndName: string) { - const link = document.createElement("link"); - link.rel = "stylesheet" - link.href = relativePathAndName; - link.type = 'text/css'; - document.head.appendChild(link); - } - /** * Returns the table element of this instance for putting onto a page. */