Repository navigation
Conversation
lt_wrap(x, ...) sets any HTML attributes on the <div class="lt-wrap"> container (class, style, id, data-*, ...). class is appended to the base lt-wrap and accumulates across calls; other attributes are emitted as-is, escaped. Supersedes the dev-only, unreleased lt_class(), which set only the class. Enables scoping CSS to one table or giving it a fixed width. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
🚀 Site preview: https://lt-pr-43.surge.sh Updates on every push; removed when this PR closes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lt_wrap(x, ...)sets any HTML attributes on the<div class="lt-wrap">that wraps the table —class,style,id,data-*, etc.classis appended to the baselt-wrap(and accumulates across repeated calls); every other attribute is emitted as-is, HTML-escaped. Set once at the single wrap-emission point inbuildHtml, so it covers both the runtime and the static (node) bake.Supersedes
lt_class()(added this dev cycle, never released), which only set the class.lt_wrap(class = ...)is the drop-in replacement; the new verb also enables, e.g., giving the container a fixed width (lt_wrap(x, style = "width:800px")) with the existing.lt-wrap { overflow-x:auto }handling the scroll.Changes:
lt_wrap();lt_class()removed (docs/NAMESPACE/README/example updated).inst/www/lt.js: wrap div emitsspec.wrapattributes via the existingattr/eschelpers.test-tab.R); browser/node assert that attributes land on.lt-wrap, class is appended, and values are escaped (test-render-js.R).Default output is byte-identical when
lt_wrap()is unused (test-snap.mdunchanged).🤖 Generated with Claude Code