- More informative output when
font_google()
downloads google font files (forfont_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)
- Close #122: Upgrade LibSass dependency from v3.6.4 to v3.6.5. (#123)
- Close #116: Remove hard-coded lstdc++ flag from Makevars. (#118)
- Close #113: Get rid of C++ warning during package installation about sprintf() being deprecated. (#114)
sass()
no longer encounters a false positive cache hit whensass_file()
is used inside asass_bundle()
. (#107, #108)font_google()
no longer produces a directory name with a_
prefix (which was causing the directory to be ignored when deployed to GitHub Pages). (#105, #106)
- Several speed improvements for
sass()
andas_sass_layer()
, particularly whensass(write_attachments = TRUE)
encounters acache
hit. (#98) - Removed compilation warnings with gcc-12. (#100)
- Removed linking errors that occur when custom C++ flags are used to compile (#94, #104).
-
sass_layer()
's argument order has changed to better accommodate for the addition of newfunctions
andmixins
arguments as well as deprecation of thedeclarations
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()
andas_sass()
now always attachhtmlDependency()
(s) (found inside of theirinput
argument) as an attribute on their return value. This mainly in support the new font importing feature (which relies onsass()
/as_sass()
being able to returnhtmlDependency()
s), but this could be more generally useful for attaching HTML dependencies to Sass/CSS code. (#74)
-
Added new font importing helpers, namely
font_google()
,font_link()
,font_face()
, andfont_collection()
for intelligently importing web fonts files. They must be used inside a named list, for example:list("font-variable" = font_google("Pacifico"))
. Seehelp(font_face, package = "sass")
for more details and examples. (#74) -
A new
sass_layer_file()
function was added to read in a.scss
file as asass_layer()
. Special comments of the form/*-- scss:(functions|defaults|rules|mixins) --*/
can be used to place certain sections of the file intofunctions
,defaults
,rules
, andmixins
. The primary motivation for this is to allow quarto's theme file format to also be used Shiny and R Markdown. (#81) -
Closed #87: Added new
sass_options_get()
andsass_options_set()
for setting and readingsass_options()
globally (sass()
'soptions
argument now defaults tosass_options_get()
instead ofsass_options()
). In addition, whenshiny::devmode()
is enabled, Sass source maps are included by default. (#88) -
output_template()
gains apath
argument to change the root directory where output file will be written. (#76)
- 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)
(orshiny::devmode(TRUE)
). (Related rstudio/shiny#3174, #68) -
A new
output_template()
function for more convenientoutput
path creation that iscache
andoptions
aware. -
When
sass()
has a cache hit, andoutput
is specified, the cached file is now simply copied tooutput
at the OS level (previously,sass()
was reading the cache file into R, then writing it tooutput
). (#42) -
Added
sass_bundle()
to collectsass_layer()
(s) and/orsass_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 viasass_bundle_remove()
. (#54) -
sass_layer()
now returns asass_bundle()
containing a single Sass layer. To test forsass_bundle()
output, useis_sass_bundle()
. (#54)
-
When
output
is specified,sass()
now returns the output file path instead of the CSS content as a character vector. -
The
cache_options
argument insass()
has been renamed tocache
and now defaults tosass_cache_get()
instead ofsass_cache_options()
. -
sass_cache_options()
has been deprecated (it no longer does anything) in favor of the new caching functions (sass_file_cache()
). -
Deprecated
sass_layer_merge()
in favor ofsass_bundle()
to reflect the data structures being returned. (#54) -
Deprecated the
tags
parameter ofsass_layer()
in favor of named layers insass_bundle(NAME = layer)
. (#54)
-
Added new
sass_layer()
andsass_layer_merge()
functions. See here for more details. -
The objects that
sass()
andas_sass()
) return now have better print methods in rmarkdown. See here for more details. -
Added the ability for
sass()
to retainhtmltools::htmlDependency()
s attached to it'sinput
. -
Fixed an issue with incorrect handling of length 2 or more character vector input (#37).
- No significant changes other than CRAN compliance.
- First release.