Dynamic CMS Gradients in Webflow

Code for the template page:

<style>.XXX{background-image: linear-gradient(90deg, rgba(255,255,255,0) 0%, XXX 100%);"}</style>

Code for the CMS list item:

<div class=“XXX” style="background-image: linear-gradient(90deg, rgba(255,255,255,0) 0%, XXX 100%);"></div>