mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
variant: fix generator for use of neon #401
This commit is contained in:
parent
8aeb69fa56
commit
cdbb1a8ee7
1 changed files with 13 additions and 6 deletions
|
@ -326,20 +326,27 @@ var variants = {
|
|||
},
|
||||
|
||||
findLoadedStylesheet: function( id ){
|
||||
var style = null;
|
||||
for( var n = 0; n < document.styleSheets.length; ++n ){
|
||||
if( document.styleSheets[n].ownerNode.id == id ){
|
||||
var s = document.styleSheets[n];
|
||||
for( var m = 0; m < s.rules.length; ++m ){
|
||||
if( s.rules[m].selectorText == ':root' ){
|
||||
style = s.rules[m].style;
|
||||
break;
|
||||
if( s.rules && s.rules.length ){
|
||||
for( var m = 0; m < s.rules.length; ++m ){
|
||||
if( s.rules[m].selectorText == ':root' ){
|
||||
return s.rules[m].style;
|
||||
}
|
||||
if( s.rules[m].cssRules && s.rules[m].cssRules.length ){
|
||||
for( var o = 0; o < s.rules[m].cssRules.length; ++o ){
|
||||
if( s.rules[m].cssRules[o].selectorText == ':root' ){
|
||||
return s.rules[m].cssRules[o].style;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return style;
|
||||
return null;
|
||||
},
|
||||
|
||||
changeColor: function( c, without_prompt ){
|
||||
|
|
Loading…
Reference in a new issue