Customize CSS
If your project is using gulp but doesn't compiles sass to css, you may want to check out this gulp task.
Use the default theme as a boilerplate
The components displayed in
the demo page
are using a default theme.
You may want to use this theme as a starting point.
Copy
this sass file
into your project and change
@import 'index' to
@import 'node_modules/geta-checkout/src/ui/index'.
This will load
the built-in mixins.
Then, start changing the variables, mixins, e.t.c.
Remember to remove the @includes you don't need.
Configure component mixins
Each mixin can be configured like this:
@include checkout__component-name (
$color: blue,
$background-color: null // don't set a background-color
);
Css-selectors can be styled directly too.
This is useful when passing variables to the mixin isn't enough.
@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.
All css class names follow the BEM convention.
.component-name {
&--modifier {}
&__child-element {}
}
Other
Namespacing
All built-in mixins are prefixed with the string checkout__.
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:
$checkout__breakpoint: 720px;
You may also want to use the built-in media query mixins in your custom theme:
@include checkout__media-small {
// Css for narrow screens
}
@include checkout__media-large {
// Css for wide screens
}