Buttons > Haml > Apply GitLab UI button styles to HAML buttons
The goal of this epic is applying GitLab UI button styles to all buttons in HAML. All these views style buttons using a combination of Bootstrap button styles and GitLab button [customizations](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/stylesheets/framework/buttons.scss#L146), for example: ```haml %button.btn.btn-success %a.btn.btn-default = button_tag 'Reply...', class: 'btn btn-text-field' = link_to _("Accept invitation"), accept_invite_url(@token), method: :post, class: "btn btn-success" ``` By "applying" GitLab UI button styles, we mean adding the GitLab UI button class selectors to each instance. For example: ```haml -# Replace this %button.btn.btn-success -# With this %button.btn.gl-button.btn-success ``` ### Instances identified We have identified the following type of buttons that we have to style in HAML views: - `button_to.*?[^-]btn[^-_]` <- buttons created with `button_to` helper - `button_tag.*?[^-]btn[^-_]` <- buttons created with `button_tag` helper - `%button.*?\.?[^-]btn[^-_]` <- buttons created using HAML syntax - `link_to.+?[^-]btn[^-_]` <- link buttons created with `link_to` helper - `%a.*?\.?[^-]btn[^-_]` <- link buttons created using HAML syntax All these buttons are styled using Bootstrap button styles. ## Instructions TODO: Provide detailed instruction about how to apply GitLab UI button classes to existing button HAML views. In particular, how to achieve the same variant styles.
epic