Irrespective of adapting to use Resource or Slinghttpservletrequest.With latest sling jar, You can use below code to get access@ScriptVariableprivate Style currentStyle;You can refer : https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components/blob/d4a9c2c7785f5d50e91dd2ebe145ace4a0bb7491/bund...