Question

I can't find the syntax about adding CSS properties using zen coding. Maybe I have overlooked the zen-cheat-sheet.

For example, how can I shorten the following:

<div style="background-color: red; float: right;"></div>
Was it helpful?

Solution

Here is full documentation on css property for zen coding way

See this

Your code for above html will be like this :

EDIT :

div[style=background-color:red;float:right;]

OTHER TIPS

div.red_fl_right

Would give it the class that the CSS could then define. From there, you could write this in the CSS file:

red_fl_right{        
    bg
    fl:r
}

After expanding both lines, you can add the "red" to the bg value;

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top