Merge pull request #44 from AAorris/master

Add theme op to library to get theme variables.
This commit is contained in:
Лu Лinveгa 2019-07-15 09:40:30 +12:00 committed by GitHub
commit 04250e6f84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,6 +181,11 @@ function Library (ronin) {
return h[k] return h[k]
} }
this.theme = (variable, el = document.documentElement) => {
// ex. styleprop('--f_high') to get css variable value
return getComputedStyle(el).getPropertyValue(variable)
}
// Math // Math
this.add = (...args) => { this.add = (...args) => {