On this page I am trying to let a user select various @font-feature-settings that are built into the font that is displayed.
I have tried doing it using only html and CSS checkboxes, but the problem in that approach is that the various states are mutually exclusive. My goal is, however, that all possible options should be accumulative and it should be possible to randomly combine features. For example, it should be possible to activate @font-feature-settings 'ss01' and 'ss10' simultaneously.
I have now tried to do it using Java Script, but unfortunately I am completely new to it and struggle to make any progress. I found this: font-feature-settings features activated using javascript But cannot see how I can adapt it to my needs. Any pointers?
You can set multiple feature settings using CSS variables:
CSS variables act as placeholders for each feature.