It is possible to pass parameters for CSS in class name? For example:
.mrg-t-X { margin-top: Xpx; }
<span class="mrg-t-10">Test</span>
In this example X should be 10.
No it isn't. The closest we have to this is the attr() function, but that only works within the content property:
attr()
content
figure::before { content: attr(data-before) ', '; } figure::after { content: attr(data-after) '!'; }
<figure data-before="Hello" data-after="world"></figure>
1.4m articles
1.4m replys
5 comments
57.0k users