Set LESS CSS color with PHP -
i have php form stores 6 character hexdecimal color in session variable. @ top of page in head section have
<?php session_start(); if ($_session['globalcolor']) { $globalcolor = $_session['globalcolor']; echo "<style type='stylesheet/less'>"; echo "@mainfirst: #" . $_session['globalcolor'] . ";"; echo "</style>"; } ?> and colors in stylesheet based off of @mainfirst color variable in less stylesheet. nothing changes when printed. how can accept variable in less stylesheet?
less has compiled turn css browser can understand. may better off using plain css.
Comments
Post a Comment