Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(accordion): merge selectors for border-radius rule #39697

Merged
merged 2 commits into from Feb 22, 2024

Conversation

ZuBB
Copy link
Contributor

@ZuBB ZuBB commented Feb 21, 2024

Description

Two groups of neighboring selectors within _accordion.scss are applying the same style: border-radius: 0. I merged them

Motivation & Context

I was reviewing the actual diff between 5.3.2 and 5.3.3 for dist/css/bootstrap.css and found two groups of neighboring selectors that were applying the same style. I decided to check if merging is possible and if there will be any profit (reduction of the filesize). Tests were OK, and the size was reduced by 23 bytes.

vv@my-precious /tmp/bootstrap $ ls -l dist/css/bootstrap.css
-rw-r--r--  1 vv  wheel  281023 Feb 20 17:06 dist/css/bootstrap.css
vv@my-precious /tmp/bootstrap $ gt co dist/                           
Updated 8 paths from the index
vv@my-precious /tmp/bootstrap $ ls -l dist/css/bootstrap.css
-rw-r--r--  1 vv  wheel  281046 Feb 20 17:08 dist/css/bootstrap.css
vv@my-precious /tmp/bootstrap $

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

https://deploy-preview-39697--twbs-bootstrap.netlify.app

Related issues

#37508

Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems more readable without drawback, I'm fine with it

Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the refactoring @ZuBB! LGTM

@julien-deramond julien-deramond merged commit 4a7ff94 into twbs:main Feb 22, 2024
14 checks passed
@ZuBB ZuBB deleted the slimmer-accordion-css branch February 26, 2024 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants