Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When lightbox=false, the style "object-fit: contain" does not work #155

Closed
sam-israel opened this issue Aug 10, 2023 · 2 comments
Closed

Comments

@sam-israel
Copy link

When using material and disabling lightbox:

I try to add to an image the style of "object-fit: contain" (so that the image is viewed in full, even when zooming in strongly). However, when lightbox=false this style does not work. It does (all other things being equal) when lightbox is set to true.


---
title: ""
date: "`r Sys.Date()`"
output:
  rmdformats::material:
    highlight: kate
    lightbox: false
---
library(htmltools)

img(src="deconv.png",  style="object-fit: contain")

sessionInfo()
R version 4.3.0 (2023-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_IL.UTF-8       LC_NUMERIC=C               LC_TIME=en_IL.UTF-8       
 [4] LC_COLLATE=en_IL.UTF-8     LC_MONETARY=en_IL.UTF-8    LC_MESSAGES=en_IL.UTF-8   
 [7] LC_PAPER=en_IL.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_IL.UTF-8 LC_IDENTIFICATION=C       

time zone: Asia/Jerusalem
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] htmltools_0.5.5

loaded via a namespace (and not attached):
 [1] compiler_4.3.0   bookdown_0.34    fastmap_1.1.1    rsconnect_0.8.29 cli_3.6.1       
 [6] tools_4.3.0      rstudioapi_0.14  yaml_2.3.7       rmarkdown_2.22   knitr_1.43      
[11] rmdformats_1.0.4 xfun_0.39        digest_0.6.31    rlang_1.1.1      evaluate_0.21
@juba
Copy link
Owner

juba commented Aug 23, 2023

Hi,

I think the issue should now be fixed in the development version. Could you test that it is the case when you have the time ?

Thanks.

@sam-israel
Copy link
Author

Yes, once I install the package from GitHub devtools::install_github(juba/rmdformats), the issue is fixed.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants