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

CSS: $prefix to the whole assets #37617

Merged
merged 4 commits into from
Dec 18, 2022

Conversation

louismaximepiton
Copy link
Member

@louismaximepiton louismaximepiton commented Dec 9, 2022

Description

Changed bs- to #{$prefix}.

Motivation & Context

Feel like it will ease the work on some forks for folks since they won't need to change every bs- in the scss files if they use a different prefix.
Following the additions done in #35857 in assets/brand for example.

Type of changes

  • Refactoring (non-breaking change)

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

Related issues

NA

@julien-deramond
Copy link
Member

I haven't looked at the details of this PR yet (thanks @louismaximepiton btw) but was there a technical reason @twbs/css-review for having --bs in site/assets/scss/ instead of using the prefix? Seems to be there voluntarily.

@ffoodd
Copy link
Member

ffoodd commented Dec 9, 2022

Docs aren't initially meant to be customized, I guess. I think we had this discussion when we first introduced custom properties in the docs.

@julien-deramond
Copy link
Member

I'll try to look at it asap but the original idea of the PR bs- to #{$prefix} is interesting. Even if our doc is not meant to be customized, since it is compiled in this same project, having #{$prefix} could help while searching for patterns. But I might missing something here.

@mdo
Copy link
Member

mdo commented Dec 16, 2022

I've always wanted to treat the docs as a project using Bootstrap, so that's why I went with the typed out prefix. But I'm fine going either way, ultimately doesn't matter at all to the output or anything else :).

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.

Based on mdo's feedback, let's continue with the same approach in our doc. Thanks @louismaximepiton for your PR. LGTM!

@julien-deramond julien-deramond merged commit 6807008 into twbs:main Dec 18, 2022
@louismaximepiton louismaximepiton deleted the main-lmp-add-css-prefix branch December 19, 2022 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants