Page MenuHomePhabricator

Codex message box strips required bottom padding from <pre> elements
Open, Needs TriagePublicBUG REPORT

Assigned To
None
Authored By
Dragoniez
Thu, Aug 6, 12:10 AM
Referenced Files
F97327493: Screenshot (7).png
Thu, Aug 6, 12:10 AM
F97327479: Capture.PNG
Thu, Aug 6, 12:10 AM

Description

Steps to replicate the issue (include links if applicable):

  • On Special:AbuseFilter/<id>, try to save a filter with a syntax error.

What happens?:

  • An error message is displayed in a Codex message box. The intended padding-bottom on the contained <pre> element is stripped.

Capture.PNG (786×304 px, 23 KB)

Screenshot (7).png (786×324 px, 36 KB)

It appears that this is caused by the following CSS rule introduced in T340797: Codex message box should reset margins on child nodes (Message.vue#434):

	&__content > *:last-child {
		margin-bottom: 0;
		padding-bottom: 0;
	}

What should have happened instead?:

The padding-bottom of the <pre> element should be preserved.

I can think of three approaches to this issue:

  1. Exclude certain elements from the * selector on the Codex side.
  2. Override the styling in AbuseFilter.
  3. Stop using a pre tag in the relevant AbuseFilter message.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):