Skip to content

Untangle Markdown/Diffs/Notes CSS mess

Douwe Maan requested to merge dm-md-css into master

Over the years, our CSS around Markdown, diffs, and notes has become quite messy, with a lot of duplication and many little hacks to work around "style interference" between Markdown tables and diff tables, when Markdown tables are nested in diff tables (i.e. diff discussions), or when diff tables occur in a Markdown context (i.e. MR diff suggestions).

I've attempted to untangle this mess, to prevent future styling bugs in this area, and to make the code easier to understand and extend. This will also make it a little bit easier for me to implement https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22177, which depends on consistent styling between actual rendered Markdown content, the Markdown preview, and the new WYSIWYG Markdown editor.

No one MR is single-handedly responsible for the messy state we are in today, of course, but many MRs have attempted to fix bugs by working around the mess that came before them, which ended up contributing to the mess in one way or another. I've manually verified that the changes in this MR don't reintroduce any of the issues addressed by the these MRs:

Edited by Douwe Maan

Merge request reports