[go: up one dir, main page]

Skip to content

Create instance variable for Flash Partial

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

This is related to Issue > #267751 (closed). Please see the comment > #267751 (comment 453228166)

Here's an instance where it'd be so nice if we could add extra class on the Flash partial file app/views/layouts/_flash.html.haml.

Inline View Side-by-side View
image image

To fix this, we had to add some new CSS styles > MR !48439 (merged). This is not ideal, because we prefer using utility class instead of adding new CSS. And in this situation, we can definitely use our utility class to solve this.

Proposal

In app/views/projects/commit/show.html.haml, we have access to an instance variable @content-class for us to add additional class to the content. It would be nice if we could do the same for our Flash container; for instance @extra-flash-class: 'gl-mx-auto'.

Edited by 🤖 GitLab Bot 🤖