Roots 7 - What Happened to the Comments Styling?

I am wondering what happened to the roots comment styling in Roots 7x? The inputs have no class. Is this a mistake?

No mistake:

That was a terrible decision. So to use that styling, I need to download the old version and copy over the code?

Or you can apply the Bootstrap styles via LESS. See here: and here

1 Like

I agree with Wordpress Guy, why remove the excellent Bootstrap base styling? can we keep it in the master branch as an option?

@cfx… your fix seems like allot more work then downloading 7.0.1, (which has been working great to serve my needs) do you have a fork with these changes?

I’m thinking about forking 7.0.1 to maintain the classes for comment styling.

Thank you for sharing that code @cfx. The less solution is just as efficient, I am very surprised that its not included in roots by default. One or the other should be included by default, In my opinion. But, your code worked great so again, I thank you for that. Hopefully it gets someones attention and is included in roots by default in place of the PHP solution.

Glad to help. Roots is at a point where the core devs are moving towards making it framework agnostic. In the meantime, @erikkowalski’s idea is perfectly doable and you’re free to use any version of Roots that suits your build. It’s not always necessary to be bleeding edge :wink:

Before we get too distracted, there was a point in removing the comment stuff as Roots moves towards being framework agnostic.

I do agree that some basic styling of the comments is needed to replace what was removed, but maybe not as heavy as the PR from @cfx. At least we should be providing an appropriate LESS partial file and some blank selectors, maybe even remove the default list style and padding of the UL/LI.

I’m not so sure. I say that because Roots is a starter theme. If you look at the main other starter theme that people use: Underscores, it comes COMPLETELY unstyled. Since Roots is also used as a starter theme, and that’s what it’s always tried to be, I don’t think less styling is necessarily a bad thing.

@kalenjohnson I do agree that it is a starter theme, but I feel like Roots is more focused on providing a much better overall environment and toolset, and as such I feel like we can take things just a tad further then Underscores. We already do this with the build scripts, LESS, DOM-Based Routing, Wrapper, Activation, Config, etc. Underscore also does provide a SMALL amount of styling to comments, even if its more of a “good practice” set of margins and displays.

I would bet the farm that 100% of the time a person will not use the default UL/LI styles (padding and list-style) that comments output. The few times I have used Underscores, removing these things were always the first item addressed when styling comments. We already provide LESS partials covering several “Layout” and “Component” areas. Granted most of these are stubs and contain no code, but they provide a organizational standard that I think IS core to Roots.

I have yet to really see or understand why including some basic building blocks would be a negative any any sense… Im open to hearing differing opinions tho.

1 Like

Hey, just one more question about the comments. I am having trouble seeing how to change, or where the avatar size is specified. Its 32px by default and I cannot seem to change it. In previous versions, get_avatar was used in comment.php.

For this to be changed, I will need to re-create the comment.php file anyway, correct? I believe that lends credence to the idea the comments template should remain in by default. Whle @ctf code works to style the comments 90% of the way, an additional PHP file still needs to be created to change the size of the avatar.

EDIT: Just realized this can be controlled within wp_list_comments(); Cancel my last comment. :smile:

I believe changing the actual avatar size itself is within the provenance of WordPress functions. Note that if you’re using my pull request that you will need to also change the @avatar-size LESS variable here to properly indent comment text and replies.

Added some base styling for now.


@ben Thanks for pushing that update. I just setup a new local build, it totally resolved my issue.

Wouldn’t it make sense then to introduce child theming to roots as the default option? That way the core files could be updated without affecting any customizing. AFAIK roots is still just meant as a theme to build upon exclusively!?

1 Like

There’s nothing preventing anyone from using Roots as a parent and creating your own child theme. If you plan to keep your theme continually updated to the bleeding edge and you don’t have in depth knowledge of Git then it’s a viable strategy.

1 Like

Yes, basically. Child themes were built for customizing a theme that was already built. Some people have taken this idea and built “theme frameworks” as parent themes as well, I believe this is what Genesis does. But Roots is a starter theme, in the same way that underscores is a starter theme. You build on top of it. It becomes your theme. If there are updates you want in future releases of Roots, you can integrate them manually, but it’s not a requirement or necessity.