Skip to content

Commit d105a9c

Browse files
Update README.md
File structure
1 parent 51ded83 commit d105a9c

File tree

1 file changed

+50
-40
lines changed

1 file changed

+50
-40
lines changed

README.md

Lines changed: 50 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,61 +12,71 @@ Our philosophy is mobile first, self explanatory code code and breakpoints. On t
1212
### Breakpoint CSS
1313
We don't believe in classes like *laptop* or *small* and other classes but we define everything with **b{breakpoint}** this makes everything readable and since we use this throughout the whole framework everything feels familiar when you use it for a while. Whether it's for grid, utility classes, hiding, showing. It all starts with **b{breakpoint}**
1414

15-
#### Mobile first breakpoints (defined in variables.scss)
16-
$b0: 0px; (smartwatch and higher)
17-
$b1: 320px; (phone portait and higher)
18-
$b2: 480px; (phone landscape and higher)
19-
$b3: 768px; (tablet portait and higher)
20-
$b4: 1024px; (tablet landscape/desktop and higher)
21-
$b5: 1280px; (desktop large and higher)
22-
$b6: 1600px; (desktop huge and higher)
23-
24-
Of course you can just add your own breakpoints if you want to.
25-
26-
## What's included
15+
### Breakpoints
16+
Mobile first breakpoints (defined in variables.scss)
17+
18+
b0: 0px; (smartwatch and higher)
19+
b1: 320px; (phone portait and higher)
20+
b2: 480px; (phone landscape and higher)
21+
b3: 768px; (tablet portait and higher)
22+
b4: 1024px; (tablet landscape/desktop and higher)
23+
b5: 1280px; (desktop large and higher)
24+
b6: 1600px; (desktop huge and higher)
25+
26+
## Included files and structure
2727
CastleCSS Core has the following basic files to kickstart your website:
2828

29-
30-
main - include all your other SCSS files
31-
reset - set browser defaults to zero/none so nothing weird happends in different browsers
32-
variables - Variables for the grid, fonts, utility, etc
33-
grid - Flexbox scss grid with floating fallback
34-
defaults - Set default web settings
35-
mixins - Small but handy collection of mixins to use
36-
utility - Utility classes
37-
utility_spacers - Utility padding / margin classes
29+
### SCSS folder structure and overwriting the CastleCSS defaults
30+
The ideal structure of your SASS folder should be the following:
31+
32+
| Your project/
33+
|-- sass/
34+
| |-- Custom project specific files here
35+
| |-- Main.scss //include castlecss main.scss files here first, your project specific files after that
36+
| |
37+
| |-- node_modules/ //CastleCSS files are automatically installed here
38+
| | |
39+
| | | castlecss-core/
40+
| | | |
41+
| | | |-- sass/
42+
| | | | |-- main.scss - *include all your other SCSS files*
43+
| | | |
44+
| | | |-- base/
45+
| | | | |-- reset.scss - <i>set browser defaults to zero/none so nothing weird happends in different browsers</i>
46+
| | | | |-- variables.scss - *Variables for the grid, fonts, utility, etc*
47+
| | | | |-- defaults.scss - *Set default web settings*
48+
| | | | |-- mixins.scss - *Small but handy collection of mixins to use*
49+
| | | | |-- utility.scss - *Utility classes*
50+
| | | | |-- utility_spacers.scss - *Utility padding / margin classes*
51+
| | | |
52+
| | | |-- layout/
53+
| | | | |-- grid.scss - *Flexbox scss grid with floating fallback*
54+
| | | | |-- static_files.scss - *Static files like containers*
55+
56+
### Overwrite CastleCSS
57+
Of course you want to be able to set your own variables and other classes. To do this: make your own custom folder outside of node modules folder and include the files in your main.scss.
3858

3959
## How to install
4060
You can install castle css with NPM in your sass folder:
4161

42-
npm i castlecss-core
43-
62+
npm i castlecss-core
63+
4464
### How to update
4565
Type the following to check for updates in your sass folder:
46-
47-
npm outdated
48-
66+
67+
npm outdated
68+
4969

5070
Nothing? Good! Then you're up to date
71+
In any other case you'll get something that looks like this:
5172

52-
If you need to update you'll get something that looks like this:
53-
54-
Package Current Wanted Latest Location
55-
castlecss-core 1.0.0 1.1.0 1.1.0 castlecss-core
73+
Package Current Wanted Latest Location
74+
castlecss-core 1.0.0 1.1.0 1.1.0 castlecss-core
5675

5776
So type the following to update:
5877

59-
npm update
78+
npm update
6079

6180
If you didn't alter the core files it will now update.
6281
If the updated did succeed you shouldn't get anything back from your terminal if you use *npm outdated* again
6382

64-
# SCSS folder structure and overwriting the CastleCSS defaults
65-
Of course you want to be able to set your own variables and other classes. To do this: make your own custom folder outside of node modules and include the files. The ideal structure of your SASS folder should be the following:
66-
67-
| Your project
68-
| -- sass/ //your custom scss goes here
69-
| -- | main.scss //include your own SCSS files and /node_modules/castlecss-core/main.scss here
70-
| -- | node_modules/ //CastleCSS files are automatically installed here
71-
| -- | -- castlecss-core/
72-
| -- | -- | sass

0 commit comments

Comments
 (0)