Lightweight and minimal code. Spend less time overriding styles and focus more time on creating beautiful website applications.
- Overview
- Installation
- Documentation
- Demo
- Modules and Components
- Templates
- Support
- Authors
- Credits
- License
Base itself is a very thin layer which includes Normalize.css and a few mixins to get you started.
You can then include what you need on top of Base such as typography, grids, individual components, etc and make it yours.
If you are creating a new project from scratch, it is highly recommended that you use base starter.
git clone https://github.com/getbase/starter.git \
new-website && cd new-website && rm -rf .git
npm install && npm start
For existing projects, simply install base using NPM.
npm install --save @getbase/base
Once you have Base installed, you can build on top of it by including your own custom styles or add the ready made modules
import url("https://cdn.rawgit.com/getbase/base/master/css/index.css");
/* Import Base */
@import "node_modules/@getbase/base/scss/index";
/* Your Other Styles */
@import "main"
/* Import Base */
@import "node_modules/@getbase/base/scss/index";
/* Your Other Styles */
@import "main"
Base includes the latest version of Normalize.css by default and includes a few Mixins to get you started.
Variable | Purpose | Default |
---|---|---|
$breakpoint-m |
Breakpoint value for medium devices (tablet) | 740px |
$breakpoint-l |
Breakpoint value for large devices (desktop) | 960px |
$breakpoint-x |
Breakpoint value for extra large devices (HD) | 1120px |
Mixin | Purpose | Example | Outcome |
---|---|---|---|
@include breakpoint(x) |
Apply a breakpoint for a particular device. Accepts values m , l and xl (m: medium, l: large, xl: extra large) |
.box { @include breakpoint(m) { ... } } |
Applies styles to .box for medium devices and up |
@include background-alpha(hex, percentage) |
Applies a background color with opacity | @include background-alpha(#000, 50%) |
Applies a background color of black with opacity set to 50% |
@include animation(time) |
Applies animation speed | @include animation(2s) |
Animation will run for 2 seconds |
Variable | Purpose | Default |
---|---|---|
@breakpoint-m |
Breakpoint value for medium devices (tablet) | 740px |
@breakpoint-l |
Breakpoint value for large devices (desktop) | 960px |
@breakpoint-x |
Breakpoint value for extra large devices (HD) | 1120px |
Mixin | Purpose | Example | Outcome |
---|---|---|---|
.background-alpha(hex, percentage) |
Applies a background color with opacity | .background-alpha(#000, 50%) |
Applies a background color of black with opacity set to 50% |
.animation(time) |
Applies animation speed | .animation(2s) |
Animation will run for 2 seconds |
View page example with just Base stylesheet applied.
- Typography
- Typography Helpers
- Tables
- Animations
- Layout Helpers
- Containers
- Grid
- Grid Helpers
- Grid Non Responsive
- Buttons
There are a collection of premium templates built with Base which are available to download on Gumroad.
- IE10+ and all other modern browsers.
- Please specify browsers you need to support in
package.json
according to browserslist docs.
- Thanks to Nicolas Gallagher (@necolas) for Normalize.css
Code released under the MIT Open Source license.