1
|
<!-- @file Instructions for subtheming using the Sass Starterkit. -->
|
2
|
<!-- @defgroup subtheme_sass -->
|
3
|
<!-- @ingroup subtheme -->
|
4
|
# Sass Starterkit
|
5
|
|
6
|
Below are instructions on how to create a Bootstrap sub-theme using a Sass
|
7
|
preprocessor.
|
8
|
|
9
|
- [Prerequisites](#prerequisites)
|
10
|
- [Additional Setup](#setup)
|
11
|
- [Overrides](#overrides)
|
12
|
|
13
|
## Prerequisites
|
14
|
- Read the @link getting_started Getting Started @endlink and @link subtheme Sub-theming @endlink documentation topics.
|
15
|
- You must understand the basic concept of using the [Sass] CSS pre-processor.
|
16
|
- You must use a **[local Sass compiler](https://www.google.com/search?q=sass+compiler)**.
|
17
|
- You must use the [Bootstrap Framework Source Files] ending in the `.scss`
|
18
|
extension, not files ending in `.css`.
|
19
|
|
20
|
## Additional Setup {#setup}
|
21
|
Download and extract the **latest** 3.x.x version of
|
22
|
[Bootstrap Framework Source Files] into the root of your new sub-theme. After
|
23
|
it has been extracted, the directory should be renamed (if needed) so it reads
|
24
|
`./THEMENAME/bootstrap`.
|
25
|
|
26
|
If for whatever reason you have an additional `bootstrap` directory wrapping the
|
27
|
first `bootstrap` directory (e.g. `./THEMENAME/bootstrap/bootstrap`), remove the
|
28
|
wrapping `bootstrap` directory. You will only ever need to touch these files if
|
29
|
or when you upgrade your version of the [Bootstrap Framework].
|
30
|
|
31
|
{.alert.alert-warning} **WARNING:** Do not modify the files inside of
|
32
|
`./THEMENAME/bootstrap` directly. Doing so may cause issues when upgrading the
|
33
|
[Bootstrap Framework] in the future.
|
34
|
|
35
|
## Overrides {#overrides}
|
36
|
The `./THEMENAME/sass/_default-variables.scss` file is generally where you will
|
37
|
spend the majority of your time providing any default variables that should be
|
38
|
used by the [Bootstrap Framework] instead of its own.
|
39
|
|
40
|
The `./THEMENAME/sass/overrides.scss` file contains various Drupal overrides to
|
41
|
properly integrate with the [Bootstrap Framework]. It may contain a few
|
42
|
enhancements, feel free to edit this file as you see fit.
|
43
|
|
44
|
The `./THEMENAME/scss/style.scss` file is the glue that combines:
|
45
|
`_default-variables.scss`, [Bootstrap Framework Source Files] and the
|
46
|
`overrides.scss` file together. Generally, you will not need to modify this
|
47
|
file unless you need to add or remove files to be imported. This is the file
|
48
|
that you should compile to `./THEMENAME/css/styles.css` (note the same file
|
49
|
name, using a different extension of course).
|
50
|
|
51
|
#### See also:
|
52
|
- @link templates Templates @endlink
|
53
|
- @link subtheme_settings Theme Settings @endlink
|
54
|
- @link registry Theme Registry @endlink
|
55
|
|
56
|
[Bootstrap Framework]: http://getbootstrap.com
|
57
|
[Bootstrap Framework Source Files]: https://github.com/twbs/bootstrap-sass
|
58
|
[Sass]: http://sass-lang.com
|