Skip to content

Conversation

@nigelmegitt
Copy link
Contributor

@nigelmegitt nigelmegitt commented May 3, 2024

Closes #256.

Allows an options object to be passed into renderHTML() to modify the presentation of the resulting HTML.

The options parameter can be used to configure adjustments that change the presentation away from the document defaults:

  • sizeAdjust: {number} scales the text size and line padding
  • lineHeightAdjust: {number} scales the line height
  • backgroundOpacityScale: {number} scales the backgroundColor opacity
  • fontFamily: {string} comma-separated list of font family values to use, if present.
  • colorAdjust: [{colorSelector: selector, ColorGenerator: generator}*] list of color replacement rules
  • colorOpacityScale: {number} opacity override on text color (ignored if zero)
  • regionOpacityScale: {number} scales the region opacity
  • textOutline: {string} textOutline value to use, if present
  • [span|p|div|body|region]BackgroundColorAdjust: {documentColor: replaceColor*} map of backgroundColors and the value with which to replace them for each element type

Allows an `options` object to be passed into `renderHTML()` to modify the presentation of the resulting HTML.
@dsilhavy
Copy link

This feature was discussed during the DASH-IF dash.js face to face meeting. There is demand by the industry to enable overriding embedded style information. We would like to expose this functionality to dash.js users. Would be great if this feature makes it to the main codebase of imscJS.

@ftyp
Copy link

ftyp commented Jun 18, 2024

Yes, this would be a useful addition to address different accessibility needs or user preferences. +1 from Deutsche Telekom

@ryanmccartney
Copy link

Hi there, we've been using the functionality of this PR for sometime via a fork of both imscJS and Dash.js, it would be great to be able to bring add these changes to a release. What do we need to do to progress this? Happy to help with test assets and/or testing if required.

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

Successfully merging this pull request may close these issues.

4 participants