Functionally Great, But Need Better Elements for Web Design
-
The plugin works great, creates a nice looking PDF file of a post. My only complaint is that the web elements that get written out aren’t well designed, so it’s difficult for us web designers to position the PDF icon without having to create a child theme and muck around with the code.
For example, if I choose to position the icon to the left, I get this HTML structure for the PDF icon:
<div style=text-align:left;> <a class="wpptopdfenh" target="_blank" rel="noindex,nofollow" href="/2015/04/25/mypost/?format=pdf" title="Download PDF"> <img alt="Download PDF" src="https://example.com/wp-content/plugins/wp-post-to-pdf-enhanced/asset/images/pdf.png"> </a> </div>
The wpptopdfenh class should have been moved to the enclosing
<div>
instead part of the link element. That way, it would have been much easier to position and style the icon.Second, the inline style for the enclosing
<div>
makes it too difficult to override (providing you can target the<div>
in the first place). I would have to use an !important clause to override any inline styling.A better implementation of the plugin would be to output a structure like this:
<div class="wpptopdfenh alignleft"> <a target="_blank" rel="noindex,nofollow" href="/2015/04/25/mypost/?format=pdf" title="Download PDF"> <img alt="Download PDF" src="https://example.com/wp-content/plugins/wp-post-to-pdf-enhanced/asset/images/pdf.png"> </a> </div>
And then enqueue an external stylesheet that looks like this:
.wpptopdfenh.alignleft { text-align: left; } .wpptopdfenh.alignright { text-align: right; }
That would make it easier to adjust the positioning of the icon in case I want to adjust it slightly up or down, make it inline-block with some existing elements, etc. If I wanted to style the link itself, I could just use a .wpptopdfenh a selector.
I hope you will please consider this for your next update.
- The topic ‘Functionally Great, But Need Better Elements for Web Design’ is closed to new replies.