Skip to content

Instantly share code, notes, and snippets.

@anovsiradj
Created June 8, 2016 13:46
Show Gist options
  • Save anovsiradj/06e4ffac06c05872391458a75265f07f to your computer and use it in GitHub Desktop.
Save anovsiradj/06e4ffac06c05872391458a75265f07f to your computer and use it in GitHub Desktop.
Blogger (blogspot) dynamic CSS class.
<!-- put inside <head/> tag -->
<style>
<b:loop index='i' values='1 to 100' var='n'>
<b:if cond='data:n%5 == 0'>
.w-<data:n/>p {width:<data:n/>%;}
.h-<data:n/>p {height:<data:n/>%;}
</b:if>
</b:loop>
</style>
<!--
usage:
<div class="w-100p"/>
<span class="w-5p">hai</hai>
etc.
live demo in my blog (http://ne-a-r.blogspot.com/)
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment