compass-stitch 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/Gemfile +4 -0
- data/README.md +81 -0
- data/Rakefile +2 -0
- data/compass-stitch.gemspec +21 -0
- data/lib/compass-stitch.rb +2 -0
- data/lib/compass-stitch/version.rb +5 -0
- data/stylesheets/stitch/_helpers.scss +1 -0
- data/stylesheets/stitch/_patterns.scss +8 -0
- data/stylesheets/stitch/helpers/_css3.scss +231 -0
- data/stylesheets/stitch/patterns/_accessibility.scss +1 -0
- data/stylesheets/stitch/patterns/_forms.scss +1 -0
- data/stylesheets/stitch/patterns/_images.scss +2 -0
- data/stylesheets/stitch/patterns/_layout.scss +4 -0
- data/stylesheets/stitch/patterns/_legacy.scss +2 -0
- data/stylesheets/stitch/patterns/_mobile.scss +1 -0
- data/stylesheets/stitch/patterns/_print.scss +2 -0
- data/stylesheets/stitch/patterns/_text.scss +1 -0
- data/stylesheets/stitch/patterns/accessibility/_hide-content.scss +20 -0
- data/stylesheets/stitch/patterns/forms/_search-fields.scss +13 -0
- data/stylesheets/stitch/patterns/images/_image-rendering.scss +26 -0
- data/stylesheets/stitch/patterns/images/_image-replace.scss +17 -0
- data/stylesheets/stitch/patterns/layout/.sass-cache/1678e5797c189adc70c5632bf0477b92adfb2fb6/_clear-floats.scssc +0 -0
- data/stylesheets/stitch/patterns/layout/_center.scss +5 -0
- data/stylesheets/stitch/patterns/layout/_clear-floats.scss +27 -0
- data/stylesheets/stitch/patterns/layout/_force-scrollbars.scss +3 -0
- data/stylesheets/stitch/patterns/layout/_media.scss +24 -0
- data/stylesheets/stitch/patterns/legacy/_has-layout.scss +6 -0
- data/stylesheets/stitch/patterns/legacy/_inline-block.scss +15 -0
- data/stylesheets/stitch/patterns/mobile/_fixed-text.scss +7 -0
- data/stylesheets/stitch/patterns/print/_append-content.scss +13 -0
- data/stylesheets/stitch/patterns/print/_text.scss +36 -0
- data/stylesheets/stitch/patterns/text/_text-rendering.scss +9 -0
- data/stylesheets/stitch/reset/README.md +9 -0
- data/stylesheets/stitch/reset/_desktop.scss +243 -0
- data/templates/project/manifest.rb +18 -0
- data/templates/project/sass/assets/README.md +5 -0
- data/templates/project/sass/assets/bg/.gitignore +0 -0
- data/templates/project/sass/assets/borders/.gitignore +0 -0
- data/templates/project/sass/assets/fonts/.gitignore +0 -0
- data/templates/project/sass/assets/icons/.gitignore +0 -0
- data/templates/project/sass/assets/sprites/.gitignore +0 -0
- data/templates/project/sass/assets/text/.gitignore +0 -0
- data/templates/project/sass/layouts/README.md +16 -0
- data/templates/project/sass/layouts/desktop/README.md +35 -0
- data/templates/project/sass/layouts/desktop/_copy.scss +140 -0
- data/templates/project/sass/layouts/desktop/_forms.scss +3 -0
- data/templates/project/sass/layouts/desktop/_functions.scss +3 -0
- data/templates/project/sass/layouts/desktop/_global.scss +52 -0
- data/templates/project/sass/layouts/desktop/_layout.scss +4 -0
- data/templates/project/sass/layouts/desktop/_modules.scss +4 -0
- data/templates/project/sass/layouts/desktop/master.scss +18 -0
- data/templates/project/sass/layouts/mobile/_global.scss +3 -0
- data/templates/project/sass/layouts/mobile/master.scss +2 -0
- data/templates/project/sass/layouts/print/_global.scss +6 -0
- data/templates/project/sass/layouts/print/_layout.scss +0 -0
- data/templates/project/sass/layouts/print/master.scss +2 -0
- data/templates/project/sass/legacy.scss +4 -0
- data/templates/project/sass/master.scss +8 -0
- metadata +124 -0
@@ -0,0 +1,5 @@
|
|
1
|
+
# Assets Folder
|
2
|
+
|
3
|
+
This folder is where the majority of your assets, such as fonts and images, will live. Keeping them in this single spot makes them easy to access from any layout.
|
4
|
+
|
5
|
+
Assets can include a stylesheet that allows layouts to easily use them. In the case of fonts, a stylesheet should be included with the @font-face method so that layouts only need to import the stylesheet to use the assets. The same method could be used for backgrounds, icons etc.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Layouts
|
2
|
+
|
3
|
+
Layouts are different ways of displaying your site across different media such as web browsers, mobile phones and tablet computers.
|
4
|
+
|
5
|
+
Import layouts in the master file by using media queries if you are using them or you can link directly to the layouts master file in your HTML.
|
6
|
+
|
7
|
+
````
|
8
|
+
// Default Layout
|
9
|
+
@import "layouts/desktop/master.css" screen and (min-width: 481px);
|
10
|
+
|
11
|
+
// Adjusted default layout for smaller tablet screens
|
12
|
+
@import "layouts/tablet/master.css" screen and (min-width: 481px) and (max-width: 1024px);
|
13
|
+
|
14
|
+
// Adjusted layout for mobile devices
|
15
|
+
@import "layouts/mobile/master.css" screen and (max-width: 480px);
|
16
|
+
````
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Desktop Layout
|
2
|
+
|
3
|
+
The desktop layout is probably your main design layout. The files are broken up to allow for quick building and easy maintenance.
|
4
|
+
|
5
|
+
## _copy.scss
|
6
|
+
|
7
|
+
The styles for copy blocks are placed in here. Unlike most stylesheet frameworks that use global styles to add text styles, we'll scope the styles for copy so that we don't have to override them.
|
8
|
+
|
9
|
+
When setting text styles globally, you set margins/padding/colors on headings, paragraphs, links etc. Then when you use these elements within other modules that aren't copy blocks, you find yourself needing to remove and override yourself. By scoping these styles we're saving ourselves a LOT of work.
|
10
|
+
|
11
|
+
## _forms.scss
|
12
|
+
|
13
|
+
For all of your styles specific to certain forms. Global form styles should be in _global.scss. Form styles should be as modular as possible. If a particular form style is used multiple times, consider making it a module.
|
14
|
+
|
15
|
+
## _functions.scss
|
16
|
+
|
17
|
+
A common location for your mixins and sass functions for the layout
|
18
|
+
|
19
|
+
## _global.scss
|
20
|
+
|
21
|
+
This is where you put your unscoped, global styles for the site. Be careful adding anything to this file, as it usually means you need to override it later.
|
22
|
+
|
23
|
+
## _layout.scss
|
24
|
+
|
25
|
+
Place you layout styles in here. This is the high-level layout styles, such as breaking up a site into 2 column/3 column layouts etc. These should be re-usable when needed.
|
26
|
+
|
27
|
+
Be careful how you apply layouts to your markup. Keep it semantic but modular.
|
28
|
+
|
29
|
+
## _modules.scss
|
30
|
+
|
31
|
+
This is where your modular styles go. For example, you may have a box style with a certain background and border. This style is used in multiple places, such as the sidebar of a blog, or the fieldset of a form. By breaking these styles into modules we can reuse the styles.
|
32
|
+
|
33
|
+
These styles should be descriptive classes rather than semantic classes as they won't ever be directly used on an element in the markup (unless you're rapid prototyping). They should not be mixins either, as a mixin will inject the styles into each selector that includes them, whereas using the @extends method will just declare the styles once, saving you a LOT of space.
|
34
|
+
|
35
|
+
Complex modules should be placed in their own folder inside the modules folder. This allows modules to be moved around and contain their own assets. Images for this module should be included within the folder rather than in the global assets directory.
|
@@ -0,0 +1,140 @@
|
|
1
|
+
/* Define styles for blocks of content scoped within the .copy rather than
|
2
|
+
making them global. Global styles will be constantly overridden. */
|
3
|
+
.copy {
|
4
|
+
@include improve-text-rendering;
|
5
|
+
|
6
|
+
/*
|
7
|
+
Set the baseline on all elements directly inside a copy block
|
8
|
+
Inline elements won't take margin anyway
|
9
|
+
*/
|
10
|
+
& > * {
|
11
|
+
margin:0 0 $baseline 0;
|
12
|
+
}
|
13
|
+
|
14
|
+
/* Block Elements
|
15
|
+
---------------------------------------- */
|
16
|
+
|
17
|
+
p {
|
18
|
+
|
19
|
+
}
|
20
|
+
|
21
|
+
address {
|
22
|
+
|
23
|
+
}
|
24
|
+
|
25
|
+
/* Lists
|
26
|
+
---------------------------------------- */
|
27
|
+
|
28
|
+
ul {
|
29
|
+
|
30
|
+
}
|
31
|
+
|
32
|
+
ol {
|
33
|
+
|
34
|
+
}
|
35
|
+
|
36
|
+
li {
|
37
|
+
display:list-item;
|
38
|
+
}
|
39
|
+
|
40
|
+
dl {
|
41
|
+
|
42
|
+
}
|
43
|
+
|
44
|
+
dt {
|
45
|
+
|
46
|
+
}
|
47
|
+
|
48
|
+
dd {
|
49
|
+
|
50
|
+
}
|
51
|
+
|
52
|
+
/* Code Blocks
|
53
|
+
---------------------------------------- */
|
54
|
+
|
55
|
+
pre {
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
/* Headings
|
60
|
+
---------------------------------------- */
|
61
|
+
|
62
|
+
h1,h2,h3,h4,h5,h6 {
|
63
|
+
|
64
|
+
}
|
65
|
+
|
66
|
+
h1 {
|
67
|
+
|
68
|
+
}
|
69
|
+
|
70
|
+
h2 {
|
71
|
+
|
72
|
+
}
|
73
|
+
|
74
|
+
h3 {
|
75
|
+
|
76
|
+
}
|
77
|
+
|
78
|
+
h4 {
|
79
|
+
|
80
|
+
}
|
81
|
+
|
82
|
+
h5 {
|
83
|
+
|
84
|
+
}
|
85
|
+
|
86
|
+
h6 {
|
87
|
+
|
88
|
+
}
|
89
|
+
|
90
|
+
/* Inline Elements
|
91
|
+
---------------------------------------- */
|
92
|
+
|
93
|
+
em {
|
94
|
+
font-style:italic;
|
95
|
+
}
|
96
|
+
|
97
|
+
strong {
|
98
|
+
font-weight:bold;
|
99
|
+
}
|
100
|
+
|
101
|
+
mark {
|
102
|
+
background:yellow;
|
103
|
+
}
|
104
|
+
|
105
|
+
ins {
|
106
|
+
background:green;
|
107
|
+
}
|
108
|
+
|
109
|
+
del {
|
110
|
+
background:red;
|
111
|
+
}
|
112
|
+
|
113
|
+
abbr {
|
114
|
+
|
115
|
+
}
|
116
|
+
|
117
|
+
code {
|
118
|
+
|
119
|
+
}
|
120
|
+
|
121
|
+
kbd {
|
122
|
+
|
123
|
+
}
|
124
|
+
|
125
|
+
/* Links
|
126
|
+
---------------------------------------- */
|
127
|
+
|
128
|
+
a {
|
129
|
+
font-weight:bold;
|
130
|
+
text-decoration:underline;
|
131
|
+
}
|
132
|
+
|
133
|
+
a:visited {
|
134
|
+
|
135
|
+
}
|
136
|
+
|
137
|
+
a:hover {
|
138
|
+
|
139
|
+
}
|
140
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
/*
|
2
|
+
These are global styles with NO SCOPE
|
3
|
+
*/
|
4
|
+
|
5
|
+
/* Basic
|
6
|
+
---------------------------------------- */
|
7
|
+
html {
|
8
|
+
@include force-scrollbars;
|
9
|
+
}
|
10
|
+
|
11
|
+
/* Typography
|
12
|
+
---------------------------------------- */
|
13
|
+
$baseline: 21px;
|
14
|
+
$base-font-size: 16px;
|
15
|
+
|
16
|
+
body,
|
17
|
+
input,
|
18
|
+
label,
|
19
|
+
select,
|
20
|
+
button,
|
21
|
+
textarea,
|
22
|
+
table {
|
23
|
+
font-size: $base-font-size;
|
24
|
+
font-family: Georgia;
|
25
|
+
line-height: $baseline;
|
26
|
+
color: #000;
|
27
|
+
}
|
28
|
+
|
29
|
+
/* These ::selection declarations have to be separate.
|
30
|
+
They cause the browsers to freak out. */
|
31
|
+
@mixin text-selection {
|
32
|
+
background: #000;
|
33
|
+
color: #fff;
|
34
|
+
text-shadow: none;
|
35
|
+
}
|
36
|
+
|
37
|
+
::-moz-selection { @include text-selection }
|
38
|
+
::selection { @include text-selection }
|
39
|
+
|
40
|
+
h1,h2,h3,h4,h5,h6 {
|
41
|
+
@include improve-text-rendering;
|
42
|
+
}
|
43
|
+
|
44
|
+
/* Forms
|
45
|
+
---------------------------------------- */
|
46
|
+
input:focus {
|
47
|
+
outline: 0;
|
48
|
+
}
|
49
|
+
|
50
|
+
input[type="search"] {
|
51
|
+
@include reset-search-field;
|
52
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
// Compass CSS3 Helpers
|
2
|
+
@import "compass/css3";
|
3
|
+
|
4
|
+
// Patterns
|
5
|
+
@import "stitch/patterns";
|
6
|
+
|
7
|
+
// Reset
|
8
|
+
@import "stitch/reset/desktop";
|
9
|
+
|
10
|
+
// Assets
|
11
|
+
|
12
|
+
// Specific styles
|
13
|
+
@import "functions";
|
14
|
+
@import "global";
|
15
|
+
@import "copy";
|
16
|
+
@import "layout";
|
17
|
+
@import "modules";
|
18
|
+
@import "forms";
|
File without changes
|
@@ -0,0 +1,8 @@
|
|
1
|
+
// Default Layout
|
2
|
+
@import "layouts/desktop/master.css" screen and (min-width: 481px);
|
3
|
+
|
4
|
+
// Adjusted default layout for smaller tablet screens
|
5
|
+
@import "layouts/tablet/master.css" screen and (min-width: 481px) and (max-width: 1024px);
|
6
|
+
|
7
|
+
// Adjusted layout for mobile devices
|
8
|
+
@import "layouts/mobile/master.css" screen and (max-width: 480px);
|
metadata
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: compass-stitch
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Anthony Short
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-04-26 00:00:00 Z
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: A framework for Compass that provides mixins for common CSS patterns to minimize the amount of CSS writing we have to do and gives our stylesheets more meaning.
|
22
|
+
email:
|
23
|
+
- antshort@gmail.com
|
24
|
+
executables: []
|
25
|
+
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files: []
|
29
|
+
|
30
|
+
files:
|
31
|
+
- .gitignore
|
32
|
+
- Gemfile
|
33
|
+
- README.md
|
34
|
+
- Rakefile
|
35
|
+
- compass-stitch.gemspec
|
36
|
+
- lib/compass-stitch.rb
|
37
|
+
- lib/compass-stitch/version.rb
|
38
|
+
- stylesheets/stitch/_helpers.scss
|
39
|
+
- stylesheets/stitch/_patterns.scss
|
40
|
+
- stylesheets/stitch/helpers/_css3.scss
|
41
|
+
- stylesheets/stitch/patterns/_accessibility.scss
|
42
|
+
- stylesheets/stitch/patterns/_forms.scss
|
43
|
+
- stylesheets/stitch/patterns/_images.scss
|
44
|
+
- stylesheets/stitch/patterns/_layout.scss
|
45
|
+
- stylesheets/stitch/patterns/_legacy.scss
|
46
|
+
- stylesheets/stitch/patterns/_mobile.scss
|
47
|
+
- stylesheets/stitch/patterns/_print.scss
|
48
|
+
- stylesheets/stitch/patterns/_text.scss
|
49
|
+
- stylesheets/stitch/patterns/accessibility/_hide-content.scss
|
50
|
+
- stylesheets/stitch/patterns/forms/_search-fields.scss
|
51
|
+
- stylesheets/stitch/patterns/images/_image-rendering.scss
|
52
|
+
- stylesheets/stitch/patterns/images/_image-replace.scss
|
53
|
+
- stylesheets/stitch/patterns/layout/.sass-cache/1678e5797c189adc70c5632bf0477b92adfb2fb6/_clear-floats.scssc
|
54
|
+
- stylesheets/stitch/patterns/layout/_center.scss
|
55
|
+
- stylesheets/stitch/patterns/layout/_clear-floats.scss
|
56
|
+
- stylesheets/stitch/patterns/layout/_force-scrollbars.scss
|
57
|
+
- stylesheets/stitch/patterns/layout/_media.scss
|
58
|
+
- stylesheets/stitch/patterns/legacy/_has-layout.scss
|
59
|
+
- stylesheets/stitch/patterns/legacy/_inline-block.scss
|
60
|
+
- stylesheets/stitch/patterns/mobile/_fixed-text.scss
|
61
|
+
- stylesheets/stitch/patterns/print/_append-content.scss
|
62
|
+
- stylesheets/stitch/patterns/print/_text.scss
|
63
|
+
- stylesheets/stitch/patterns/text/_text-rendering.scss
|
64
|
+
- stylesheets/stitch/reset/README.md
|
65
|
+
- stylesheets/stitch/reset/_desktop.scss
|
66
|
+
- templates/project/manifest.rb
|
67
|
+
- templates/project/sass/assets/README.md
|
68
|
+
- templates/project/sass/assets/bg/.gitignore
|
69
|
+
- templates/project/sass/assets/borders/.gitignore
|
70
|
+
- templates/project/sass/assets/fonts/.gitignore
|
71
|
+
- templates/project/sass/assets/icons/.gitignore
|
72
|
+
- templates/project/sass/assets/sprites/.gitignore
|
73
|
+
- templates/project/sass/assets/text/.gitignore
|
74
|
+
- templates/project/sass/layouts/README.md
|
75
|
+
- templates/project/sass/layouts/desktop/README.md
|
76
|
+
- templates/project/sass/layouts/desktop/_copy.scss
|
77
|
+
- templates/project/sass/layouts/desktop/_forms.scss
|
78
|
+
- templates/project/sass/layouts/desktop/_functions.scss
|
79
|
+
- templates/project/sass/layouts/desktop/_global.scss
|
80
|
+
- templates/project/sass/layouts/desktop/_layout.scss
|
81
|
+
- templates/project/sass/layouts/desktop/_modules.scss
|
82
|
+
- templates/project/sass/layouts/desktop/master.scss
|
83
|
+
- templates/project/sass/layouts/mobile/_global.scss
|
84
|
+
- templates/project/sass/layouts/mobile/master.scss
|
85
|
+
- templates/project/sass/layouts/print/_global.scss
|
86
|
+
- templates/project/sass/layouts/print/_layout.scss
|
87
|
+
- templates/project/sass/layouts/print/master.scss
|
88
|
+
- templates/project/sass/legacy.scss
|
89
|
+
- templates/project/sass/master.scss
|
90
|
+
homepage: https://github.com/anthonyshort/stitch-css
|
91
|
+
licenses: []
|
92
|
+
|
93
|
+
post_install_message:
|
94
|
+
rdoc_options: []
|
95
|
+
|
96
|
+
require_paths:
|
97
|
+
- lib
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
hash: 3
|
104
|
+
segments:
|
105
|
+
- 0
|
106
|
+
version: "0"
|
107
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
hash: 3
|
113
|
+
segments:
|
114
|
+
- 0
|
115
|
+
version: "0"
|
116
|
+
requirements: []
|
117
|
+
|
118
|
+
rubyforge_project: compass-stitch
|
119
|
+
rubygems_version: 1.7.2
|
120
|
+
signing_key:
|
121
|
+
specification_version: 3
|
122
|
+
summary: A CSS pattern framework for Compass
|
123
|
+
test_files: []
|
124
|
+
|