← Back to all sparks
H

htmltools

DEVOPS
Velocity0.0

Tools for creating, manipulating and rendering HTML from R

htmltools spends three releases walking back its own fill-layout opinions

shinycsslayoutmaintenancehtml-generation
Current state
htmltools generates the HTML that Shiny, bslib and R Markdown emit. Recent releases are dominated by one project - the fill and fillable layout system that powers bslib cards - being tuned release after release, surrounded by fixes for whatever testthat or R-devel changed underneath.
Where it's heading
The fill work is converging rather than expanding: 0.5.6 stopped forcing overflow on fillable containers, 0.5.7 stopped forcing full width on fill items, and 0.5.8 lowered the CSS's precedence by moving it into a named cascade layer. Each step removes an opinion that broke someone's layout. The two most recent releases add nothing at all beyond test compatibility.
Prediction
With the fill CSS now scoped to its own cascade layer, expect fewer layout corrections and a continued pattern of small releases driven by testthat and R-devel rather than new API.

Recent moves

  1. 8mo ago

    Test fix for testthat 3.3.0

    A one-line test fix for testthat 3.3.0 - the release exists to keep checks green. Nothing user-visible, and the second consecutive release of that kind.

    View source ↗
  2. 8mo ago

    capturePlot() examples run only interactively

    Example code for capturePlot() is now gated behind an interactive-session check, a concession to the check environment rather than a change to the function itself.

    View source ↗
  3. 2y ago

    Fill CSS moves into its own cascade layer

    The fill layout system's CSS is now scoped to a named htmltools cascade layer, deliberately lowering its precedence so app authors' own styles win. It is the third consecutive release walking back how forcefully fill styling is applied.

    View source ↗
  4. 2y ago

    save_html() becomes generic; css() passes CSS variables through

    Two real additions: save_html() becomes an S3 generic so classes can control how they serialize to a file, and css() leaves custom properties untouched, making CSS variables settable inline. Fill items also stop forcing full width, continuing the correction series.

    View source ↗
  5. 2y ago

    tagQuery() no longer errors traversing NULL on r-devel

    A single compatibility fix for an r-devel behavior change in tagQuery() traversal. Upkeep, not direction.

    View source ↗
  6. 3y ago

    Fillable containers stop forcing overflow, respect intrinsic size

    The first correction in the fill series: fillable containers no longer set overflow automatically, and non-fill items inside them respect their intrinsic size instead of stretching. htmlDependency() objects also render properly inside knitr chunks now instead of printing their structure.

    View source ↗