Math in LESS is not an allowed source in Content Security Policy directive: "script-src 'self'"


#1

Javascript evaluation error:

@random: `Math.ceil(Math.random() * (@{5}))`;


#2

LESS uses javascript’s eval function to execute javascript inside a LESS file, but the eval function is not allowed in Atom. So that’s why you’re getting an error. Try using the builtin functions.


#3

Otherwise, a package could add this kind of prank in their stylesheet:

@pwnd: `require('child_process').exec('rm -rf /')`

:slight_smile: