Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / themes / contrib / bootstrap / starterkits / less / README.md
1 <!-- @file Instructions for subtheming using the Less Starterkit. -->
2 <!-- @defgroup sub_theming_less -->
3 <!-- @ingroup sub_theming -->
4 # Less Starterkit
5
6 Below are instructions on how to create a Bootstrap sub-theme using a Less
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
15   @link sub_theming Sub-theming @endlink documentation topics.
16 - You must understand the basic concept of using the [Less] CSS pre-processor.
17 - You must use a **[local Less compiler](https://www.google.com/search?q=less+compiler)**.
18 - You must use the [Bootstrap Framework Source Files] ending in the `.less`
19   extension, not files ending in `.css`.
20
21 ## Additional Setup {#setup}
22 Download and extract the **latest** 3.x.x version of
23 [Bootstrap Framework Source Files] into the root of your new sub-theme. After
24 it has been extracted, the directory should be renamed (if needed) so it reads
25 `./THEMENAME/bootstrap`.
26
27 If for whatever reason you have an additional `bootstrap` directory wrapping the
28 first `bootstrap` directory (e.g. `./THEMENAME/bootstrap/bootstrap`), remove the
29 wrapping `bootstrap` directory. You will only ever need to touch these files if
30 or when you upgrade your version of the [Bootstrap Framework].
31
32 {.alert.alert-warning} **WARNING:** Do not modify the files inside of
33 `./THEMENAME/bootstrap` directly. Doing so may cause issues when upgrading the
34 [Bootstrap Framework] in the future.
35
36 ## Overrides {#overrides}
37 The `./THEMENAME/less/variable-overrides.less` file is generally where you will
38 the majority of your time overriding the variables provided by the [Bootstrap
39 Framework].
40
41 The `./THEMENAME/less/bootstrap.less` file is nearly an exact copy from the
42 [Bootstrap Framework Source Files]. The only difference is that it injects the
43 `variable-overrides.less` file directly after it has imported the [Bootstrap
44 Framework]'s `variables.less` file. This allows you to easily override variables
45 without having to constantly keep up with newer or missing variables during an
46 upgrade.
47
48 The `./THEMENAME/less/overrides.less` file contains various Drupal overrides to
49 properly integrate with the [Bootstrap Framework]. It may contain a few
50 enhancements, feel free to edit this file as you see fit.
51
52 The `./THEMENAME/less/style.less` file is the glue that combines the
53 [Bootstrap Framework Source Files] and `overrides.less` files together.
54 Generally, you will not need to modify this file unless you need to add or
55 remove files to be imported. This is the file that you should compile to
56 `./THEMENAME/css/styles.css` (note the same file name, using a different
57 extension of course).
58
59 #### See also:
60 - @link theme_settings Theme Settings @endlink
61 - @link templates Templates @endlink
62 - @link plugins Plugin System @endlink
63
64 [Bootstrap Framework]: https://getbootstrap.com/docs/3.3/
65 [Bootstrap Framework Source Files]: https://github.com/twbs/bootstrap/releases
66 [Less]: http://lesscss.org