-
Notifications
You must be signed in to change notification settings - Fork 99
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
fix: no styling applied to h1-headings in markdown (closes #1668) #1743
Conversation
Hi @mschmidm, thank you for your contribution. 👍🏻 I will do a quick review. |
@mschmidm DCO doesn't pass as your signed-of-by doesn't match your configured values in your git commit... (see https://github.com/nextcloud/forms/pull/1743/checks?check_run_id=17542451176) This should be fixed on your end so that this check will also pass (see dcoapp/app#114 (comment)) Other than that, the PR looks fine :) |
…1668) Signed-off-by: Michael Schmidmaier <mschmidm@users.noreply.github.com>
9ae2911
to
2ea3fb3
Compare
Ah okay, the DCO should be fixed now. Thank you! :) |
Ok, but should we sanitize the markdown output to move h1 and h2 to h3 and h4 (and others as well)? |
@susnux in which case? Could you please post a screenshot? |
Seems reasonable, but I think this is different issue. @Chartman123 I think susnux means that it is currently possible (and likely) two have an incorrect heading order. The form title is a h2. If the user now adds a h1 in the description, there is a wrong order, which is discouraged due to accessibility. |
Lets first merge this and then fix the heading orders for descriptions later on |
Yes because in the end we couldn't make sure that a description of a question that is semantically below a description of a form mustn't contain a header with a smaller number... And what to do with a h6 header then... It's a difficult topic |
This fixes #1668 about h1-markdown-headings not being styled.
Bug Explanation
The reason why h1 elements weren't styled but h2 elements were is that h2 got its styling from nextcloud/server/core/css/apps.scss:60-68 which does not contain h1 styles, as the comment explains:
As a fix, I added a custom h1 styling to markdownOutput.scss. I just used the styling from the form title.
Results
Now this:
Becomes this: