css - Is it possible to pass a HTML value into a Less function? -
the replace function in less takes string first parameter such as:
replace('test','test','replaced'); replace return replaced in case. can uses variable this:
replace(@text,'test','replaced'); my use case dynamically change attribute of div tag , have replace function change content. this:
div:before{ @text : attr(title); //content:@text; content:replace(@text,'test','replaced'); } <div title="test"></div> <-- title changed dynamically --> less seems not allow this. there way use variable strings replace? there way dynamically change text without javascript/jquery?
Comments
Post a Comment