According to this thread inline CSS is not allowed to prevent an attacker from injecting a script. However does anybody know what is Salesforce's stance on adding inline CSS after the component has finished loading.


handleAnEvent(evt) {
    this.myElement.style.top = '122' + px;
  • 1
    I think it will be flagged. What won't be is adding or changing the classes associated with an element.
    – Phil W
    Aug 21, 2021 at 18:27
  • Thanks @PhilW. I am aware about the changing of the classes. Unfortunately not all styling can be predicted for the use of classes. Thanks for the response though, I am going to take a different approach.
    – Arthlete
    Aug 21, 2021 at 19:04


You must log in to answer this question.

Browse other questions tagged .