Skip to content

H1 are not shown #255

Open
Open
@Jean85

Description

@Jean85

While thinkering with the site, I've found a bug in markdown rendering: top level titles (AKA <h1>) are rendered at the HTML level, but are not visible:

Compare:

The Structure top title is not shown:

image

But it's present in HTML:

image

Maybe it's a CSS issue?

Activity

stefanotorresi

stefanotorresi commented on Feb 19, 2019

@stefanotorresi
Contributor

I think this was done by design by @reinink, see

// H1 titles within markdown pages are automatically
// hidden, since the page titles are given some
// extra design on the website. They can be
// found in the ".page_banner" block.
h1 {
display: none;
}

that said, I think we can easily reinstate them by adding some coherent styiling.

Jean85

Jean85 commented on Feb 19, 2019

@Jean85
MemberAuthor

Reinstating them would create duplication between the green band with the title and the beige part with the parsed markdown document. Maybe we can disable the h1 only if it's the first thing inside the parsed body?

Jean85

Jean85 commented on Feb 19, 2019

@Jean85
MemberAuthor

I did it and it works, but the h1 are not styled at all! 😄

I'll try to add some rules...

vdelau

vdelau commented on Jul 13, 2021

@vdelau
Member

I think we need to fix this. The most important place where I feel duplication of headers is weird, is in the PSR documents and the personnel which are included from fig-standards.

I'm wondering if we can somehow expose the post type as a class somewhere in the page (body, markdown container), so we can do something like .post_type_psr .markdown h1:first-of-type {display: none;}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @vdelau@stefanotorresi@Jean85

      Issue actions

        H1 are not shown · Issue #255 · php-fig/www.php-fig.org