Ask Your Question
4

In what way can I accurately modify my Bootstrap variables using SASS?

asked 2022-03-15 11:00:00 +0000

scrum gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-01-04 00:00:00 +0000

qstack gravatar image

You can modify your Bootstrap variables using SASS in the following ways:

  1. Create a new SASS file: Start by creating a new file (e.g. custom.scss) in your project's SASS directory.

  2. Import Bootstrap's source files: Import the Bootstrap source files into your custom SASS file using the @import statement.

  3. Modify the variables: Override the default Bootstrap variables by assigning new values to them before the @import statement. You can also create new variables if needed.

  4. Compile the SASS file: Compile the SASS file into a CSS file (e.g. custom.css) using a SASS compiler. This will generate a modified version of Bootstrap with your custom variables.

  5. Link the compiled CSS file: Finally, link the compiled CSS file in your HTML document to use the modified version of Bootstrap in your project.

Note: It is recommended to make changes to Bootstrap variables in a separate file rather than modifying the original Bootstrap source files. This will make it easier to update Bootstrap in the future without losing your customizations.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-03-15 11:00:00 +0000

Seen: 7 times

Last updated: Jan 04 '22