Skip to content
GitLab
    • Explore Projects Groups Snippets
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
  • !18921

Update docs to include mention of the custom variables file

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Mark Otto requested to merge v4-custom-docs into v4-dev 9 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 2

Follow up to #18398.

screenshot 2016-01-17 16 04 26
Compare
  • v4-dev (base)

and
  • latest version
    dd4062f2
    1 commit, 2 years ago

2 files
+ 24
- 6

    Preferences

    File browser
    Compare changes
docs/getti‎ng-started‎
optio‎ns.md‎ +21 -3
sc‎ss‎
_custo‎m.scss‎ +3 -3
docs/getting-started/options.md
+ 21
- 3
  • View file @ dd4062f2

  • Edit in single-file editor

  • Open in Web IDE


@@ -4,11 +4,29 @@ title: Customization options
group: getting-started
---
With Bootstrap 4, we've added a handful of global options for easily customizing all the components in your project. These options are handled by Sass variables. Simply change a variable's value and recompile with the included Gruntfile.
Customize Bootstrap 4 with our built-in custom variables file and easily toggle global CSS preferences with new `$enable-*` Sass variables. Override a variable's value and recompile with the included Gruntfile as needed.
## Available variables
## Customizing variables
You can find and customize these variables in our `_variables.scss` file.
Bootstrap 4 ships with a `_custom.scss` file for easy variable overrides. Copy and paste relevant lines from `_variables.scss` into the custom file and recompile your Sass to change our default values. **Be sure to remove the `!default` flag from override values.**
For example, to change out the `background-color` and `color` for the `<body>`, you'd do the following:
{% highlight scss %}
// Bootstrap overrides
//
// Copy variables from `_variables.scss` to this file to override default values
// without modifying source files.
$body-bg: $gray-dark;
$body-color: $gray-light;
{% endhighlight %}
Do the same for any variable you need to override, including the global options listed below.
## Global options
You can find and customize these variables for key global options in our `_variables.scss` file.
| Variable | Values | Description |
| --------------------------- | ---------------------------------- | ----------------------------------------------------------------------- |
scss/_custom.scss
+ 3
- 3
  • View file @ dd4062f2

  • Edit in single-file editor

  • Open in Web IDE

// Custom Overrides
// Bootstrap overrides
//
// Copy settings from `_variables.scss` to this file to override
// the Bootstrap defaults without modifying key, versioned files.
// Copy variables from `_variables.scss` to this file to override default values
// without modifying source files.
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
2
css docs
2
css docs
    Assign labels
  • Manage project labels

Milestone
v4.0.0-alpha.3
v4.0.0-alpha.3
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Mark Otto
Reference: twbs/bootstrap!18921
Source branch: v4-custom-docs

Menu

Explore Projects Groups Snippets