• More informative output when font_google() downloads google font files (for font_google(local=TRUE)).
  • Closed #138: font_google(local = TRUE) now uses woff2 (instead of woff) for a font file type. (#139)
  • Closed #132: Fix R CMD check warning re error() format strings (for r-devel). (#133)
  • Closed #129: Fixed a compilation warning on latest Apple Clang (15). (#130)
  • Closed #125: Installation now (correctly) requires fs >= 1.2.4.
  • Close #127: Removed a compilation warning on Windows w/ gcc-12. (#128)

Improvements

  • Close #122: Upgrade LibSass dependency from v3.6.4 to v3.6.5. (#123)

Improvements

  • Close #116: Remove hard-coded lstdc++ flag from Makevars. (#118)

Improvements

  • Close #113: Get rid of C++ warning during package installation about sprintf() being deprecated. (#114)

Bug fixes

Improvements

  • Several speed improvements for sass() and as_sass_layer(), particularly when sass(write_attachments = TRUE) encounters a cache hit. (#98)
  • Removed compilation warnings with gcc-12. (#100)
  • Removed linking errors that occur when custom C++ flags are used to compile (#94, #104).

Possibly breaking changes

  • sass_layer()’s argument order has changed to better accommodate for the addition of new functions and mixins arguments as well as deprecation of the declarations argument. This change reflects an update in our understanding of Sass best practice of placing function definitions before variables, so that variable definitions may leverage functions. (#80)

  • sass() and as_sass() now always attach htmlDependency()(s) (found inside of their input argument) as an attribute on their return value. This mainly in support the new font importing feature (which relies on sass()/as_sass() being able to return htmlDependency()s), but this could be more generally useful for attaching HTML dependencies to Sass/CSS code. (#74)

New features

Bug fixes

  • Closed #84: Fixed an issue with sass_file() being cached even if the contents of the file had changed (this regression was introduced by the 0.3.0 release). (#85)

This small patch release changes sass::sass_cache_context_dir() to use tools::R_user_dir() over rappdirs::user_cache_dir() (when relevant, as requested by CRAN). (#70)

This release improves the caching of CSS compilation in sass(). Previously, caching was (by default) enabled in non-interactive() sessions and was allowed to grow indefinitely within tempdir() (i.e., within an R session). Now, caching is enabled by default in both interactive and non-interactive R sessions. In most cases, the cache will be stored in a user-level cache directory and persist across R sessions. In some cases (such as deployment on Shiny Server or Connect), the cache will be stored in a subdirectory of the application named cache/, to eliminate the risk of cache poisoning across applications. For more information about where the cache is stored, see ?sass_cache_get.

Although caching is now enabled by default, it still may not be desirable while developing Sass code, because of the possibility of a false positive. (For more, see the Caching section of ?sass) Caching can be disabled with options(sass.cache = FALSE). Also, to help reduce the chance of a false positive in caching, sass() now includes a cache_key_extra parameter which may be used to pass information that the Sass input may not capture, such as file imports.

Other improvements include:

  • Added support for Shiny Developer Mode by turning off sass caching by default. To enable Shiny Developer Mode, call options(shiny.devmode = TRUE) (or shiny::devmode(TRUE)). (Related rstudio/shiny#3174, #68)

  • A new output_template() function for more convenient output path creation that is cache and options aware.

  • When sass() has a cache hit, and output is specified, the cached file is now simply copied to output at the OS level (previously, sass() was reading the cache file into R, then writing it to output). (#42)

  • Added sass_bundle() to collect sass_layer()(s) and/or sass_bundle()(s) into a single Sass bundle. When creating a bundle, any of the child layers/bundles may be named, so they can be later removed via sass_bundle_remove(). (#54)

  • sass_layer() now returns a sass_bundle() containing a single Sass layer. To test for sass_bundle() output, use is_sass_bundle(). (#54)

Breaking changes

  • No significant changes other than CRAN compliance.
  • First release.