-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subheadings below a heading with no paragraph content are aligned incorrectly. #1826
Comments
Thanks for the issue @Flamenco , but please create a copy of it on the repo for the "Open Publishing Space" theme and I will take a look (I am the author of the inherited theme): https://github.com/hibbitts-design/grav-theme-antimatter-open-publishing UPDATE: I've looked into this and it seems to be coming from the parent theme used (Antimatter) and is intentional as H1 and H2 are used as centering title elements with the theme - glad you found a workaround. You could also use a custom.css file to change the default H1 and H2 alignment if you wished. |
The issue is that the h2 is centered if it has no paragraph above it, but is left justified if there is content. That does not seem correct. |
And it's not just alignment... It looks like a parsing issue to me. In the first screen shot, "bar 1" and "bar 2" are both h2 and should be the same style. |
So the problem is the second h2. I changed the CSS in typography.css from:
to
That solved it for me, but I don't know what that might break... |
Thanks @Flamenco , I will try this in my Open Publishing Space theme too. |
@Flamenco To confirm, what theme are you using? I do not see a typography.css file in Antimatter (or my Open Publishing Space theme). |
This happens on the plain ol' antimatter theme. |
antimatter/template.css |
I changed all the adjacent sibling selectors (+) to general siblings (~) |
Thanks @Flamenco , perhaps it might be best to open this as an issue on the Antimatter repo (https://github.com/getgrav/grav-theme-antimatter)? In the meantime I will also see if I can address it in my inherited theme (my CSS skills are quite basic, thanks for sharing how you are trying to address the issue). |
Using the 'Open Publishing Space' starter
When it do this, the Bar 1 heading is centered instead of left aligned.
Workaround
The text was updated successfully, but these errors were encountered: