-
Notifications
You must be signed in to change notification settings - Fork 6
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
Expose background color to JS? #13
Comments
More details here: ryanpcmcquen/standardnotes_org_mode_editor#5 |
|
Hmm..probably not yet a good way to access these from JS. Why not use the var inside of a stylesheet? You can access all sn-stylekit-vars inside your stylesheet, even if they were loaded externally. |
I need to conditionally change the filter based on the value ... I don't think that is possible with CSS, but maybe there is a way to do it? |
@mobitar, so I'm trying a hack, where I make a hidden https://github.com/ryanpcmcquen/standardnotes_org_mode_editor/blob/gh-pages/styles.css |
What do you mean by isn't populating? In my experience vars don't appear as resolved when using dev tools inspector. It will still say the variable name. This var in particular defaults to white. |
I am reading the span using I have tried switching between themes and refreshing the page, but the value never changes. |
I'd like to detect dark themes with my extension, and apply a CSS filter based on that, but I can't find a way to access the style kit background color inside of my extension, I've tried all the
ComponentManager
permissions I can find, but nothing seems to have the style sheet. I can access the the name of the style sheet underactiveThemes
, but I can't read the CSS rules because of iframe CORS limitations. Is there a way to just get the background color of the parent html passed down?The text was updated successfully, but these errors were encountered: