Suggestion: adding additional classes
-
Developers,
Currently this plugin outputs a unordered list with a different class for each shortcode used – list-pages, sibling-pages, child-pages.
I believe it would be quite useful for styling purposes if they all lists had a class in common so they could all be selected and styled easily. Then applied a specific class for child-pages and sibling-pages lists.
Example: Part I – HTML
<ul class=”list-pages”>
<ul class=”child-pages”>
<ul class=”sibling-pages”>
Example: Part II – CSS
Currently i have to select each class version to style all of them with the same base styles..list-pages,
.sibling-pages,
.child-pages {
text-align: center; }
.list-pages li,
.sibling-pages li,
.child-pages li {
list-style: none;
display: inline-block; }
.list-pages a,
.sibling-pages a,
.child-pages a {
padding: 1em; }Solution: Part I
Provide a class for all lists that are created, as well as more specific classes<ul class=”list-pages”>
<ul class=”list-pages child-pages”>
<ul class=”list-pages sibling-pages”>
Solution: Part II
With a base class available I could select all types and style base styles..list-pages {
text-align: center; }
.list-pages li {
list-style: none;
display: inline-block; }
.list-pages a {
padding: 1em; }Solution: Part III
Secondary classes allow me to target child-pages or sibling-pages and add styles or override existing styles..sibling-pages {}
.sibling-pages li { }
.sibling-pages a {}.child-pages {}
.child-pages li { }
.child-pages a {}Thanks for taking the time to read this. I have been using your plugin for some time, it is super simple to use and maintain, and it saves me quite a lot of headache. I hope you can see the usefulness of my suggestion.
The topic ‘Suggestion: adding additional classes’ is closed to new replies.