-
Notifications
You must be signed in to change notification settings - Fork 7
Don't want to load all of bootstrap?
Robert Hjalmers edited this page Feb 5, 2020
·
5 revisions
Sure, no problem, in fact the team behind bootstrap encourage users to just load the components and styles they need for their project and our theme is no different.
However there are some things that yo might need to consider. In most cases you still want to load the files below just to make sure you have access to all mixins, functions and variables needed for your specific component.
@import "~@sebgroup/bootstrap/scss/core"; // imports all sass variables, mixins and functions used by bootstrap*
@import "~@sebgroup/bootstrap/scss/styles/reboot"; // normalize browser differences using normalize.css**
* Won't add any overhead as they won't be compiled to css (only contains variables, functions and mixins)
** Read more about normalize.css here
In most cases you'll want to use our font too...
$seb-font-path: "~@sebgroup/fonts/fonts" !default; // set the path for where the fonts are located
@import "~@sebgroup/fonts/scss/seb-fonts"; // import seb fonts
@import "~@sebgroup/bootstrap/scss/styles/tables"; // import styles for tables
@import "~@sebgroup/bootstrap/scss/styles/buttons"; // import styles for buttons
Below is a list of all the different styles you can import.
Name | Description |
---|---|
functions | functions used by bootstrap, eg. get dark och light color based on input color to get best contrast |
variables | all variables used by bootstrap, including colors, margins etc. |
mixins | mixins are also divided into sub groups eg. button mixins if you want to apply the button style to some other class |
root | will add colors, fonts and grid breakpoints as css variables to root |
basic print styles | |
reboot | normalize browser differences |
type | styles for headings, lead texts, display classes etc. |
images | image thumbnails |
code | code styles for code examples etc. |
grid | bootstraps grid |
tables | table styles |
forms | form styles including form validation |
buttons | button styles |
transitions | fade transition and collapse class |
dropdown | styles for dropdowns |
button-group | styles for button groups |
input-group | styles for input groups |
custom-forms | styles for custom forms (checkboxes, slide toggles and radio buttons) |
nav | style for nav elements |
navbar | style for navbar |
card | style for cards |
breadcrumb | style for breadcrumbs |
pagination | style for pagination |
badge | style for badges |
jumbotron | style for jumbotron |
alert | style for alerts |
progress | style for progress bar |
media | style for media lists |
list-group | style for list groups |
close | style for close button |
modal | style for modals |
tooltip | style for tooltips |
popover | style for popovers |
spinners | style for spinners |
carousel | style for carousels |
utilities | utility classes used for visibility, alignment, sizes, responsiveness etc. |
fifth-element | background classes using our fifth element |
scroll | style for scrollbars |