From c0021e307147a70ce4e4663df11079cd8b14304c Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Tue, 10 Mar 2026 07:23:09 +0900 Subject: [PATCH] fix thing --- src/default.c | 6 ++++-- src/skin/classic.c | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/default.c b/src/default.c index ad811ff..d85afe2 100644 --- a/src/default.c +++ b/src/default.c @@ -221,9 +221,11 @@ void default_body(FILE* out, const char* top, xl_node_t* element, int spec, int sprintf(end, "", element->name); } else if(strcmp(element->name, "table") == 0) { - accept_attr(top, text, 0, element, "id", "class", NULL); + char* t = xl_get_attribute(element, "class"); - sprintf(tag, "<%s%s class=\"grid\" width=\"100%%\" cellpadding=\"3\" cellspacing=\"2\" border=\"1\">", element->name, text); + accept_attr(top, text, 0, element, "id", NULL); + + sprintf(tag, "<%s%s class=\"grid%s%s\" width=\"100%%\" cellpadding=\"3\" cellspacing=\"2\" border=\"1\">", element->name, text, t == NULL ? "" : " ", t == NULL ? "" : t); sprintf(end, "", element->name); } else if(strcmp(element->name, "hr") == 0 || /**/ diff --git a/src/skin/classic.c b/src/skin/classic.c index dd15840..79e2291 100644 --- a/src/skin/classic.c +++ b/src/skin/classic.c @@ -102,10 +102,13 @@ void classic_stylesheet(FILE* out, const char* top) { fprintf(out, "\n"); fprintf(out, ".grid th, .grid td {\n"); fprintf(out, " text-align: left;\n"); - fprintf(out, " vertical-align: top;\n"); fprintf(out, " padding: 2px 3px;\n"); fprintf(out, "}\n"); fprintf(out, "\n"); + fprintf(out, ".grid td {\n"); + fprintf(out, " vertical-align: top;\n"); + fprintf(out, "}\n"); + fprintf(out, "\n"); fprintf(out, ".grid th {\n"); fprintf(out, " background-color: #cccccc;\n"); fprintf(out, "}\n");