concisecss 0.0.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -8
  3. data/app/assets/javascripts/concisecss/dropdown.js +17 -8
  4. data/app/assets/javascripts/concisecss/naver.js +8 -8
  5. data/app/assets/javascripts/concisecss/navigation.js +5 -5
  6. data/app/assets/javascripts/concisecss/non-responsive.js +8 -8
  7. data/app/assets/stylesheets/base/_headings.scss +129 -119
  8. data/app/assets/stylesheets/base/_main.scss +15 -13
  9. data/app/assets/stylesheets/{generic → base}/_print.scss +38 -56
  10. data/app/assets/stylesheets/base/_selection.scss +15 -9
  11. data/app/assets/stylesheets/base/_type.scss +21 -19
  12. data/app/assets/stylesheets/{generic/_shared.scss → base/_vertical-rhythm.scss} +9 -10
  13. data/app/assets/stylesheets/components/_buttons.scss +174 -0
  14. data/app/assets/stylesheets/components/_colors.scss +25 -0
  15. data/app/assets/stylesheets/{objects → components}/_dropdowns.scss +67 -79
  16. data/app/assets/stylesheets/components/_navigation.scss +133 -0
  17. data/app/assets/stylesheets/concise.scss +31 -31
  18. data/app/assets/stylesheets/{generic → helpers}/_clearfix.scss +2 -6
  19. data/app/assets/stylesheets/helpers/_conditional.scss +128 -0
  20. data/app/assets/stylesheets/helpers/_functions.scss +32 -0
  21. data/app/assets/stylesheets/{generic/_helper.scss → helpers/_helpers.scss} +29 -38
  22. data/app/assets/stylesheets/helpers/_mixins.scss +315 -0
  23. data/app/assets/stylesheets/{generic → helpers}/_normalize.scss +35 -35
  24. data/app/assets/stylesheets/{_defaults.scss → helpers/_variables.scss} +68 -78
  25. data/app/assets/stylesheets/layout/_container.scss +17 -0
  26. data/app/assets/stylesheets/layout/_forms.scss +103 -0
  27. data/app/assets/stylesheets/layout/_grid.scss +71 -0
  28. data/app/assets/stylesheets/layout/_lists.scss +88 -0
  29. data/app/assets/stylesheets/layout/tables.scss +63 -0
  30. data/lib/concisecss/concisecss_source.rb +30 -40
  31. data/lib/concisecss/version.rb +1 -1
  32. metadata +21 -20
  33. data/app/assets/stylesheets/generic/_conditional.scss +0 -126
  34. data/app/assets/stylesheets/generic/_mixins.scss +0 -157
  35. data/app/assets/stylesheets/objects/_badges.scss +0 -53
  36. data/app/assets/stylesheets/objects/_breadcrumbs.scss +0 -35
  37. data/app/assets/stylesheets/objects/_buttons.scss +0 -287
  38. data/app/assets/stylesheets/objects/_colors.scss +0 -48
  39. data/app/assets/stylesheets/objects/_groups.scss +0 -102
  40. data/app/assets/stylesheets/objects/_navigation.scss +0 -382
  41. data/app/assets/stylesheets/objects/_progress.scss +0 -106
  42. data/app/assets/stylesheets/objects/_wells.scss +0 -103
@@ -0,0 +1,25 @@
1
+ //------------------------------------
2
+ // COLORS
3
+ //------------------------------------
4
+
5
+ // Background colors
6
+ @if $use-bg-colors == true {
7
+ @each $bg-color, $color in $bg-colors {
8
+ .bg-#{$bg-color},
9
+ %bg-#{$bg-color} { background-color: $color; }
10
+
11
+ @if $bg-color != "white" {
12
+ .bg-light-#{$bg-color},
13
+ %bg-light-#{$bg-color} { background-color: lighten($color, 32.5%); }
14
+ }
15
+ }
16
+ }
17
+
18
+
19
+ // Type colors
20
+ @if $use-type-colors == true {
21
+ @each $type-color, $color in $type-colors {
22
+ .color-#{$type-color},
23
+ %color-#{$type-color} { color: $color; }
24
+ }
25
+ }
@@ -7,11 +7,13 @@
7
7
  outline: none;
8
8
  position: relative;
9
9
  width: auto;
10
-
10
+
11
11
  .dropdown-menu {
12
- background-color: #fff;
13
- border: 1px solid #eee;
12
+ background-color: $dropdown-bg-color;
13
+ border: 1px solid $dropdown-border-color;
14
14
  border-radius: inherit;
15
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
16
+ filter: alpha(opacity=0);
15
17
  font-weight: inherit;
16
18
  left: 0;
17
19
  margin-left: 0px;
@@ -21,100 +23,92 @@
21
23
  right: 0;
22
24
  text-transform: none;
23
25
  z-index: 99999;
24
-
25
- @include vendor(transition, all 0.3s ease-in);
26
-
26
+
27
+ @include vendor(transition, all 0.3s ease-in, ms official);
28
+
27
29
  a { text-decoration: none; }
28
-
30
+
29
31
  p {
30
32
  margin: 0;
31
33
  padding: 10px 15px;
32
34
  }
33
-
35
+
34
36
  span { line-height: inherit; }
35
-
37
+
36
38
  img {
37
39
  padding: 15px;
38
40
  width: 100%;
39
41
  }
40
-
42
+
41
43
  iframe {
42
44
  height: auto;
43
45
  padding: 15px;
44
46
  width: 100%;
45
47
  }
46
-
47
- img + p, iframe + p { padding-top: 0px; }
48
-
48
+
49
+ img + p,
50
+ iframe + p { padding-top: 0px; }
51
+
49
52
  hr { margin: 10px; }
50
- }
51
-
52
- ul.dropdown-menu { list-style-type: none; }
53
-
54
- .dropdown-menu {
53
+
55
54
  li {
56
55
  display: block;
57
56
  padding: 5px 10px;
58
-
59
- @include vendor(transition, all 0.3s ease-out);
60
- }
61
-
62
-
63
- // Rounded corners
64
- &.border-radius li {
65
- &:first-of-type { border-radius: $border-radius $border-radius 0 0; }
66
-
67
- &:last-of-type { border-radius: 0 0 $border-radius $border-radius; }
57
+
58
+ @include vendor(transition, all 0.3s ease-out, ms official);
68
59
  }
69
-
70
- li:hover { background-color: #f3f8f8; }
60
+
61
+ li:hover { background-color: $dropdown-hover-color; }
62
+
63
+
64
+ // Headers
65
+ & > .dropdown-header { margin: 0; }
71
66
  }
72
-
67
+
68
+ ul.dropdown-menu { list-style-type: none; }
69
+
73
70
  &.dropdown-active .dropdown-menu {
71
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
72
+ filter: alpha(opacity=100);
74
73
  opacity: 1;
75
74
  pointer-events: auto;
76
75
  }
77
-
78
- .header {
79
- color: #aaa;
76
+
77
+ .dropdown-header {
78
+ color: $dropdown-header-color;
80
79
  cursor: default;
81
- font-size: 14px;
82
- font-size: 0.9rem;
83
- @include font-size(14px);
80
+ @include font-size(14px);
84
81
  margin: 12px 0 0;
85
82
  padding: 0 0 0 9px;
86
83
  }
87
- }
88
84
 
89
- @include breakpoint(small) {
90
- .dropdown {
91
- .dropdown-menu { width: 200px; }
92
-
93
- &.dropdown-small .dropdown-menu { width: 150px; }
94
-
95
- &.dropdown-large .dropdown-menu { width: 350px; }
96
-
97
- &.dropdown-full .dropdown-menu { width: 100%; }
85
+ &.dropdown-collapse-full .dropdown-menu { width: 100%; }
86
+
87
+ @include breakpoint(small) {
88
+ & {
89
+ .dropdown-menu { width: 200px; }
90
+
91
+ &.dropdown-small .dropdown-menu { width: 150px; }
92
+
93
+ &.dropdown-large .dropdown-menu { width: 350px; }
94
+
95
+ &.dropdown-full .dropdown-menu { width: 100%; }
96
+
97
+ &.dropdown-collapse-full .dropdown-menu { width: 200px; }
98
+ }
98
99
  }
99
- }
100
100
 
101
+ .dropdown-header:hover,
102
+ li.dropdown-header:hover { background: none; }
101
103
 
102
- // Headers
103
- .dropdown-menu > .header { margin: 0; }
104
104
 
105
- .dropdown {
106
- .header:hover,
107
- li.header:hover { background: none; }
108
-
109
- .dropdown-menu.border-radius { border-radius: $border-radius; }
110
-
111
-
112
- // Arrows
105
+ // Arrows
113
106
  &[class*='dropdown-arrow-'] .dropdown-menu {
114
107
  margin-top: 10px;
115
-
108
+
109
+ &:before,
116
110
  &:after {
117
- border-color: #fff transparent;
111
+ border-color: $dropdown-bg-color transparent;
118
112
  border-style: solid;
119
113
  bottom: 100%;
120
114
  border-width: 0 6px 6px 6px;
@@ -123,45 +117,39 @@
123
117
  position: absolute;
124
118
  width: 0;
125
119
  }
126
-
120
+
127
121
  &:before {
128
122
  border-color: rgba(0, 0, 0, 0.1) transparent;
129
- border-style: solid;
130
- bottom: 100%;
131
123
  border-width: 0 8px 8px 8px;
132
- content: "";
133
- height: 0;
134
- position: absolute;
135
- width: 0;
136
124
  }
137
125
  }
138
-
126
+
139
127
  &.dropdown-arrow-left .dropdown-menu {
140
128
  &:after { left: 15px; }
141
-
129
+
142
130
  &:before { left: 13px; }
143
131
  }
144
-
132
+
145
133
  &.dropdown-arrow-right .dropdown-menu {
146
134
  &:after { right: 15px; }
147
-
135
+
148
136
  &:before { right: 13px; }
149
137
  }
150
-
151
-
152
- // Dropup
138
+
139
+
140
+ // Dropup
153
141
  &.up {
154
142
  .dropdown-menu { bottom: 100%; }
155
-
143
+
156
144
  &[class*='dropdown-arrow-'] .dropdown-menu {
157
145
  margin-bottom: 10px;
158
-
146
+
159
147
  &:after, &:before { top: 100%; }
160
-
148
+
161
149
  &:after { border-width: 6px 6px 0 6px; }
162
-
150
+
163
151
  &:before { border-width: 8px 8px 0 8px; }
164
152
  }
165
153
  }
166
154
  }
167
- }
155
+ }
@@ -0,0 +1,133 @@
1
+ @if $use-navigation == true {
2
+ //------------------------------------
3
+ // NAVIGATION
4
+ //------------------------------------
5
+
6
+ // Silent Class
7
+ %before-responsive-icon {
8
+ clear: both;
9
+ content: ".";
10
+ display: block;
11
+ height: 0;
12
+ line-height: 0;
13
+ text-align: center;
14
+ visibility: hidden;
15
+ }
16
+
17
+
18
+ // Navigation Styles
19
+ nav {
20
+ ul,
21
+ ol {
22
+ list-style: none;
23
+ margin: 0;
24
+ }
25
+
26
+ li {
27
+ cursor: pointer;
28
+ position: relative;
29
+
30
+ .dropdown & { margin-right: 0px; }
31
+ }
32
+ }
33
+
34
+
35
+ @if $use-responsive-navigation == true {
36
+ // Responsive navigation
37
+ //
38
+ // Thanks to Ben Plum for the great work on his
39
+ // Naver plugin (https://github.com/benplum/Naver/)
40
+ .naver {
41
+ .naver-handle {
42
+ color: inherit;
43
+ cursor: pointer;
44
+ display: none;
45
+ @include font-size(24px);
46
+ text-align: right;
47
+ text-transform: uppercase;
48
+
49
+ @include vendor(user-select, none, ms official);
50
+ }
51
+
52
+ .naver-wrapper {
53
+ height: auto;
54
+ width: 100%;
55
+ }
56
+
57
+ &.enabled {
58
+ .naver-handle { display: block; }
59
+
60
+ .naver-wrapper {
61
+ height: 0px;
62
+ overflow: hidden;
63
+
64
+ li {
65
+ display: block;
66
+ padding: 8px;
67
+ text-align: left;
68
+ width: 100%;
69
+
70
+ &:hover { background: #f9f9f9; }
71
+ }
72
+ }
73
+ }
74
+ }
75
+
76
+ .nav-responsive {
77
+ &.naver .naver-handle:after {
78
+ content: "\2261";
79
+ text-align: right;
80
+ }
81
+
82
+ &.nav-responsive-text.naver {
83
+ .naver-handle:after { content: "\00a0 \2261"; }
84
+
85
+ .naver-container:before {
86
+ @extend %before-responsive-icon;
87
+ }
88
+ }
89
+ }
90
+
91
+
92
+ // Left-aligned responsive navigation
93
+ .nav-responsive-left {
94
+ &.naver .naver-handle {
95
+ text-align: left;
96
+
97
+ &:before {
98
+ content: "\2261";
99
+ text-align: left;
100
+ }
101
+ }
102
+
103
+ &.nav-responsive-text.naver {
104
+ .naver-handle:before { content: "\2261 \00a0"; }
105
+
106
+ .naver-container:after {
107
+ @extend %before-responsive-icon;
108
+ }
109
+ }
110
+ }
111
+
112
+
113
+ // Centered responsive navigation
114
+ .nav-responsive-center {
115
+ &.naver .naver-handle {
116
+ text-align: center;
117
+
118
+ &:before {
119
+ content: "\2261";
120
+ text-align: center;
121
+ }
122
+ }
123
+
124
+ &.nav-responsive-text.naver {
125
+ .naver-handle:before { content: "\2261 \00a0"; }
126
+
127
+ .naver-container:after {
128
+ @extend %before-responsive-icon;
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }
@@ -8,53 +8,53 @@
8
8
  * http://opensource.org/licenses/MIT
9
9
  *
10
10
  */
11
-
12
-
13
-
14
11
 
12
+
13
+
14
+
15
+ //------------------------------------
16
+ // IMPORTS
15
17
  //------------------------------------
16
- // IMPORTS
17
- //------------------------------------
18
- // Generic utility styles
19
- @import "defaults";
20
- @import "generic/mixins";
21
- @import "generic/normalize";
22
- @import "generic/clearfix";
23
- @import "generic/shared";
18
+ // Utility helpers
19
+ @import "helpers/variables";
20
+ @import "helpers/functions";
21
+ @import "helpers/mixins";
22
+ @import "helpers/normalize";
23
+ @import "helpers/clearfix";
24
24
 
25
25
 
26
26
 
27
27
 
28
28
  // Base styles
29
29
  @import "base/main";
30
+ @import "base/vertical-rhythm";
30
31
  @import "base/selection";
31
- @import "base/container";
32
32
  @import "base/type";
33
33
  @import "base/headings";
34
- @import "base/blockquotes";
35
- @import "base/lists";
36
- @import "base/tables";
37
- @import "base/forms";
38
- @import "base/grid";
39
34
 
40
35
 
41
36
 
42
37
 
43
- // Objects and abstractions
44
- @import "objects/colors";
45
- @import "objects/buttons";
46
- @import "objects/groups";
47
- @import "objects/dropdowns";
48
- @import "objects/navigation";
49
- @import "objects/breadcrumbs";
50
- @import "objects/wells";
51
- @import "objects/badges";
52
- @import "objects/progress";
38
+ // Layout styles
39
+ @import "layout/container";
40
+ @import "layout/grid";
41
+ @import "layout/lists";
42
+ @import "layout/forms";
43
+ @import "layout/tables";
44
+
45
+
46
+
47
+
48
+ // Component styles
49
+ @import "components/colors";
50
+ @import "components/buttons";
51
+ @import "components/dropdowns";
52
+ @import "components/navigation";
53
53
 
54
54
 
55
55
 
56
56
 
57
- // Helper classes
58
- @import "generic/helper";
59
- @import "generic/conditional";
60
- @import "generic/print";
57
+ // Helpers
58
+ @import "helpers/helpers";
59
+ @import "helpers/conditional";
60
+ @import "base/print";