Card level CSS classes?
Posted: Fri Apr 28, 2017 11:45 pm
Has anyone had any luck defining card level CSS styles using classes?
While inline styles work well, it's exceedingly tedious to define the styles in that manner for longer cards. I've toyed with it for a while, but I'm not able to make it work. Certainly, deck or app level style definitions would be far easier to manage, but per card-side style definitions would be a benefit for complex/long cards. I saw while searching the forums, a few posts where this was discussed, even hinted that it worked, but no luck in my testing so far.
I'm trying for something along the lines of the following, which would be the entered in the Text 1 column of the excel sheet:
While inline styles work well, it's exceedingly tedious to define the styles in that manner for longer cards. I've toyed with it for a while, but I'm not able to make it work. Certainly, deck or app level style definitions would be far easier to manage, but per card-side style definitions would be a benefit for complex/long cards. I saw while searching the forums, a few posts where this was discussed, even hinted that it worked, but no luck in my testing so far.
I'm trying for something along the lines of the following, which would be the entered in the Text 1 column of the excel sheet:
- Code: Select all
<!-- side 1: Test Card -->
<html>
<head>
<style type="text/css">
.text_center {text-align: center;}
.red {color:red;}
</style>
</head>
<body>
<div class="text_center">
CAUTION
</div>
<ul>
<li class="red">This is some red text.</li>
<li>This is some not red text</li>
</ul>
</body>
</html>