cacao-css 3.9.0 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +108 -93
- package/README.md +69 -68
- package/package.json +1 -1
- package/src/css/base/base.css +13 -0
- package/src/css/components/button/button.css +2 -1
- package/src/css/components/form/textinput.css +19 -0
- package/src/css/components/list/columns.css +1 -0
- package/src/css/utils/flex/flex-responsive.css +759 -0
- package/src/css/utils/flex/index.css +1 -0
- package/src/css/utils/margin/index.css +12 -0
- package/src/css/utils/margin/marg-left-lg.css +35 -0
- package/src/css/utils/margin/marg-left-md.css +35 -0
- package/src/css/utils/margin/marg-left-sm.css +35 -0
- package/src/css/utils/margin/marg-left.css +34 -0
- package/src/css/utils/margin/marg-right-lg.css +35 -0
- package/src/css/utils/margin/marg-right-md.css +35 -0
- package/src/css/utils/margin/marg-right-sm.css +35 -0
- package/src/css/utils/margin/marg-right.css +34 -0
- package/src/css/utils/margin/spaced-lg.css +41 -0
- package/src/css/utils/margin/spaced-md.css +41 -0
- package/src/css/utils/margin/spaced-sm.css +41 -0
- package/src/css/utils/margin/spaced.css +40 -0
- package/src/css/utils/size/height.css +25 -0
- package/src/css/utils/size/index.css +2 -0
- package/src/css/utils/size/width.css +25 -0
- package/src/css/utils/typography/typography.css +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,164 +1,179 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## 3.11.0 (Sept 21, 2021)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- Updated .Button class to use `display: inline-flexbox` instead of `display: inline`
|
|
6
|
+
- Updated .TextInput to use `small`, `medium` and `large` class sizes
|
|
7
|
+
- Added responsive flexbox classes
|
|
8
|
+
- Added `margin-right` utility classes
|
|
9
|
+
- Added `margin-left` utility classes
|
|
10
|
+
- Fixed `u-textBreak` so that it uses `overflow-wrap` instead of `word-wrap`
|
|
11
|
+
|
|
12
|
+
## 3.10.0 (July 28, 2021)
|
|
13
|
+
|
|
14
|
+
Updated ColumnList--noStyle to also remove the left padding on the list.
|
|
15
|
+
|
|
16
|
+
## 3.9.0 (April 1, 2021)
|
|
17
|
+
|
|
18
|
+
- Removed the inline block fallback styles for the Grid component since Flexbox is widely supported in browsers now.
|
|
19
|
+
|
|
20
|
+
## 3.8.0 (April 1, 2021)
|
|
6
21
|
|
|
7
22
|
Skipped because this tag already accidentally existed.
|
|
8
23
|
|
|
9
|
-
|
|
24
|
+
## 3.7.0 (Aug 19, 2020)
|
|
10
25
|
|
|
11
|
-
|
|
12
|
-
|
|
26
|
+
- Updated the Gulp configuration to use modern techniques.
|
|
27
|
+
- Added fallback styles for the select menu text when the select menu is focused.
|
|
13
28
|
|
|
14
|
-
|
|
29
|
+
## 3.6.1 (Nov 19, 2018)
|
|
15
30
|
|
|
16
|
-
|
|
31
|
+
- Fixed font issue for select menus
|
|
17
32
|
|
|
18
|
-
|
|
33
|
+
## 3.6.0 (Jan 19, 2018)
|
|
19
34
|
|
|
20
|
-
|
|
35
|
+
- Added auto size utility
|
|
21
36
|
|
|
22
|
-
|
|
37
|
+
## 3.5.0 (Jan 19, 2018)
|
|
23
38
|
|
|
24
|
-
|
|
25
|
-
|
|
39
|
+
- Set the button active/focus state.
|
|
40
|
+
- Set the default state for the image wrapper to be inline-block so that the caption is under the image.
|
|
26
41
|
|
|
27
|
-
|
|
42
|
+
## 3.4.0 (Nov 6, 2017)
|
|
28
43
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
44
|
+
- Set a specific color for select input border.
|
|
45
|
+
- Added default table border collapse styles.
|
|
46
|
+
- Added basic print styles.
|
|
32
47
|
|
|
33
|
-
|
|
48
|
+
## 3.3.0 (Oct 16, 2017)
|
|
34
49
|
|
|
35
|
-
|
|
50
|
+
- Adjusted some of the font sizes and margins to be based of of rem and ems instead of pixels.
|
|
36
51
|
The goal is to improve accessibility and relative font sizing.
|
|
37
52
|
|
|
38
53
|
## 3.2.0 (Oct 13, 2017)
|
|
39
54
|
|
|
40
|
-
|
|
55
|
+
- Added ImageWrapper and ImageCaption classes.
|
|
41
56
|
|
|
42
57
|
## 3.1.0 (Oct 13, 2017)
|
|
43
58
|
|
|
44
|
-
|
|
59
|
+
- Moved the text input and select menu styles to be under the "forms" component.
|
|
45
60
|
|
|
46
61
|
## 3.0.0 (Oct 13, 2017)
|
|
47
62
|
|
|
48
|
-
|
|
63
|
+
- Changed the focus of Cacao to be just on the CSS. A Yeoman generator called [cacao-branchcms](https://github.com/aptuitiv/generator-cacao-branchcms) has been setup to bootstrap a site with Cacao, theme files, images and Javascript.
|
|
49
64
|
|
|
50
65
|
## 2.8.0 (July 25, 2017)
|
|
51
66
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
67
|
+
- Added notes about setting up a new site
|
|
68
|
+
- Removed the 'default' value for the Javascript tag since it's default one already.
|
|
69
|
+
- Updated packages and stylelint
|
|
55
70
|
|
|
56
71
|
## 2.7.0 (July 7, 2017)
|
|
57
72
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
73
|
+
- Fixed the order of the javascript in the footer.
|
|
74
|
+
- Added support for copying theme files as a gulp task.
|
|
75
|
+
- Updated stylelint.
|
|
76
|
+
- Form templates - moved the field description to be below the field and to be a smaller font size.
|
|
77
|
+
- Changed the default Javascript placement to be in the footer.
|
|
78
|
+
- Updated slick carousel to the latest version.
|
|
79
|
+
- Added drift-zoom library for zooming images when hovering over them.
|
|
80
|
+
- Added "xl" utility selector size.
|
|
81
|
+
- Changed the gulp-changed-in-place plugin for gulp-newer. That plugin works better with gulp-remember to combine all source files even if one changed. gulp-changed-in-place would only process the one changed file.
|
|
67
82
|
|
|
68
83
|
## 2.6.0 (May 27, 2017)
|
|
69
84
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
85
|
+
- Removed dist folder.
|
|
86
|
+
- Updated packages to latest versions.
|
|
87
|
+
- Included SVG files in the type of images to be processed.
|
|
88
|
+
- Changed build path to 'build' instead of 'dist'.
|
|
89
|
+
- Added theme files and moved all layout files to be built to build/theme/custom.
|
|
90
|
+
- Added Header/Footer as default style components.
|
|
91
|
+
- Updated navigation templates.
|
|
92
|
+
- Added Breadcrumb default style.
|
|
93
|
+
- Added list arrow styles.
|
|
94
|
+
- Updated default button styles.
|
|
95
|
+
- Added pagination styles.
|
|
96
|
+
- Added default footer navigation.
|
|
97
|
+
- Added default Content container styles.
|
|
98
|
+
- Added default background utility style.
|
|
99
|
+
- Added arrange component styles.
|
|
100
|
+
- Added form templates.
|
|
101
|
+
- Updated gulp watch task to use glob-watcher instead of gulp-batch as sometimes gulp-batch would stop recognizing changed files.
|
|
102
|
+
- Added new 5/3 constrain size.
|
|
103
|
+
- Added sidebar navigation.
|
|
104
|
+
- Updated the BEM linter utilitySelector to include “xs-“ as a utility size.
|
|
105
|
+
- Updated Constrain and FlexEmbed ratios to be consistent.
|
|
106
|
+
- Updated form styles.
|
|
107
|
+
- Added blog theme templates.
|
|
108
|
+
- Added store theme templates.
|
|
109
|
+
- Added ColumnList styles to convert an ul/ol list into columns.
|
|
110
|
+
- Added jQuery form plugin as part of the core forms javascript.
|
|
111
|
+
- Removed ap_drilldown_plugin.
|
|
97
112
|
|
|
98
113
|
## 2.5.0 (February 12, 2017)
|
|
99
114
|
|
|
100
|
-
|
|
115
|
+
- Changed '0%' to 'auto' for the flex grow utility classes as '0%' was causing issues in some versions of Safari.
|
|
101
116
|
|
|
102
117
|
## 2.4.0 (November 25, 2016)
|
|
103
118
|
|
|
104
|
-
|
|
105
|
-
|
|
119
|
+
- Added right margin to radio buttons and checkboxes.
|
|
120
|
+
- Added default styles for disabled inputs.
|
|
106
121
|
|
|
107
122
|
## 2.3.0 (November 16, 2016)
|
|
108
123
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
124
|
+
- Fixed nunjucks support.
|
|
125
|
+
- Added sample pages to the 'dist' directory to show different responsive navigation options.
|
|
126
|
+
- Added two built-in responsive navigation options in the src/styles/lib/components/navigation folder.
|
|
112
127
|
|
|
113
128
|
## 2.2.0 (November 9, 2016)
|
|
114
129
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
130
|
+
- Added responsive styles for the typography utility classes.
|
|
131
|
+
- Consolidated the dropdown and mainnav navigation components into one "navigation" component.
|
|
132
|
+
- Added margin gutter utility classes.
|
|
133
|
+
- Added responsive styles for all the padding utility classes.
|
|
134
|
+
- Formatted code to have consistent line indents.
|
|
135
|
+
- Added "u-block" responsive styles.
|
|
136
|
+
- Added size12of12 as an alternate full width size class.
|
|
122
137
|
|
|
123
138
|
## 2.1.0 (October 10, 2016)
|
|
124
139
|
|
|
125
|
-
|
|
126
|
-
|
|
140
|
+
- Added left/right padding utilities.
|
|
141
|
+
- Change the u-linkClean class to keep the link "clean" on hover.
|
|
127
142
|
|
|
128
143
|
## 2.0.0 (September 26, 2016)
|
|
129
144
|
|
|
130
|
-
|
|
131
|
-
|
|
145
|
+
- Combined Cacao and Cacao Cracker together to make it easier to get a project started
|
|
146
|
+
- Added some additional documentation
|
|
132
147
|
|
|
133
148
|
## 1.4.0 (September 18, 2016)
|
|
134
149
|
|
|
135
|
-
|
|
136
|
-
|
|
150
|
+
- Added Form component for errors, labels and required elements
|
|
151
|
+
- Added Message component for success and error messages
|
|
137
152
|
|
|
138
153
|
## 1.3.0 (September 9, 2016)
|
|
139
154
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
155
|
+
- Added telephone link styles
|
|
156
|
+
- Changed container width from 960px to 1200px
|
|
157
|
+
- Added extra large gutter sizes
|
|
158
|
+
- Added utility text size classes
|
|
159
|
+
- Changed default table column and header styles to have padding and top vertical alignment
|
|
160
|
+
- Added config file to hold common breakpoints
|
|
161
|
+
- Added responsive margin utility classes
|
|
162
|
+
- Added arrow to the "Back" link for the mobile nav menu
|
|
163
|
+
- Added extra small size utility classes
|
|
149
164
|
|
|
150
165
|
## 1.2.1 (May 26, 2016)
|
|
151
166
|
|
|
152
|
-
|
|
167
|
+
- Updated style lint to conform to version 4.5 where some rules were deprecated and renamed.
|
|
153
168
|
|
|
154
169
|
## 1.2.0 (March 8, 2016)
|
|
155
170
|
|
|
156
|
-
|
|
171
|
+
- Updated style lint max lines rule
|
|
157
172
|
|
|
158
173
|
## 1.1.0 (February 8, 2016)
|
|
159
174
|
|
|
160
|
-
|
|
175
|
+
- Added: visual test styles and tests for components
|
|
161
176
|
|
|
162
177
|
## 1.0.0 (February 2, 2016)
|
|
163
178
|
|
|
164
|
-
|
|
179
|
+
- Initial 1.0 release
|
package/README.md
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
# Cacao
|
|
2
2
|
|
|
3
3
|
A set of CSS modules that provide a solid foundation for starting a new project.
|
|
4
|
-
Includes project scaffolding and build system for CSS using
|
|
4
|
+
Includes project scaffolding and build system for CSS using
|
|
5
5
|
[Gulp](http://gulpjs.com/) and [PostCSS](https://github.com/postcss/postcss).
|
|
6
6
|
|
|
7
7
|
[How to pronounce Cacao](https://www.youtube.com/watch?v=kVSIkXL_Nmo).
|
|
8
8
|
|
|
9
9
|
Cacao stylesheets are based on the [SUIT CSS](https://suitcss.github.io) methodology
|
|
10
|
-
including [naming convention](http://github.com/suitcss/suit/blob/master/doc/naming-conventions.md),
|
|
10
|
+
including [naming convention](http://github.com/suitcss/suit/blob/master/doc/naming-conventions.md),
|
|
11
11
|
[style format](http://github.com/suitcss/suit/blob/master/doc/STYLE.md#css),
|
|
12
12
|
and [architectural principles](http://github.com/suitcss/suit/blob/master/doc/design-principles.md).
|
|
13
13
|
|
|
14
|
-
|
|
15
14
|
## First time usage
|
|
16
15
|
|
|
17
16
|
### Install Gulp and NodeJS globally if you have not already
|
|
@@ -24,62 +23,63 @@ installed. First install the system-wide dependencies listed below:
|
|
|
24
23
|
|
|
25
24
|
## Getting started
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
### 1) Setup your project folder on your machine
|
|
27
|
+
|
|
28
|
+
### 2) Download the Zip file for this repository and unzip into your project folder
|
|
28
29
|
|
|
29
|
-
#### 2) Download the Zip file for this repository and unzip into your project folder.
|
|
30
30
|
`Make sure that you can view hidden files and that the .stylelintrc file is included.`
|
|
31
31
|
|
|
32
|
-
Or, you can clone the repository and use that as your starting base for your website project.
|
|
32
|
+
Or, you can clone the repository and use that as your starting base for your website project.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
### 3) Navigate to the project directory and install local project dependencies
|
|
35
35
|
|
|
36
|
-
Use the command line on your computer to navigate to your projects directory and run the following:
|
|
36
|
+
Use the command line on your computer to navigate to your projects directory and run the following:
|
|
37
37
|
|
|
38
|
-
```
|
|
38
|
+
```terminal
|
|
39
39
|
npm install
|
|
40
|
-
```
|
|
40
|
+
```
|
|
41
41
|
|
|
42
|
-
Depending on how node was installed you may need to use:
|
|
42
|
+
Depending on how node was installed you may need to use:
|
|
43
43
|
|
|
44
|
-
```
|
|
44
|
+
```terminal
|
|
45
45
|
sudo npm install
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
This will install Gulp, download linked projects (like jQuery) and setup the necessary node components to process CSS, combine and uglify Javascript and minify images (amoung other things).
|
|
48
|
+
This will install Gulp, download linked projects (like jQuery) and setup the necessary node components to process CSS, combine and uglify Javascript and minify images (amoung other things).
|
|
49
49
|
|
|
50
|
-
If you are using [WebStorm](https://www.jetbrains.com/webstorm/) then you can simply start a new project using your projects folder, open the Terminal tab in Webstorm and run the above command.
|
|
50
|
+
If you are using [WebStorm](https://www.jetbrains.com/webstorm/) then you can simply start a new project using your projects folder, open the Terminal tab in Webstorm and run the above command.
|
|
51
51
|
|
|
52
52
|
Then run:
|
|
53
53
|
|
|
54
|
-
````
|
|
54
|
+
````terminal
|
|
55
55
|
gulp
|
|
56
56
|
````
|
|
57
57
|
|
|
58
58
|
That will build the CSS and start the watch task.
|
|
59
59
|
|
|
60
|
-
The built resources are located in the new 'dist' folder.
|
|
60
|
+
The built resources are located in the new 'dist' folder.
|
|
61
61
|
|
|
62
|
-
````
|
|
62
|
+
````terminal
|
|
63
63
|
gulp build
|
|
64
64
|
````
|
|
65
65
|
|
|
66
66
|
That will build the CSS.
|
|
67
67
|
Essentially everything the default task does except start the watch task.
|
|
68
68
|
|
|
69
|
-
|
|
70
69
|
## Working with CSS
|
|
71
70
|
|
|
72
71
|
Gulp is used to process the CSS files and compile them together into one CSS file at `dist/css/main.css`.
|
|
73
72
|
|
|
74
73
|
Cacao stylesheets are based on the [SUIT CSS](https://suitcss.github.io) methodology
|
|
75
|
-
including [naming convention](http://github.com/suitcss/suit/blob/master/doc/naming-conventions.md),
|
|
74
|
+
including [naming convention](http://github.com/suitcss/suit/blob/master/doc/naming-conventions.md),
|
|
76
75
|
[style format](http://github.com/suitcss/suit/blob/master/doc/STYLE.md#css),
|
|
77
76
|
and [architectural principles](http://github.com/suitcss/suit/blob/master/doc/design-principles.md).
|
|
78
77
|
|
|
79
78
|
The idea is that you have very focused stylesheets for individual components instead of having one large stylesheet.
|
|
80
79
|
|
|
81
80
|
The following is the folder structure for stylesheets within the `src\css` folder:
|
|
82
|
-
|
|
81
|
+
|
|
82
|
+
````text
|
|
83
83
|
main.css
|
|
84
84
|
config.css
|
|
85
85
|
L base
|
|
@@ -91,21 +91,21 @@ The `main.css` file imports the `config.css` file as well as the `main.css` file
|
|
|
91
91
|
|
|
92
92
|
### config.css
|
|
93
93
|
|
|
94
|
-
The `config.css` file is where global media query breakpoints and global configuration variables are located.
|
|
94
|
+
The `config.css` file is where global media query breakpoints and global configuration variables are located.
|
|
95
95
|
|
|
96
96
|
By default just a few media query breakpoints are setup:
|
|
97
97
|
|
|
98
|
-
````
|
|
98
|
+
````css
|
|
99
99
|
@custom-media --c-bp-xl (max-width: 1200px);
|
|
100
100
|
@custom-media --c-bp-lg (max-width: 1050px);
|
|
101
101
|
@custom-media --c-bp-md (max-width: 800px);
|
|
102
102
|
@custom-media --c-bp-sm (max-width: 600px);
|
|
103
103
|
@custom-media --c-bp-xs (max-width: 425px);
|
|
104
104
|
````
|
|
105
|
-
|
|
105
|
+
|
|
106
106
|
You would use those in your CSS like so:
|
|
107
107
|
|
|
108
|
-
````
|
|
108
|
+
````css
|
|
109
109
|
@media (--c-bp-lg) {
|
|
110
110
|
.Header {
|
|
111
111
|
border: none;
|
|
@@ -116,7 +116,7 @@ You would use those in your CSS like so:
|
|
|
116
116
|
An example usage of global variables would be to setup common colors used so that you don't have to type the same color over and over again. It also makes it convenient to have one place
|
|
117
117
|
to change a color if necessary.
|
|
118
118
|
|
|
119
|
-
````
|
|
119
|
+
````css
|
|
120
120
|
:root {
|
|
121
121
|
--c-blue: #15bdde;
|
|
122
122
|
--c-green: #64a70b;
|
|
@@ -127,7 +127,7 @@ to change a color if necessary.
|
|
|
127
127
|
|
|
128
128
|
You could then use that variable in your CSS like so:
|
|
129
129
|
|
|
130
|
-
````
|
|
130
|
+
````css
|
|
131
131
|
.Button {
|
|
132
132
|
background-color: var(--c-blue);
|
|
133
133
|
}
|
|
@@ -137,7 +137,7 @@ You could then use that variable in your CSS like so:
|
|
|
137
137
|
|
|
138
138
|
The base directory contains the following stylesheets:
|
|
139
139
|
|
|
140
|
-
````
|
|
140
|
+
````css
|
|
141
141
|
base.css
|
|
142
142
|
code.css
|
|
143
143
|
forms.css
|
|
@@ -148,11 +148,11 @@ typography.css
|
|
|
148
148
|
|
|
149
149
|
`index.css` imports the other stylesheets within this folder as well as [Normalize.css](https://necolas.github.io/normalize.css/).
|
|
150
150
|
|
|
151
|
-
The styles in the base folder are the general styles for elements. The direct element tag is used as the selector.
|
|
151
|
+
The styles in the base folder are the general styles for elements. The direct element tag is used as the selector.
|
|
152
152
|
|
|
153
153
|
#### base.css
|
|
154
154
|
|
|
155
|
-
base.css includes the basic styles for `<body>` as well as images, iframe and other elements.
|
|
155
|
+
base.css includes the basic styles for `<body>` as well as images, iframe and other elements.
|
|
156
156
|
|
|
157
157
|
Other than changing the body background this file isn't changed much.
|
|
158
158
|
|
|
@@ -164,23 +164,23 @@ code.css includes basic styles for `<code>`, `<kdb>`, `<pre>` and `<samp>` tags.
|
|
|
164
164
|
|
|
165
165
|
forms.css includes basic styles for `<fieldset>`, `<label>`, `<input>`, `<button>`, `<textarea>` and other form related tags.
|
|
166
166
|
|
|
167
|
-
This file is not changed much.
|
|
167
|
+
This file is not changed much.
|
|
168
168
|
|
|
169
169
|
#### tables.css
|
|
170
170
|
|
|
171
171
|
tables.css includes basic styles for for tables, table columns and table headings.
|
|
172
|
-
|
|
172
|
+
|
|
173
173
|
This files is not changed much.
|
|
174
|
-
|
|
174
|
+
|
|
175
175
|
#### typography.css
|
|
176
176
|
|
|
177
|
-
The typography.css file is the one file in the `base` directory that you would most likely change.
|
|
177
|
+
The typography.css file is the one file in the `base` directory that you would most likely change.
|
|
178
178
|
|
|
179
|
-
It contains the typographical styles for most elements.
|
|
179
|
+
It contains the typographical styles for most elements.
|
|
180
180
|
|
|
181
181
|
For the most part you can simply change the values for the variables at the top.
|
|
182
182
|
|
|
183
|
-
````
|
|
183
|
+
````css
|
|
184
184
|
:root {
|
|
185
185
|
--base-typography-color: #333;
|
|
186
186
|
--base-typography-fontFamily: sans-serif;
|
|
@@ -221,15 +221,15 @@ For the most part you can simply change the values for the variables at the top.
|
|
|
221
221
|
}
|
|
222
222
|
````
|
|
223
223
|
|
|
224
|
-
Or, if necessary you could edit or add styles directly further down in the stylesheet.
|
|
224
|
+
Or, if necessary you could edit or add styles directly further down in the stylesheet.
|
|
225
225
|
|
|
226
226
|
Keep in mind that this is supposed to be general styles for HTML elements. You would not use class selectors in any of the `base` stylesheets. That would take place either in the utility classes or within components.
|
|
227
227
|
|
|
228
228
|
### Components
|
|
229
229
|
|
|
230
|
-
The `components` directory is where you will do most of your work with a site.
|
|
230
|
+
The `components` directory is where you will do most of your work with a site.
|
|
231
231
|
|
|
232
|
-
This directory has a number of included components for things like buttons, dropdown and main navigation bars, text fields, images, and grid.
|
|
232
|
+
This directory has a number of included components for things like buttons, dropdown and main navigation bars, text fields, images, and grid.
|
|
233
233
|
|
|
234
234
|
Many of the components have README files within their directory that explains what they are and how to use them.
|
|
235
235
|
|
|
@@ -239,7 +239,7 @@ Many of the components have README files within their directory that explains wh
|
|
|
239
239
|
|
|
240
240
|
In this example we're going to add a "header" component to hold the styles for the header section of the site.
|
|
241
241
|
|
|
242
|
-
##### 1) To add a new component first create a directory within the `components` directory that matches the name of the component
|
|
242
|
+
##### 1) To add a new component first create a directory within the `components` directory that matches the name of the component
|
|
243
243
|
|
|
244
244
|
Keep in mind that components follow the [naming convention](http://github.com/suitcss/suit/blob/master/doc/naming-conventions.md) of [SUIT CSS](https://suitcss.github.io).
|
|
245
245
|
|
|
@@ -247,31 +247,31 @@ The component folder should always be lowercase.
|
|
|
247
247
|
|
|
248
248
|
In our example the folder would be `header`.
|
|
249
249
|
|
|
250
|
-
##### 2) Add a stylesheet within your component folder that is the same name as your component
|
|
250
|
+
##### 2) Add a stylesheet within your component folder that is the same name as your component
|
|
251
251
|
|
|
252
|
-
In our example the stylesheet would be called `header.css`.
|
|
252
|
+
In our example the stylesheet would be called `header.css`.
|
|
253
253
|
|
|
254
|
-
##### 3) Add a stylesheet within your component folder called index.css and import the other stylesheet
|
|
254
|
+
##### 3) Add a stylesheet within your component folder called index.css and import the other stylesheet
|
|
255
255
|
|
|
256
256
|
In our example the index.css file would include the following:
|
|
257
257
|
|
|
258
|
-
````
|
|
258
|
+
````css
|
|
259
259
|
@import './header';
|
|
260
260
|
````
|
|
261
261
|
|
|
262
262
|
You can include ".css" after "header" if you want but it's not necessary.
|
|
263
263
|
|
|
264
|
-
##### 4) Add an import into `components\index.css` to import the new component
|
|
264
|
+
##### 4) Add an import into `components\index.css` to import the new component
|
|
265
265
|
|
|
266
266
|
In our example you would add the following within `components\index.css`:
|
|
267
267
|
|
|
268
|
-
````
|
|
268
|
+
````css
|
|
269
269
|
@import './header';
|
|
270
270
|
````
|
|
271
271
|
|
|
272
272
|
Since the 'header' directory contains an `index.css` file then that import statement will import the `index.css` file. It's the same as writing
|
|
273
|
-
|
|
274
|
-
````
|
|
273
|
+
|
|
274
|
+
````css
|
|
275
275
|
@import './header/index.css';
|
|
276
276
|
````
|
|
277
277
|
|
|
@@ -281,30 +281,30 @@ It's always good to add a comment at the top of your component stylesheet to des
|
|
|
281
281
|
|
|
282
282
|
The very first comment in the file should follow this structure:
|
|
283
283
|
|
|
284
|
-
````
|
|
284
|
+
````css
|
|
285
285
|
/* =========================================================================== *\
|
|
286
286
|
Description of component here
|
|
287
287
|
\* =========================================================================== */
|
|
288
288
|
````
|
|
289
289
|
|
|
290
|
-
##### 6) Add the `Define` statement to your component stylesheet
|
|
290
|
+
##### 6) Add the `Define` statement to your component stylesheet
|
|
291
291
|
|
|
292
292
|
To enforce the SuitCSS [naming convention](http://github.com/suitcss/suit/blob/master/doc/naming-conventions.md) we add a special comment near the top of the file to set what the
|
|
293
293
|
base class name should be within this file.
|
|
294
294
|
|
|
295
295
|
In our `header` example we would have the following code.
|
|
296
296
|
|
|
297
|
-
````
|
|
297
|
+
````css
|
|
298
298
|
/** @define Header */
|
|
299
299
|
````
|
|
300
300
|
|
|
301
301
|
This will cause the CSS parser to show you a warning in the terminal when the CSS is processed if you are using an invalid selector.
|
|
302
302
|
|
|
303
|
-
Cacao uses the [postcss-bem-linter](https://github.com/postcss/postcss-bem-linter) plugin to enforce naming rules.
|
|
303
|
+
Cacao uses the [postcss-bem-linter](https://github.com/postcss/postcss-bem-linter) plugin to enforce naming rules.
|
|
304
304
|
|
|
305
305
|
The combination of steps 5 and 6 would result in the following code at the top of the header.css file:
|
|
306
306
|
|
|
307
|
-
````
|
|
307
|
+
````css
|
|
308
308
|
/* =========================================================================== *\
|
|
309
309
|
Page header styles. The section of the page above the main navigation.
|
|
310
310
|
\* =========================================================================== */
|
|
@@ -320,13 +320,13 @@ You would then add your CSS below all that.
|
|
|
320
320
|
|
|
321
321
|
If for some reason you need to use a selector in your stylesheet that would not be valid you can add the following comment on the line immediately before your selector:
|
|
322
322
|
|
|
323
|
-
````
|
|
323
|
+
````css
|
|
324
324
|
/* postcss-bem-linter: ignore */
|
|
325
325
|
````
|
|
326
326
|
|
|
327
327
|
That only applies to one selector so you would need to add that before each selector that is not valid.
|
|
328
328
|
|
|
329
|
-
````
|
|
329
|
+
````css
|
|
330
330
|
/* postcss-bem-linter: ignore */
|
|
331
331
|
.invalid-selector {
|
|
332
332
|
color: red;
|
|
@@ -340,11 +340,11 @@ That only applies to one selector so you would need to add that before each sele
|
|
|
340
340
|
|
|
341
341
|
### Utils
|
|
342
342
|
|
|
343
|
-
The `utils` directory includes all of the utility classes.
|
|
343
|
+
The `utils` directory includes all of the utility classes.
|
|
344
344
|
|
|
345
345
|
You would use these to adjust font styles, set grid column sizes, adjust margins apply flex styles and change element layouts.
|
|
346
346
|
|
|
347
|
-
These classes are useful because you can use a combination of them to set a HTML element's style instead of creating a bunch of small components.
|
|
347
|
+
These classes are useful because you can use a combination of them to set a HTML element's style instead of creating a bunch of small components.
|
|
348
348
|
|
|
349
349
|
**If you find yourself adding a lot of utlity classes to an element (other than size classes on Grid columns) then you may want to create a new component instead.**
|
|
350
350
|
|
|
@@ -380,7 +380,7 @@ Adjust the top and/or bottom margins. Includes styles that can be used at differ
|
|
|
380
380
|
|
|
381
381
|
#### padding
|
|
382
382
|
|
|
383
|
-
Adjust the top and/or bottom padding.
|
|
383
|
+
Adjust the top and/or bottom padding.
|
|
384
384
|
|
|
385
385
|
Adjust the horizontal padding with gutter utility classes.
|
|
386
386
|
|
|
@@ -412,13 +412,13 @@ This is commonly used with the Grid component, although, you can use it with any
|
|
|
412
412
|
|
|
413
413
|
To set an element to be full width use:
|
|
414
414
|
|
|
415
|
-
````
|
|
415
|
+
````css
|
|
416
416
|
.u-sizeFull
|
|
417
417
|
````
|
|
418
418
|
|
|
419
419
|
or it's breakpoint versions:
|
|
420
420
|
|
|
421
|
-
````
|
|
421
|
+
````css
|
|
422
422
|
.u-lg-sizeFull
|
|
423
423
|
.u-md-sizeFull
|
|
424
424
|
.u-sm-sizeFull
|
|
@@ -427,11 +427,11 @@ or it's breakpoint versions:
|
|
|
427
427
|
|
|
428
428
|
#### typography
|
|
429
429
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
430
|
+
- Set the `text-transform` style for elements
|
|
431
|
+
- Set the `text-align` style for elements (includes styles that can be used at different breakpoints)
|
|
432
|
+
- Set the `font-weight` style for elements
|
|
433
|
+
- Set the font size and line height styles with different pre-defined utility classes
|
|
434
|
+
- Other miscellaneous text styles like kerning, word wrapping and truncating
|
|
435
435
|
|
|
436
436
|
## Setting up a new website
|
|
437
437
|
|
|
@@ -458,7 +458,7 @@ Confirm that the remotes are set up correctly.
|
|
|
458
458
|
|
|
459
459
|
That should show you something like this:
|
|
460
460
|
|
|
461
|
-
```
|
|
461
|
+
```css
|
|
462
462
|
cacao https://github.com/aptuitiv/cacao.git (fetch)
|
|
463
463
|
cacao https://github.com/aptuitiv/cacao.git (push)
|
|
464
464
|
origin https://YOUR-USERNAME@bitbucket.org/YOUR-ACCOUNT/YOUR-WEBSITE-REPOSITORY.git (fetch)
|
|
@@ -469,12 +469,13 @@ Push to the website repository if the repository is brand new. If the repository
|
|
|
469
469
|
|
|
470
470
|
`git push -u origin master`
|
|
471
471
|
|
|
472
|
-
|
|
473
472
|
### Issues merging unrelated histories
|
|
473
|
+
|
|
474
474
|
If having trying to merge cacao into an existing repository and GIT is saying that it won't merge unrelated histories then follow these steps.
|
|
475
|
-
|
|
475
|
+
|
|
476
|
+
1) Check out cacao/master as cacao-master
|
|
476
477
|
2) Check out origin/master as master. At this point you should currently have origin/master checked out.
|
|
477
478
|
3) On the command line run `git merge cacao-master --allow-unrelated-histories` You will be prompted to enter a commit message. Do so and then `Esc w q` to write and close the message.
|
|
478
479
|
4) You can then push the merged changes to master.
|
|
479
480
|
|
|
480
|
-
See https://stackoverflow.com/questions/38255655/trying-to-pull-files-from-my-github-repository-refusing-to-merge-unrelated-his for more info.
|
|
481
|
+
See <https://stackoverflow.com/questions/38255655/trying-to-pull-files-from-my-github-repository-refusing-to-merge-unrelated-his> for more info.
|