Skip to content

Commit

Permalink
colors.js's color vars fixed (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-solanki authored and brunokunace committed Mar 22, 2019
1 parent d69fb09 commit fd488ed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/utils/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ export default {
return colorx
} else {
if(vscolors.includes(colorx)){
return `rgba(var(--${colorx}),${opacity})`
return `rgba(var(--vs-${colorx}),${opacity})`
} else {
return `rgba(var(--primary),${opacity})`
return `rgba(var(--vs-primary),${opacity})`
}
}
} else {
return `rgba(var(--primary),${opacity})`
return `rgba(var(--vs-primary),${opacity})`
}
},
contrastColor(elementx) {
Expand Down Expand Up @@ -115,18 +115,18 @@ export default {

if(colores.includes(colorInicial)){
let style = getComputedStyle(document.documentElement)
colorx = this.getVariable(style,'--'+colorInicial)
colorx = this.getVariable(style,'--vs-'+colorInicial)
} else {
if(/[rgb()]/g.test(colorInicial)){
colorx = colorInicial.replace(/[rgb()]/g,'')
} else if(/[#]/g.test(colorInicial)){
let rgbx = this.hexToRgb(colorInicial)
colorx = `${rgbx.r},${rgbx.g},${rgbx.b}`
} else {
colorx = '--'+colorInicial
colorx = '--vs-'+colorInicial
}
}
return colorx
// this.setCssVariable('--'+clave,colorx)
// this.setCssVariable('--vs-'+clave,colorx)
}
}

0 comments on commit fd488ed

Please sign in to comment.