joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[5.2] remove margin-bottom on .btn styling to prevent nasty offset

Open hans2103 opened this issue 1 year ago • 5 comments

Pull Request for Issue # .

Summary of Changes

This PR will remove the following piece of SCSS and uses proper Bootstrap classNames to achieve the same goal.

https://github.com/joomla/joomla-cms/blob/45adb61f8306b945f43b4326305fafe87c154aa2/build/media_source/templates/site/cassiopeia/scss/vendor/bootstrap/_buttons.scss#L50-L57

PR https://github.com/joomla/joomla-cms/pull/32697 introduced a margin-bottom of .25em on all buttons. A fix made by @brianteeman prevented this to happen on buttons in an input-group. Both are not needed when using proper Bootstrap classNames on the wrapping element.

Testing Instructions

  • Joomla 5.1 with sample data installed.
  • Compile SCSS
  • Head over to page Typography and reduce the viewport. On mobile the elements with className .btn are stacked with a proper gap between.
  • Login on frontend and click an item to edit. On mobile the elements with className .btn are stacked with a proper gap between.
  • Go to a random page to invoke a 404. Inspect the button with home icon and text "Home page". On mobile this button has no obsolete margin-bottom anymore. And all elements with className .btn don't have a obsolete margin-bottom anymore.

Actual result BEFORE applying this Pull Request

Scherm­afbeelding 2024-04-10 om 17 15 10 Scherm­afbeelding 2024-04-10 om 17 13 25 Scherm­afbeelding 2024-04-10 om 17 12 12

Expected result AFTER applying this Pull Request

Scherm­afbeelding 2024-04-10 om 17 15 31 Scherm­afbeelding 2024-04-10 om 17 13 05 Scherm­afbeelding 2024-04-10 om 17 12 32

Comment

Even Bootstrap core has no margins around buttons. See screenshot below where I have disabled the DOCS styling.

Scherm­afbeelding 2024-04-10 om 17 05 01

Link to documentations

Please select:

  • [ ] Documentation link for docs.joomla.org:

  • [ ] No documentation changes for docs.joomla.org needed

  • [ ] Pull Request link for manual.joomla.org:

  • [ ] No documentation changes for manual.joomla.org needed

hans2103 avatar Apr 10 '24 15:04 hans2103

Which was the PR I made a partial fix in? Would like to check exactly what the issue it was fixing is still fixed. Thanks

brianteeman avatar Apr 10 '24 15:04 brianteeman

Which was the PR I made a partial fix in? Would like to check exactly what the issue it was fixing is still fixed. Thanks

https://github.com/joomla/joomla-cms/pull/33928

Long live git blame for this.

hans2103 avatar Apr 11 '24 07:04 hans2103

Thanks

brianteeman avatar Apr 11 '24 08:04 brianteeman

This pull request has been automatically rebased to 5.2-dev.

HLeithner avatar Apr 24 '24 09:04 HLeithner

I have tested this item :white_check_mark: successfully on bbc2940bac8c5f50d68fd4653ac28f356ecfe802


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43247.

JeroenMoolenschot avatar Jul 01 '24 11:07 JeroenMoolenschot

I have tested this item :white_check_mark: successfully on 59254e368d3e5b861030a91a434dc3ee1c5bfb38


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43247.

RickR2H avatar Jul 03 '24 10:07 RickR2H

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43247.

Quy avatar Jul 03 '24 20:07 Quy

Thanks @hans2103 !

pe7er avatar Jul 11 '24 16:07 pe7er