wave-ui 3.1.1 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave-ui",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "An emerging UI framework for Vue.js (2 & 3) with only the bright side. :sunny:",
5
5
  "author": "Antoni Andre <antoniandre.web@gmail.com>",
6
6
  "homepage": "https://antoniandre.github.io/wave-ui",
@@ -275,10 +275,8 @@ export const injectColorsCSSInDOM = themeColors => {
275
275
  css.id = 'wave-ui-colors'
276
276
  css.innerHTML = generateColors(themeColors)
277
277
 
278
- // Keep the injected colors at the end of other styles.
279
- // This should have priority over the user rules that have the same specificity.
280
- const styles = document.head.querySelectorAll('style,link[rel="stylesheet"]')
281
- if (styles.length) styles[styles.length - 1].after(css)
278
+ const firstStyle = document.head.querySelectorAll('style,link[rel="stylesheet"]')[0]
279
+ if (firstStyle) firstStyle.before(css)
282
280
  else document.head.appendChild(css)
283
281
  }
284
282
  }