Topic: font-size

Is it possible to use vw or vh, ex, rem, em or %  for font-size in the theme css file?

Re: font-size

Yes. You can use whatever valid units you like in your custom CSS.

The reason that only px and % are accepted as galleryWidth and galleryHeight in the gallery's embedding code (as noted in your query here) is that Juicebox sanitizes the values (turning anything that is not a % into a px value) before using them internally as CSS.
Any custom CSS will be used by the browser as is.

For anyone looking to change the font size of gallery text, the following CSS may help. (Just change the values as necessary.)

/* IMAGE TITLE */
.jb-caption .jb-caption-title {
    font-size: 20px !important;
}

/* IMAGE CAPTION */
.jb-caption .jb-caption-desc {
    font-size: 18px !important;
}

/* IMAGE NUMBER */
.jb-cap-frame .jbac-number {
    font-size: 12px !important;
}

You could add this CSS to the end of your gallery's 'jbcore/classic/theme.css' file or wrap it in <style type="text/css"> ... </style> tags and add it to the end of your gallery web page's <head> section (to avoid the need to modify your gallery's 'theme.css' file).

If you do modify your gallery's 'theme.css' file, please remember to make a backup copy of your modified file as it may be overwritten if you upgrade your gallery when a new version of Juicebox is released.