Skip to content

Commit

Permalink
fix(gnoweb): enable table on gnoweb (#3525)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexiscolin authored Jan 16, 2025
1 parent 3fa9940 commit cb2255f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 2 additions & 0 deletions gno.land/pkg/gnoweb/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/gnolang/gno/gno.land/pkg/gnoweb/components"
"github.com/gnolang/gno/tm2/pkg/bft/rpc/client"
"github.com/yuin/goldmark"
"github.com/yuin/goldmark/extension"
mdhtml "github.com/yuin/goldmark/renderer/html"
)

Expand Down Expand Up @@ -77,6 +78,7 @@ func NewRouter(logger *slog.Logger, cfg *AppConfig) (http.Handler, error) {
markdown.NewHighlighting(
markdown.WithFormatOptions(chromaOptions...),
),
extension.Table,
),
}
if cfg.UnsafeHTML {
Expand Down
14 changes: 2 additions & 12 deletions gno.land/pkg/gnoweb/frontend/css/input.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@
}

.realm-content table {
@apply w-full border-collapse my-8;
@apply border-collapse my-8 block w-full max-w-full overflow-x-auto border-collapse;
}

.realm-content th,
.realm-content td {
@apply border border-gray-300 px-4 py-2;
@apply border px-4 py-2 break-words whitespace-normal;
}

.realm-content th {
Expand Down Expand Up @@ -190,16 +190,6 @@
@apply list-decimal;
}

.realm-content table th:first-child,
.realm-content td:first-child {
@apply pl-0;
}

.realm-content table th:last-child,
.realm-content td:last-child {
@apply pr-0;
}

.realm-content abbr[title] {
@apply border-b border-dotted cursor-help;
}
Expand Down
Loading

0 comments on commit cb2255f

Please sign in to comment.