Skip to content

Commit ed5b4b4

Browse files
Initial commit CastleCSS Core files
1 parent df188b0 commit ed5b4b4

File tree

8 files changed

+632
-0
lines changed

8 files changed

+632
-0
lines changed

castle-core/sass/defaults.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
html {
2+
background: $color01;
3+
font-size: 62.5%;
4+
font-size: $font-size-default;
5+
line-height: $line-height-default;
6+
color: $color02;
7+
}
8+
9+
html, button, input, select, textarea {
10+
font-family: $font-pri;
11+
font-weight: normal;
12+
}

castle-core/sass/main.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@import 'reset';
2+
@import 'variables';
3+
@import 'grid';
4+
@import 'defaults';
5+
@import 'mixins';
6+
@import 'utility';
7+
@import 'utility_spacers';

castle-core/sass/mixins.scss

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/*========== MIXINS ==========*/
2+
3+
/*
4+
* Text-overflow: ellipsis
5+
*/
6+
@mixin ellipsis(){
7+
overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
8+
}
9+
10+
/*
11+
* Ul-reset
12+
* Set margin, padding and list-style to zero/none
13+
*/
14+
@mixin ulreset() {
15+
margin: 0; padding: 0; list-style: none;
16+
}
17+
18+
/*
19+
* Opacity
20+
*/
21+
@mixin opacity($params) {
22+
filter: alpha(opacity=$params);
23+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=$params)";
24+
opacity: $params * 0.01;
25+
}
26+
27+
/*
28+
* Calc
29+
*/
30+
@mixin calc($property, $expression) {
31+
#{$property}: -moz-calc(#{$expression});
32+
#{$property}: -webkit-calc(#{$expression});
33+
#{$property}: calc(#{$expression});
34+
}
35+
36+
37+
/*
38+
* Generic transform
39+
*/
40+
@mixin transform($transforms) {
41+
transform: $transforms;
42+
}
43+
/*
44+
* Rotate
45+
*/
46+
@mixin rotate ($deg) {
47+
@include transform(rotate(#{$deg}deg));
48+
}
49+
50+
/*
51+
* Scale
52+
*/
53+
@mixin scale($scale) {
54+
@include transform(scale($scale));
55+
}
56+
57+
/*
58+
* Translate
59+
*/
60+
@mixin translate ($x, $y) {
61+
@include transform(translate($x, $y));
62+
}
63+
64+
/*
65+
* translateX
66+
*/
67+
@mixin translateX ($x) {
68+
@include transform(translateX($x));
69+
}
70+
71+
/*
72+
* translateY
73+
*/
74+
@mixin translateY ($y) {
75+
@include transform(translateY($y));
76+
}
77+
78+
/*
79+
* Skew
80+
*/
81+
@mixin skew ($x, $y) {
82+
@include transform(skew(#{$x}deg, #{$y}deg));
83+
}
84+
85+
86+
@function strip-unit($num) {
87+
@return $num / ($num * 0 + 1);
88+
}
89+

castle-core/sass/reset.scss

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*========== Reset ==========*/
2+
3+
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
4+
article,aside,details,figcaption,figure,footer,header,hgroup,nav,menu,section,summary{display:block;}
5+
audio,canvas,video{display:inline-block;}
6+
audio:not([controls]){display:none;height:0;}
7+
[hidden]{display:none;}
8+
html{height:100%;margin:0;padding: 0;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
9+
body,form,p{margin:0;padding: 0;}
10+
a:focus{outline:thin dotted;}
11+
a:active,a:hover{outline:0;}
12+
b,strong{font-weight:bold;}
13+
code,kbd,pre,samp{font-family:monospace,serif;_font-family:"courier new",monospace;font-size:inherit;}
14+
pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word;}
15+
q{quotes:none;}
16+
q:before,q:after{content:'';content:none;}
17+
small{font-size:85%;}
18+
sub,sup{font-size:70%;line-height:0;position:relative;vertical-align:baseline;}
19+
sup{top:-.5rem;}
20+
sub{bottom:-.5rem;}
21+
nav ul,nav ol,menu,menu ul,menu ol{margin:0;padding:0;list-style:none;list-style-image:none;}
22+
img{border:0;-ms-interpolation-mode:bicubic;}
23+
svg:not(:root){overflow:hidden;}
24+
form,figure{margin:0;}
25+
fieldset{margin:0;padding:0;border:0;}
26+
legend{display:none;border:0;padding:0;white-space:normal;}
27+
button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;border-radius:0;}
28+
button,input{line-height:normal;}
29+
button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}
30+
button[disabled],input[disabled]{cursor:default;}
31+
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
32+
input[type="checkbox"],input[type="radio"]{padding:0;}
33+
input[type="search"]{-webkit-appearance:none;}
34+
input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}
35+
textarea{overflow:auto;vertical-align:top;resize:none;}
36+
table{border-spacing:0;}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Static content
3+
* This is the place to define static content that is used throughout the site
4+
*/
5+
6+
7+
/* Optional container class for max-width containers */
8+
.container {
9+
position: relative;
10+
margin: 0 auto;
11+
}
12+
13+
@media only screen and (min-width: $b3) {
14+
15+
.container {
16+
width: $b3-container;
17+
max-width: 100%;
18+
}
19+
}
20+
21+
@media only screen and (min-width: $b4) {
22+
23+
.container {
24+
width: $b4-container;
25+
}
26+
27+
}
28+
29+
@media only screen and (min-width: $b5) {
30+
31+
.container {
32+
width: $b5-container;
33+
}
34+
}

castle-core/sass/utility.scss

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/* Floating classes */
2+
.fl { float: left; }
3+
.fr { float: right; }
4+
.fn { float: none; }
5+
6+
/* Clearfix */
7+
.cf:before, .cf:after, ul.fields > li:before, ul.fields > li:after {content:"";display:table;}
8+
.cf:after, .g:after, ul.fields > li:after {clear:both;}
9+
.cl { clear:both;height:0;overflow:hidden;visibility:hidden;font:0/0 x; }
10+
11+
/* Show / Hide */
12+
.hide { display: none; }
13+
.show { display: block; }
14+
15+
/* Alignment of images + captions */
16+
.img-right { display: block; margin: .8rem auto 1.6rem; text-align: center; }
17+
.img-left { display: block; margin: .8rem auto 1.6rem; text-align: center; }
18+
.img-center { display: block; margin: .8rem auto 1.6rem; text-align: center; }
19+
.img-right img, .img-left img, .img-center img { display: block; margin: 0 auto .6; }
20+
.img-right figcaption, .img-left figcaption, .img-center figcaption { display: block; color: Gray; font-style: italic; }
21+
22+
@media only screen and (min-width: $b3) {
23+
.img-right { float: right; margin: .8rem 0 1.6rem 4.8rem; }
24+
.img-left { float: left; margin: .8rem 4.8rem 1.6rem 0; }
25+
}
26+
27+
.img-full,
28+
.img-full > img {
29+
width: 100%;
30+
}
31+
32+
.full-block {
33+
width: 100%;
34+
display: block;
35+
}
36+
37+
/* Unstyled list */
38+
.list-unstyled {
39+
margin: 0;
40+
padding: 0;
41+
list-style: none;
42+
}

0 commit comments

Comments
 (0)