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
  • Issues
  • #35945
Closed
Open
Issue created Mar 03, 2022 by Administrator@rootContributor2 of 2 checklist items completed2/2 checklist items

Utilities map configuration functions

Created by: romaricpascal

Prerequisites

  • I have searched for duplicate or closed feature requests
  • I have read the contributing guidelines

Proposal

It'd be great if Bootstrap was providing functions or mixins to manipulate that utilities hash a bit more easily. I'm thinking something like:

  • utilities-add-values($utility-name, $values) for adding values to a specific utility
  • utilities-set-values($utility-name, $values) for replacing the values of a utility completely
  • utilities-remove-values($utility-name, $values) for removing targeted values of a utility
  • utilities-set-options($utility-name, $options) to set specific options like responsive
  • utilities-add($new-utility-name, $options) to add a new utility class
  • utilities-remove($utility-name) to completely remove a utility

I'm thinking mixins would provide the best API from a usage point of view, similarly to what sass-mq does for adding breakpoints. allowing to only do:

@include utilities-add-values(...)

instead of having to assign the result of the function each time:

$utilities: utilities-add-values(...)

Motivation and context

The API for manipulating the $utilities map is well documented, but it relies on the low level map-merge. This makes it a bit of a mouthful to write the operations, especially for adding new values to existing utilities.

Assignee
Assign to
Time tracking