compass-pattern-primer 0.3.beta → 0.4.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +2 -1
  3. data/README.md +121 -80
  4. data/lib/compass-pattern-primer.rb +2 -2
  5. data/stylesheets/compass-pattern-primer.scss +1 -7
  6. data/stylesheets/compass-pattern-primer/_partials.scss +1 -3
  7. data/stylesheets/compass-pattern-primer/partials/_extendables.scss +1 -188
  8. data/stylesheets/compass-pattern-primer/partials/_mixins.scss +0 -1
  9. data/templates/adactio/manifest.rb +29 -4
  10. data/templates/project/manifest.rb +65 -51
  11. data/templates/shared/patterns/01_a_header.html +1 -0
  12. data/templates/shared/patterns/02_a_header.html +1 -0
  13. data/templates/shared/patterns/03_a_header.html +1 -0
  14. data/templates/shared/patterns/04_a_header.html +1 -0
  15. data/templates/shared/sass/_config-adactio.scss +65 -0
  16. data/templates/shared/sass/{partials/variables/theme/_overrides.scss → _config.scss} +9 -4
  17. data/{stylesheets/compass-pattern-primer/base → templates/shared/sass/base/buttons}/_buttons.scss +11 -1
  18. data/templates/shared/sass/base/buttons/_buttons_extendables.scss +75 -0
  19. data/{stylesheets/compass-pattern-primer/partials/variables/base/_buttons.scss → templates/shared/sass/base/buttons/_buttons_variables.scss} +4 -0
  20. data/{stylesheets/compass-pattern-primer/base → templates/shared/sass/base/forms}/_forms.scss +7 -0
  21. data/templates/shared/sass/base/forms/_forms_extendables.scss +16 -0
  22. data/{stylesheets/compass-pattern-primer/partials/variables/base/_forms.scss → templates/shared/sass/base/forms/_forms_variables.scss} +4 -0
  23. data/{stylesheets/compass-pattern-primer/base → templates/shared/sass/base/links}/_links.scss +6 -0
  24. data/{stylesheets/compass-pattern-primer/partials/variables/base/_links.scss → templates/shared/sass/base/links/_links_variables.scss} +4 -0
  25. data/{stylesheets/compass-pattern-primer/base → templates/shared/sass/base/page}/_page.scss +6 -0
  26. data/{stylesheets/compass-pattern-primer/partials/variables/base/_page.scss → templates/shared/sass/base/page/_page_variables.scss} +4 -0
  27. data/{stylesheets/compass-pattern-primer/base → templates/shared/sass/base/search}/_search.scss +6 -0
  28. data/{stylesheets/compass-pattern-primer/partials/variables/base/_search.scss → templates/shared/sass/base/search/_search_variables.scss} +4 -0
  29. data/{stylesheets/compass-pattern-primer/base → templates/shared/sass/base/typography}/_typography.scss +6 -0
  30. data/{stylesheets/compass-pattern-primer/partials/variables/base/_typography.scss → templates/shared/sass/base/typography/_typography_variables.scss} +4 -0
  31. data/templates/shared/sass/global-adactio.scss +40 -17
  32. data/templates/shared/sass/global.scss +16 -26
  33. data/templates/shared/sass/layout/{_page.scss → page/_page.scss} +0 -0
  34. data/templates/shared/sass/modules/controls/_controls.scss +10 -0
  35. data/templates/shared/sass/modules/controls/_controls_extendables.scss +26 -0
  36. data/{stylesheets/compass-pattern-primer/partials/variables/modules/_control.scss → templates/shared/sass/modules/controls/_controls_variables.scss} +4 -0
  37. data/templates/shared/sass/modules/feedback/_feedback.scss +16 -0
  38. data/templates/shared/sass/modules/feedback/_feedback_extendables.scss +35 -0
  39. data/{stylesheets/compass-pattern-primer/partials/variables/modules/_feedback.scss → templates/shared/sass/modules/feedback/_feedback_variables.scss} +4 -0
  40. data/templates/shared/sass/modules/options/_options.scss +10 -0
  41. data/templates/shared/sass/modules/options/_options_extendables.scss +22 -0
  42. data/{stylesheets/compass-pattern-primer/partials/variables/modules/_options.scss → templates/shared/sass/modules/options/_options_variables.scss} +4 -0
  43. data/templates/shared/sass/modules/pagination/_pagination.scss +10 -0
  44. data/templates/shared/sass/modules/pagination/_pagination_extendables.scss +35 -0
  45. data/{stylesheets/compass-pattern-primer/partials/variables/modules/_pagination.scss → templates/shared/sass/modules/pagination/_pagination_variables.scss} +4 -0
  46. data/templates/shared/sass/partials/_colors.scss +20 -20
  47. data/templates/shared/sass/pattern-primer-static.scss +18 -0
  48. data/templates/shared/sass/pattern-primer.scss +1 -0
  49. data/templates/shared/sass/state/{_header.scss → header/_header.scss} +0 -0
  50. data/templates/shared/sass/theme/{_page.scss → page/_page.scss} +0 -0
  51. data/templates/static/manifest.rb +32 -23
  52. metadata +38 -47
  53. data/stylesheets/compass-pattern-primer/_base.scss +0 -12
  54. data/stylesheets/compass-pattern-primer/_modules.scss +0 -10
  55. data/stylesheets/compass-pattern-primer/modules/_control.scss +0 -3
  56. data/stylesheets/compass-pattern-primer/modules/_feedback.scss +0 -9
  57. data/stylesheets/compass-pattern-primer/modules/_options.scss +0 -3
  58. data/stylesheets/compass-pattern-primer/modules/_pagination.scss +0 -3
  59. data/stylesheets/compass-pattern-primer/partials/_colors.scss +0 -27
  60. data/stylesheets/compass-pattern-primer/partials/_variables.scss +0 -14
  61. data/stylesheets/compass-pattern-primer/partials/variables/base/_colors.scss +0 -1
  62. data/templates/shared/sass/base/_page.scss +0 -10
  63. data/templates/shared/sass/modules/_footer.scss +0 -7
  64. data/templates/shared/sass/modules/_header.scss +0 -7
  65. data/templates/shared/sass/partials/_variables-adactio.scss +0 -3
  66. data/templates/shared/sass/partials/_variables.scss +0 -17
  67. data/templates/shared/sass/partials/variables/base/_page.scss +0 -3
  68. data/templates/shared/sass/partials/variables/layout/_breakpoints.scss +0 -3
  69. data/templates/shared/sass/partials/variables/layout/_page.scss +0 -3
  70. data/templates/shared/sass/partials/variables/modules/_footer.scss +0 -3
  71. data/templates/shared/sass/partials/variables/modules/_header.scss +0 -3
  72. data/templates/shared/sass/partials/variables/state/_footer.scss +0 -3
  73. data/templates/shared/sass/partials/variables/state/_header.scss +0 -3
  74. data/templates/shared/sass/partials/variables/state/_page.scss +0 -3
  75. data/templates/shared/sass/partials/variables/theme/_page.scss +0 -3
  76. data/templates/shared/sass/state/_footer.scss +0 -3
  77. data/templates/shared/sass/state/_page.scss +0 -3
@@ -1,3 +1,9 @@
1
+ //////////////////////////////
2
+ // BASE: Base element styles
3
+ //////////////////////////////
4
+
5
+ @import "_links_variables";
6
+
1
7
  a {
2
8
  color: $link-color;
3
9
  text-decoration: $link-text-decoration;
@@ -1,3 +1,7 @@
1
+ //////////////////////////////
2
+ // VARIABLES: For Base styles
3
+ //////////////////////////////
4
+
1
5
  $link-color: #369 !default;
2
6
  $link-text-decoration: none !default;
3
7
  $link-border-width: 0 0 1px 0 !default;
@@ -1,3 +1,9 @@
1
+ //////////////////////////////
2
+ // BASE: Base element styles
3
+ //////////////////////////////
4
+
5
+ @import "_page_variables";
6
+
1
7
  html {
2
8
  @include border-outline(border, $html-border-width, $html-border-style, $html-border-color);
3
9
  background-color: $html-background-color;
@@ -1,3 +1,7 @@
1
+ //////////////////////////////
2
+ // VARIABLES: For Base styles
3
+ //////////////////////////////
4
+
1
5
  // Typography _typography.scss
2
6
  $body-font-family: Palatino, Cambria, Georgia, serif !default;
3
7
  $secondary-font: Calibri, 'Helvetica Neue', Arial, sans-serif !default;
@@ -1,3 +1,9 @@
1
+ //////////////////////////////
2
+ // BASE: Base element styles
3
+ //////////////////////////////
4
+
5
+ @import "_search_variables";
6
+
1
7
  [role="search"] {
2
8
  position: relative;
3
9
  background-color: $search-background-color;
@@ -1,3 +1,7 @@
1
+ //////////////////////////////
2
+ // VARIABLES: For Base styles
3
+ //////////////////////////////
4
+
1
5
  /// Search
2
6
  $search-border-radius: 1em !default;
3
7
  $search-background-color: #fff !default;
@@ -1,3 +1,9 @@
1
+ //////////////////////////////
2
+ // BASE: Base element styles
3
+ //////////////////////////////
4
+
5
+ @import "_typography_variables";
6
+
1
7
  h1 {
2
8
  font-family: $header-font-family;
3
9
  @include bold-italic-uppercase-variant($h1-font-bold, $h1-font-italic, $h1-font-uppercase, $h1-font-variant);
@@ -1,3 +1,7 @@
1
+ //////////////////////////////
2
+ // VARIABLES: For Base styles
3
+ //////////////////////////////
4
+
1
5
  /// Headers
2
6
  //// h1
3
7
  $h1-font-bold: false !default; // normal
@@ -1,41 +1,64 @@
1
- // Basic scaffolding
2
-
1
+ // Adactio scaffolding
3
2
  @import "compass/typography";
4
3
  @import "compass/css3";
5
4
 
6
5
  @import "partials/_browsers";
7
- @import "partials/_colors";
8
6
  @import "partials/_extendables";
9
7
  @import "partials/_functions";
10
8
  @import "partials/_mixins";
11
- @import "partials/_variables";
9
+ @import "partials/_colors";
12
10
 
13
11
  // Eric Meyer Reset used by Adactio's Pattern Primer
12
+ /* @group Reset */
13
+
14
+ /* Based on http://meyerweb.com/eric/tools/css/reset/ */
14
15
  @import "compass-pattern-primer/reset/libraries/_eric_meyer_reset";
15
16
  //
16
17
  // Optional Resets include
17
18
  // @import "compass-pattern-primer/reset/libraries/_normalize";
18
19
  // @import "compass-pattern-primer/reset/libraries/_formalize";
20
+ /* @end Reset */
19
21
 
20
22
  @import "compass-pattern-primer/partials/_mixins";
21
- @import "compass-pattern-primer/partials/_variables";
22
23
  @import "compass-pattern-primer/partials/_extendables";
23
24
  @import "compass-pattern-primer/partials/_functions";
24
- @import "compass-pattern-primer/partials/_colors";
25
25
 
26
- @import "partials/variables/_overrides";
26
+ @import "_config";
27
+
28
+ /* @group Typography */
29
+ @import "page/_page";
30
+ @import "typography/_typography";
31
+ /* @end Typography */
32
+
33
+ /* @group Links */
34
+ @import "links/_links";
35
+ /* @end Links */
36
+
37
+ /* @group Forms */
38
+ @import "forms/_forms";
39
+ @import "buttons/_buttons";
40
+ /* @group search */
41
+ @import "search/_search";
42
+ /* @end search */
43
+
44
+ /* @end Forms */
45
+
46
+ /* @group Classes */
27
47
 
28
- @import "compass-pattern-primer/base/_page";
29
- @import "compass-pattern-primer/base/_typography";
30
- @import "compass-pattern-primer/base/_links";
31
- @import "compass-pattern-primer/base/_forms";
32
- @import "compass-pattern-primer/base/_buttons";
48
+ /* @group pagination */
49
+ @import "pagination/_pagination";
50
+ /* @end pagination*/
33
51
 
34
- @import "compass-pattern-primer/modules/_control";
35
- @import "compass-pattern-primer/modules/_feedback";
36
- @import "compass-pattern-primer/modules/_options";
37
- @import "compass-pattern-primer/modules/_pagination";
52
+ /* @group control */
53
+ @import "controls/_controls";
54
+ /* @end control */
38
55
 
56
+ /* @group feedback */
57
+ @import "feedback/_feedback";
58
+ /* @end feedback */
39
59
 
60
+ /* @group options */
61
+ @import "options/_options";
62
+ /* @end options*/
40
63
 
41
- // some default styling for pattern-primer.html. Most likely you'll want to delete this.
64
+ /* @end Classes */
@@ -4,44 +4,34 @@
4
4
  @import "compass/css3";
5
5
 
6
6
  @import "partials/_browsers";
7
- @import "partials/_colors";
8
7
  @import "partials/_extendables";
9
8
  @import "partials/_functions";
10
9
  @import "partials/_mixins";
11
- @import "partials/_variables";
10
+ @import "partials/_colors";
12
11
 
13
- @import "compass-pattern-primer/reset";
12
+ @import "compass-pattern-primer/reset";
14
13
 
15
14
  @import "compass-pattern-primer/partials/_mixins";
16
- @import "compass-pattern-primer/partials/_variables";
17
15
  @import "compass-pattern-primer/partials/_extendables";
18
16
  @import "compass-pattern-primer/partials/_functions";
19
- @import "compass-pattern-primer/partials/_colors";
20
17
 
21
- @import "partials/variables/theme/_overrides";
18
+ @import "_config";
22
19
 
23
- @import "compass-pattern-primer/base/_page";
24
- @import "compass-pattern-primer/base/_typography";
25
- @import "compass-pattern-primer/base/_links";
26
- @import "compass-pattern-primer/base/_forms";
27
- @import "compass-pattern-primer/base/_buttons";
20
+ @import "base/page/_page";
21
+ @import "base/typography/_typography";
22
+ @import "base/links/_links";
23
+ @import "base/forms/_forms";
24
+ @import "base/buttons/_buttons";
25
+ @import "base/search/_search";
28
26
 
29
27
  // optional module imports. comment out ones you don't use
30
- @import "compass-pattern-primer/modules/_control";
31
- @import "compass-pattern-primer/modules/_feedback";
32
- @import "compass-pattern-primer/modules/_options";
33
- @import "compass-pattern-primer/modules/_pagination";
34
-
35
- @import "base/_page";
36
-
37
- @import "modules/_header";
38
- @import "modules/_footer";
28
+ @import "modules/pagination/_pagination";
29
+ @import "modules/controls/_controls";
30
+ @import "modules/feedback/_feedback";
31
+ @import "modules/options/_options";
39
32
 
40
- @import "layout/_page";
33
+ @import "layout/page/_page"; // Sample file
41
34
 
42
- @import "state/_page";
43
- @import "state/_header";
44
- @import "state/_footer";
35
+ @import "state/header/_header"; // Sample file
45
36
 
46
- @import "theme/_page";
47
- @import "modules/_footer";
37
+ @import "theme/page/_page"; // Sample file
@@ -0,0 +1,10 @@
1
+ //////////////////////////////
2
+ // MODULES: Component styles that are layout independent
3
+ //////////////////////////////
4
+
5
+ @import "_controls_variables";
6
+ @import "_controls_extendables";
7
+
8
+ a.control {
9
+ @extend %controls;
10
+ }
@@ -0,0 +1,26 @@
1
+ //////////////////////////////
2
+ // EXTENDABLES: For Modules
3
+ //////////////////////////////
4
+
5
+ %controls {
6
+ font-family: $controls-font-family;
7
+ display: inline-block;
8
+ font-size: $controls-font-size;
9
+ @include margin-padding(padding, $controls-padding);
10
+ line-height: 1;
11
+ @include border-outline(border, $controls-border-width, $controls-border-style, $controls-border-color);
12
+ @include border-radius($controls-border-radius);
13
+ background-clip: padding-box;
14
+ &:link,
15
+ &:visited {
16
+ @include simple-background-gradient($controls-visited-color, $controls-visited-gradient-pos, $controls-visited-gradient-stop-1, $controls-visited-gradient-stop-2);
17
+ }
18
+ &:hover,
19
+ &:focus {
20
+ outline: none;
21
+ @include simple-background-gradient($controls-hover-color, $controls-hover-gradient-pos, $controls-hover-gradient-stop-1, $controls-hover-gradient-stop-2);
22
+ }
23
+ &:active {
24
+ @include simple-background-gradient($controls-active-color, $controls-active-gradient-pos, $controls-active-gradient-stop-1, $controls-active-gradient-stop-2);
25
+ }
26
+ }
@@ -1,3 +1,7 @@
1
+ //////////////////////////////
2
+ // VARIABLES: For Modules
3
+ //////////////////////////////
4
+
1
5
  // Controls
2
6
  $controls-font-family: $secondary-font !default;
3
7
  $controls-font-size: 1.5em !default;
@@ -0,0 +1,16 @@
1
+ //////////////////////////////
2
+ // MODULES: Component styles that are layout independent
3
+ //////////////////////////////
4
+
5
+ @import "_feedback_variables";
6
+ @import "_feedback_extendables";
7
+
8
+ .feedback {
9
+ @extend %feedback;
10
+ &.error {
11
+ @extend %error;
12
+ }
13
+ &.warning {
14
+ @extend %warning;
15
+ }
16
+ }
@@ -0,0 +1,35 @@
1
+ //////////////////////////////
2
+ // EXTENDABLES: For Modules
3
+ //////////////////////////////
4
+
5
+ %feedback {
6
+ @include margin-padding(padding, $feedback-padding);
7
+ @include margin-padding(margin, $feedback-margin);
8
+ color: $feedback-color;
9
+ background-color: $feedback-background;
10
+ @include border-outline(border, $feedback-border-width, $feedback-border-style, $feedback-border-color);
11
+ @include border-radius($feedback-border-radius);
12
+ background-clip: padding-box;
13
+ a {
14
+ color: $feedback-color;
15
+ @include bold-italic-uppercase-variant($feedback-a-font-bold, $feedback-a-font-italic, $feedback-a-font-uppercase, $feedback-a-font-variant);
16
+ }
17
+ }
18
+
19
+ %error {
20
+ background-color: $feedback-error-background;
21
+ color: $feedback-error-color;
22
+ border-color: $feedback-error-border-color;
23
+ a {
24
+ color: $feedback-error-color;
25
+ }
26
+ }
27
+
28
+ %warning {
29
+ background-color: $feedback-warning-background;
30
+ color: $feedback-warning-color;
31
+ border-color: $feedback-warning-border-color;
32
+ a {
33
+ color: $feedback-warning-color;
34
+ }
35
+ }
@@ -1,3 +1,7 @@
1
+ //////////////////////////////
2
+ // VARIABLES: For Modules
3
+ //////////////////////////////
4
+
1
5
  // Feedback
2
6
  $feedback-background: #d9edf7 !default;
3
7
  $feedback-padding: 0.125em 1em !default;
@@ -0,0 +1,10 @@
1
+ //////////////////////////////
2
+ // MODULES: Component styles that are layout independent
3
+ //////////////////////////////
4
+
5
+ @import "_options_variables";
6
+ @import "_options_extendables";
7
+
8
+ .options {
9
+ @extend %options;
10
+ }
@@ -0,0 +1,22 @@
1
+ //////////////////////////////
2
+ // EXTENDABLES: For Modules
3
+ //////////////////////////////
4
+
5
+ %options {
6
+ list-style: $options-list-style;
7
+ @include border-outline(border, $options-border-width, $options-border-style, $options-border-color);
8
+ li {
9
+ text-indent: $options-li-text-indent;
10
+ font-family: $options-li-font-family;
11
+ text-transform: $options-li-text-transform;
12
+ letter-spacing: $options-li-letter-spacing;
13
+ font-weight: $options-li-font-weight;
14
+ @include margin-padding(margin, $options-li-margin);
15
+ @include margin-padding(padding, $options-li-padding);
16
+ @include border-outline(border, $options-li-border-width, $options-li-border-style, $options-li-border-color);
17
+ }
18
+ a {
19
+ display: block;
20
+ @include border-outline(border, $options-a-border-width, $options-a-border-style, $options-a-border-color);
21
+ }
22
+ }
@@ -1,3 +1,7 @@
1
+ //////////////////////////////
2
+ // VARIABLES: For Modules
3
+ //////////////////////////////
4
+
1
5
  // Options
2
6
  $options-border-width: 1px 0 0 0!default;
3
7
  $options-border-style: solid !default;
@@ -0,0 +1,10 @@
1
+ //////////////////////////////
2
+ // MODULES: Component styles that are layout independent
3
+ //////////////////////////////
4
+
5
+ @import "_pagination_variables";
6
+ @import "_pagination_extendables";
7
+
8
+ .pagination {
9
+ @extend %pagination;
10
+ }
@@ -0,0 +1,35 @@
1
+ //////////////////////////////
2
+ // EXTENDABLES: For Modules
3
+ //////////////////////////////
4
+
5
+ %pagination {
6
+ font-family: $pagination-font-family;
7
+ li {
8
+ display: $pagination-li-display;
9
+ @include margin-padding(margin, $pagination-li-margin, $pagination-li-margin-pos);
10
+ text-indent: $pagination-text-indent;
11
+ }
12
+ a {
13
+ display: $pagination-a-display;
14
+ @include margin-padding(padding, $pagination-a-padding);
15
+ line-height: $pagination-a-line-height;
16
+ @include margin-padding(margin, $pagination-a-margin);
17
+ @include border-outline(border, $pagination-a-border-width, $pagination-a-border-style, $pagination-a-border-color);
18
+ @include border-radius($pagination-a-border-radius);
19
+ background-clip: padding-box;
20
+ &:link,
21
+ &:visited {
22
+ color: $pagination-link-color;
23
+ background-color: $pagination-link-background-color;
24
+ }
25
+ &[href]:hover,
26
+ &[href]:focus {
27
+ color: $pagination-link-hover-color;
28
+ background-color: $pagination-link-hover-background-color;
29
+ }
30
+ &:active {
31
+ color: $pagination-link-active-color;
32
+ background-color: $pagination-link-active-background-color;
33
+ }
34
+ }
35
+ }
@@ -1,3 +1,7 @@
1
+ //////////////////////////////
2
+ // VARIABLES: For Modules
3
+ //////////////////////////////
4
+
1
5
  // Pagination
2
6
  $pagination-font-family: $secondary-font !default;
3
7
  $pagination-text-indent: 0 !default;
@@ -5,23 +5,23 @@
5
5
 
6
6
  // Example color scheme
7
7
 
8
- // $primary-color: #57068c;
9
- // $black-value: #333;
10
- //
11
- // $cs-primary: $primary-color;
12
- //// Primary color, can be any color you can use in CSS, plus CMYK from Color Schemer
13
- // $cs-scheme: complement;
14
- //// Options: mono, complement, triad, tetrad, analogic, accented-analogic
15
- // $cs-hue-offset: 20;
16
- //// Options: 0-100;
17
- // $cs-brightness-offset: 0;
18
- //// Options: 0-100;
19
- // $cs-color-model: ryb;
20
- //// Options: rgb, ryb
21
- //
22
- //
23
- // $black: tint-stack($black-value);
24
- // $primary: tint-stack(cs-primary());
25
- // $secondary: tint-stack(cs-secondary());
26
- // $tertiary: tint-stack(cs-tertiary());
27
- // $quadrary: tint-stack(cs-quadrary());
8
+ $primary-color: #693 !default;
9
+ $black-value: #333 !default;
10
+
11
+ $cs-primary: $primary-color;
12
+ // Primary color, can be any color you can use in CSS, plus CMYK from Color Schemer
13
+ $cs-scheme: accented-analogic;
14
+ // Options: mono, complement, triad, tetrad, analogic, accented-analogic
15
+ $cs-hue-offset: 20;
16
+ // Options: 0-100;
17
+ $cs-brightness-offset: 0;
18
+ // Options: 0-100;
19
+ $cs-color-model: ryb;
20
+ // Options: rgb, ryb
21
+
22
+
23
+ $black: tint-stack($black-value);
24
+ $primary: tint-stack(cs-primary());
25
+ $secondary: tint-stack(cs-secondary());
26
+ $tertiary: tint-stack(cs-tertiary());
27
+ $quadrary: tint-stack(cs-quadrary());