Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !36357

Add options to not automatically generate component variants

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/rabuckley/variant-options into main May 14, 2022
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 4

Created by: rabuckley

I was wanting to customise alerts (specifically, removing the border by making it transparent), but I don't want to copy and paste the base (.alert) component out of the imported file (and also .alert-heading, .alert-link, and .alert-dismissible).

Currently if you import the component file there is no way to not have the component variants added too, and these cannot be customised to the same extent as through direct use of the mixins.

This PR adds the option to enable or disable variants through sass option variables, so you could import alerts but set $enable-alert-variants to false to only get the base classes. Then you can import your own file using the mixins directly for custom variants.

For consistency, I have added options for:

  • Alerts
  • Buttons
  • Buttons outlines
  • Tables

But there may be more that I've missed?

If you're happy with the changes I will add documentation in the options (or component?) page.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/rabuckley/variant-options