# Customize CSS

If your project is using gulp but doesn't compiles sass to css, you may want to check out
**[this gulp task](https://github.com/Geta/EPi.Foundation/blob/master/src/Foundation.Web/Infrastructure/gulp-tasks/css.js)**.

## Use the default theme as a boilerplate

The components displayed in
**[the demo page](https://geta.github.io/checkout/demo/)**
are using a default theme.
<br>
You may want to use this theme as a starting point.

Copy
**[this sass file](https://github.com/Geta/checkout/blob/master/src/ui/default-theme.scss)**
into your project and change
<br>
`@import 'index'` to
<br>
`@import 'node_modules/geta-checkout/src/ui/index'`.
<br>
This will load
**[the built-in mixins](https://github.com/Geta/checkout/blob/master/src/ui/index.scss).**

Then, start changing the variables, mixins, e.t.c.
<br>
Remember to remove the `@include`s you don't need.

## Configure component mixins

Each mixin can be configured like this:

```scss
@include checkout__component-name (
  $color: blue,
  $background-color: null // don't set a background-color
);
```

Css-selectors can be styled directly too.
<br>
This is useful when passing variables to the mixin isn't enough.

```scss
@include checkout__component-name (
  $color: blue,
  $background-color: null
){
  @include my-gradient;

  &__child-element {
    @include my-gradient;
  }
};
```

## Writing CSS from scratch

Instead of including component mixins, you may want to write CSS from scratch.
<br>
All css class names follow the [BEM](http://getbem.com) convention.

```scss
.component-name {
  &--modifier {}
  &__child-element {}
}
```

## Other

### Namespacing

All built-in mixins are prefixed with the string `checkout__`.
<br>
This is to avoid accidentally overriding sass mixins that may be in a project.

### Media queries

To change the "mobile" breakpoint used by the component mixins, add this variable before including the component mixins:

```scss
$checkout__breakpoint: 720px;
```

You may also want to use the built-in media query mixins in your custom theme:

```scss
@include checkout__media-small {
  // Css for narrow screens
}

@include checkout__media-large {
  // Css for wide screens
}
```