prelude-framework 0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +20 -0
- data/Gemfile +4 -0
- data/LICENCE +19 -0
- data/README.md +5 -0
- data/Rakefile +1 -0
- data/lib/prelude/version.rb +3 -0
- data/lib/prelude-framework.rb +8 -0
- data/prelude.gemspec +23 -0
- data/scss/prelude/_abstractions.scss +21 -0
- data/scss/prelude/_all.scss +6 -0
- data/scss/prelude/_base.scss +6 -0
- data/scss/prelude/_core.scss +13 -0
- data/scss/prelude/_debug-mode.scss +125 -0
- data/scss/prelude/_defaults.scss +159 -0
- data/scss/prelude/_functions.scss +8 -0
- data/scss/prelude/_images.scss +9 -0
- data/scss/prelude/_mixins.scss +9 -0
- data/scss/prelude/_modules.scss +7 -0
- data/scss/prelude/_typography.scss +15 -0
- data/scss/prelude/abstractions/_flag.scss +67 -0
- data/scss/prelude/abstractions/_flexbox.scss +29 -0
- data/scss/prelude/abstractions/_island.scss +53 -0
- data/scss/prelude/abstractions/_media.scss +61 -0
- data/scss/prelude/abstractions/_nav.scss +110 -0
- data/scss/prelude/abstractions/_split.scss +26 -0
- data/scss/prelude/base/_border-box.scss +7 -0
- data/scss/prelude/base/_helpers.scss +167 -0
- data/scss/prelude/functions/_contrasty.scss +24 -0
- data/scss/prelude/functions/_is-saturated.scss +14 -0
- data/scss/prelude/functions/_pixels-to-ems.scss +7 -0
- data/scss/prelude/images/_base.scss +36 -0
- data/scss/prelude/images/_cover-image.scss +16 -0
- data/scss/prelude/images/_thumbnails.scss +47 -0
- data/scss/prelude/mixins/_button-style.scss +40 -0
- data/scss/prelude/mixins/_each-grid-breakpoint.scss +21 -0
- data/scss/prelude/mixins/_gradients.scss +12 -0
- data/scss/prelude/mixins/_rem.scss +31 -0
- data/scss/prelude/mixins/_set-font-size.scss +26 -0
- data/scss/prelude/modules/_buttons.scss +126 -0
- data/scss/prelude/modules/_forms.scss +634 -0
- data/scss/prelude/modules/_tables.scss +160 -0
- data/scss/prelude/typography/_base.scss +16 -0
- data/scss/prelude/typography/_brand.scss +19 -0
- data/scss/prelude/typography/_links.scss +14 -0
- data/scss/prelude/typography/_paragraphs.scss +9 -0
- data/scss/prelude/typography/_quotes.scss +31 -0
- data/scss/prelude/typography/_sizes.scss +63 -0
- data/scss/prelude.scss +53 -0
- data/test/config.rb +9 -0
- data/test/index.html +381 -0
- data/test/scss/_prelude-settings.scss +159 -0
- data/test/scss/style.scss +55 -0
- metadata +164 -0
@@ -0,0 +1,160 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Tables
|
3
|
+
//
|
4
|
+
// Base styles, modifiers and optional row classes inspired and adapted from
|
5
|
+
// Twitter Bootstrap
|
6
|
+
//
|
7
|
+
// Table of contents:
|
8
|
+
// 1. Base tables
|
9
|
+
// 2. Baseline styles
|
10
|
+
// 3. Condensed table
|
11
|
+
// 4. Bordered modifier
|
12
|
+
// 5. Striped
|
13
|
+
// 6. Row hovers
|
14
|
+
//
|
15
|
+
// =============================================================================
|
16
|
+
|
17
|
+
// =============================================================================
|
18
|
+
// 1. Base tables
|
19
|
+
// =============================================================================
|
20
|
+
|
21
|
+
table {
|
22
|
+
max-width: 100%;
|
23
|
+
background-color: $table-background;
|
24
|
+
border-collapse: collapse;
|
25
|
+
border-spacing: 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
|
29
|
+
// =============================================================================
|
30
|
+
// 2. Baseline styles
|
31
|
+
// =============================================================================
|
32
|
+
|
33
|
+
.table {
|
34
|
+
width: 100%;
|
35
|
+
margin-bottom: $base-line-height;
|
36
|
+
|
37
|
+
// Cells
|
38
|
+
th, td {
|
39
|
+
padding: 8px;
|
40
|
+
line-height: $base-line-height;
|
41
|
+
text-align: left;
|
42
|
+
vertical-align: top;
|
43
|
+
border-top: 1px solid $table-border;
|
44
|
+
}
|
45
|
+
|
46
|
+
th {
|
47
|
+
font-weight: bold;
|
48
|
+
}
|
49
|
+
|
50
|
+
// Bottom align for column headings
|
51
|
+
thead th {
|
52
|
+
vertical-align: bottom;
|
53
|
+
}
|
54
|
+
|
55
|
+
// Remove top border from thead by default
|
56
|
+
caption + thead tr:first-child th, caption + thead tr:first-child td,
|
57
|
+
colgroup + thead tr:first-child th, colgroup + thead tr:first-child td,
|
58
|
+
thead:first-child tr:first-child th, thead:first-child tr:first-child td {
|
59
|
+
border-top: 0;
|
60
|
+
}
|
61
|
+
|
62
|
+
// Account for multiple tbody instances
|
63
|
+
tbody + tbody {
|
64
|
+
border-top: 2px solid $table-border;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
|
69
|
+
// =============================================================================
|
70
|
+
// 3. Condensed table
|
71
|
+
// =============================================================================
|
72
|
+
|
73
|
+
// w/ half padding
|
74
|
+
.table--condensed {
|
75
|
+
th, td {
|
76
|
+
padding: 4px 5px;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
|
81
|
+
// =============================================================================
|
82
|
+
// 4. Bordered modifier
|
83
|
+
// =============================================================================
|
84
|
+
|
85
|
+
.table--bordered {
|
86
|
+
border-radius: $default-border-radius;
|
87
|
+
border: 1px solid $table-border;
|
88
|
+
border-collapse: separate; // Done so we can round those corners!
|
89
|
+
border-left: 0;
|
90
|
+
|
91
|
+
th, td { border-left: 1px solid $table-border; }
|
92
|
+
|
93
|
+
// Prevent a double border
|
94
|
+
caption + thead tr:first-child th, caption + tbody tr:first-child th, caption + tbody tr:first-child td,
|
95
|
+
colgroup + thead tr:first-child th, colgroup + tbody tr:first-child th, colgroup + tbody tr:first-child td,
|
96
|
+
thead:first-child tr:first-child th, tbody:first-child tr:first-child th, tbody:first-child tr:first-child td {
|
97
|
+
border-top: 0;
|
98
|
+
}
|
99
|
+
|
100
|
+
// For first th or td in the first row in the first thead or tbody
|
101
|
+
thead:first-child tr:first-child th:first-child, tbody:first-child tr:first-child td:first-child {
|
102
|
+
@include border-top-left-radius($default-border-radius);
|
103
|
+
}
|
104
|
+
|
105
|
+
thead:first-child tr:first-child th:last-child, tbody:first-child tr:first-child td:last-child {
|
106
|
+
@include border-top-right-radius($default-border-radius);
|
107
|
+
}
|
108
|
+
|
109
|
+
// For first th or td in the first row in the first thead or tbody
|
110
|
+
thead:last-child tr:last-child th:first-child, tbody:last-child tr:last-child td:first-child {
|
111
|
+
@include border-bottom-left-radius($default-border-radius);
|
112
|
+
}
|
113
|
+
|
114
|
+
thead:last-child tr:last-child th:last-child, tbody:last-child tr:last-child td:last-child {
|
115
|
+
@include border-bottom-right-radius($default-border-radius);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
|
120
|
+
// =============================================================================
|
121
|
+
// 5. Striped
|
122
|
+
// =============================================================================
|
123
|
+
|
124
|
+
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
125
|
+
.table--striped {
|
126
|
+
tbody {
|
127
|
+
tr:nth-child(odd) td, tr:nth-child(odd) th {
|
128
|
+
background-color: $table-background-stripe;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
|
134
|
+
// =============================================================================
|
135
|
+
// 6. Row hovers
|
136
|
+
// =============================================================================
|
137
|
+
|
138
|
+
// Has to be placed after the Striped effect
|
139
|
+
.table--hovered {
|
140
|
+
tbody tr:hover td, tbody tr:hover th {
|
141
|
+
background-color: $table-background-hover;
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
// Row contextual classes
|
146
|
+
// @to-do: Use more abstract class like Twitter Bootsrap does, so succes,
|
147
|
+
// error and info affect other kinds of elements
|
148
|
+
// =============================================================================
|
149
|
+
|
150
|
+
.table__row--success td {
|
151
|
+
background-color: fade-out($green, .75);
|
152
|
+
}
|
153
|
+
|
154
|
+
.table__row--error td {
|
155
|
+
background-color: fade-out($red, .75);
|
156
|
+
}
|
157
|
+
|
158
|
+
.table__row--info td {
|
159
|
+
background-color: fade-out($blue, .75);
|
160
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Base
|
3
|
+
// =============================================================================
|
4
|
+
|
5
|
+
@import "../mixins/set-font-size";
|
6
|
+
|
7
|
+
@include set-font-size();
|
8
|
+
|
9
|
+
html {
|
10
|
+
font-family: $base-font-family;
|
11
|
+
font-style: normal;
|
12
|
+
}
|
13
|
+
|
14
|
+
body {
|
15
|
+
color: $base-text-color;
|
16
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Brand
|
3
|
+
//
|
4
|
+
// Helper classes to add your brand's face and/or color to any element
|
5
|
+
//
|
6
|
+
// =============================================================================
|
7
|
+
|
8
|
+
.brand {
|
9
|
+
font-family: $brand-face +!important;
|
10
|
+
color: $brand-color +!important;
|
11
|
+
}
|
12
|
+
|
13
|
+
.brand-face {
|
14
|
+
font-family: $brand-face +!important;
|
15
|
+
}
|
16
|
+
|
17
|
+
.brand-color {
|
18
|
+
color: $brand-color +!important;
|
19
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Anchor links
|
3
|
+
// =============================================================================
|
4
|
+
|
5
|
+
a {
|
6
|
+
color: $link-color;
|
7
|
+
text-decoration: none;
|
8
|
+
&:hover,
|
9
|
+
&:active,
|
10
|
+
&:focus {
|
11
|
+
color: $link-hover-color;
|
12
|
+
text-decoration: underline;
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Paragraphs
|
3
|
+
// =============================================================================
|
4
|
+
|
5
|
+
p {
|
6
|
+
margin: 0 0 $base-spacing-unit;
|
7
|
+
hyphenate: auto;
|
8
|
+
hyphenate-lines: 3;
|
9
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Quotes
|
3
|
+
// =============================================================================
|
4
|
+
|
5
|
+
q {
|
6
|
+
quotes: "‘" "’" "“" "”";
|
7
|
+
|
8
|
+
&:before { content: "‘"; content: open-quote; }
|
9
|
+
&:after { content: "’"; content: close-quote; }
|
10
|
+
|
11
|
+
q:before { content: "“"; content: open-quote; }
|
12
|
+
q:after { content: "”"; content: close-quote; }
|
13
|
+
}
|
14
|
+
|
15
|
+
blockquote {
|
16
|
+
quotes: "“" "”";
|
17
|
+
text-indent: -.4em;
|
18
|
+
|
19
|
+
p {
|
20
|
+
&:before { content: "“"; content: open-quote; }
|
21
|
+
&:after { content: ""; content: no-close-quote; }
|
22
|
+
&:last-of-type:after { content: "”"; content: close-quote; margin-bottom: 0; }
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
.source {
|
27
|
+
display: block;
|
28
|
+
text-indent: 0;
|
29
|
+
|
30
|
+
&:before { content: "—"; }
|
31
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Sizes
|
3
|
+
//
|
4
|
+
// @usage: Whenever you need to turn a heading (or any other element) up or down
|
5
|
+
// you just need to assing an abstract class to it. For example if you need
|
6
|
+
// a huge h4 you should do it like this:
|
7
|
+
// <h4 class="giga">Hello</h4> <!-- I'm a huge H4 -->
|
8
|
+
// <h2 class="delta">Hello</h2> <!-- I'm a little H2 -->
|
9
|
+
// <p class="gamma"> <!-- Yes, It also works for big paragraphs -->
|
10
|
+
//
|
11
|
+
// =============================================================================
|
12
|
+
|
13
|
+
@import "../mixins/rem";
|
14
|
+
|
15
|
+
$mesure: $base-font-size * $base-line-height;
|
16
|
+
$sizes: giga $giga, mega $mega, kilo $kilo, alpha $alpha, beta $beta, gamma $gamma, delta $delta, epsilon $epsilon, zeta $zeta, milli $milli, micro $micro, nano $nano;
|
17
|
+
|
18
|
+
@each $size in $sizes {
|
19
|
+
.#{nth($size, 1)} {
|
20
|
+
@include rem(font-size, nth($size, 2));
|
21
|
+
@include rem(margin-bottom, ($mesure/nth($size, 2)));
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
|
26
|
+
// =============================================================================
|
27
|
+
// Headings
|
28
|
+
// =============================================================================
|
29
|
+
|
30
|
+
%headings {
|
31
|
+
text-rendering: optimizeLegibility;
|
32
|
+
font-family: $headings-font-family;
|
33
|
+
// this fixes huge spaces when a heading wraps onto two lines
|
34
|
+
line-height: 1;
|
35
|
+
margin-top: 0;
|
36
|
+
}
|
37
|
+
|
38
|
+
h1 {
|
39
|
+
@extend .alpha;
|
40
|
+
@extend %headings;
|
41
|
+
}
|
42
|
+
|
43
|
+
h2 {
|
44
|
+
@extend .beta;
|
45
|
+
@extend %headings;
|
46
|
+
}
|
47
|
+
|
48
|
+
h3 {
|
49
|
+
@extend .gamma;
|
50
|
+
@extend %headings;
|
51
|
+
}
|
52
|
+
h4 {
|
53
|
+
@extend .delta;
|
54
|
+
@extend %headings;
|
55
|
+
}
|
56
|
+
h5 {
|
57
|
+
@extend .epsilon;
|
58
|
+
@extend %headings;
|
59
|
+
}
|
60
|
+
h6 {
|
61
|
+
@extend .zeta;
|
62
|
+
@extend %headings;
|
63
|
+
}
|
data/scss/prelude.scss
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Prelude
|
3
|
+
//
|
4
|
+
// Available modules to import:
|
5
|
+
//
|
6
|
+
// prelude/all
|
7
|
+
//
|
8
|
+
// prelude/base
|
9
|
+
// prelude/base/helpers
|
10
|
+
//
|
11
|
+
// prelude/mixins
|
12
|
+
// prelude/mixins/gradients
|
13
|
+
// prelude/mixins/rem
|
14
|
+
// prelude/mixins/set-font-size
|
15
|
+
// prelude/mixins/button-style
|
16
|
+
//
|
17
|
+
// prelude/abstractions
|
18
|
+
// prelude/abstractions/media
|
19
|
+
// prelude/abstractions/nav
|
20
|
+
// prelude/abstractions/island
|
21
|
+
// prelude/abstractions/split
|
22
|
+
// prelude/abstractions/flexbox
|
23
|
+
// prelude/abstractions/flag
|
24
|
+
//
|
25
|
+
// prelude/images
|
26
|
+
// prelude/images/cover-image
|
27
|
+
// prelude/images/thumbnails
|
28
|
+
//
|
29
|
+
// prelude/typography
|
30
|
+
// prelude/typography/base
|
31
|
+
// prelude/typography/sizes
|
32
|
+
// prelude/typography/paragraphs
|
33
|
+
// prelude/typography/quotes
|
34
|
+
// prelude/typography/links
|
35
|
+
// prelude/typography/brand
|
36
|
+
//
|
37
|
+
// prelude/modules
|
38
|
+
// prelude/modules/forms
|
39
|
+
// prelude/modules/tables
|
40
|
+
// prelude/modules/buttons
|
41
|
+
//
|
42
|
+
// =============================================================================
|
43
|
+
|
44
|
+
// Prelude hates old IE
|
45
|
+
$legacy-support-for-ie: false;
|
46
|
+
|
47
|
+
@import "compass/css3",
|
48
|
+
"compass/utilities",
|
49
|
+
"compass/typography",
|
50
|
+
"prelude/defaults",
|
51
|
+
"prelude/core",
|
52
|
+
"prelude/functions",
|
53
|
+
"prelude/debug-mode";
|