I am using Twitter Digits embedded widget and would like to theme it dynamically depending on the theme that the user selects for the main portal. The only way that you can theme it according to their documentation at https://docs.fabric.io/web/digits/embeddable.html is as follows (which is pretty much hardcoded):
Digits.embed({
container: '.my-digits-container',
theme: {
accent: '315B7F', /* Buttons & Links */
background: '002747', /* Transparent by defaul */
label: 'FFF', /* Titles and text */
border: '324F67' /* Input fields borders */
}
})
Can anyone tell me whether there is any other way to update these hex values depending on some classes set in the CSS (in order to have different colors depending on the theme selected)?
I was thinking maybe for example i have this class in the CSS and I want to extract that value and apply it to the accent in twitter code snippet:
.accent { color: #FF0000; }
However im looking for anything simpler or neater.
Kindly note that the embeddable widget creates an iframe, and therefore it does not inherit the styling. I am using AngularJS throughout the app.