concisecss 0.0.1

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 (47) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +26 -0
  5. data/README.md +44 -0
  6. data/Rakefile +8 -0
  7. data/app/assets/javascripts/concisecss/close.js +6 -0
  8. data/app/assets/javascripts/concisecss/dropdown.js +33 -0
  9. data/app/assets/javascripts/concisecss/naver.js +358 -0
  10. data/app/assets/javascripts/concisecss/navigation.js +23 -0
  11. data/app/assets/javascripts/concisecss/non-responsive.js +51 -0
  12. data/app/assets/javascripts/concisecss.js +1 -0
  13. data/app/assets/stylesheets/_defaults.scss +190 -0
  14. data/app/assets/stylesheets/base/_blockquotes.scss +36 -0
  15. data/app/assets/stylesheets/base/_container.scss +14 -0
  16. data/app/assets/stylesheets/base/_forms.scss +125 -0
  17. data/app/assets/stylesheets/base/_grid.scss +67 -0
  18. data/app/assets/stylesheets/base/_headings.scss +155 -0
  19. data/app/assets/stylesheets/base/_lists.scss +125 -0
  20. data/app/assets/stylesheets/base/_main.scss +29 -0
  21. data/app/assets/stylesheets/base/_selection.scss +21 -0
  22. data/app/assets/stylesheets/base/_tables.scss +83 -0
  23. data/app/assets/stylesheets/base/_type.scss +64 -0
  24. data/app/assets/stylesheets/concise.scss +104 -0
  25. data/app/assets/stylesheets/generic/_clearfix.scss +12 -0
  26. data/app/assets/stylesheets/generic/_conditional.scss +122 -0
  27. data/app/assets/stylesheets/generic/_debug.scss +98 -0
  28. data/app/assets/stylesheets/generic/_helper.scss +117 -0
  29. data/app/assets/stylesheets/generic/_mixins.scss +122 -0
  30. data/app/assets/stylesheets/generic/_normalize.scss +191 -0
  31. data/app/assets/stylesheets/generic/_print.scss +109 -0
  32. data/app/assets/stylesheets/generic/_shared.scss +37 -0
  33. data/app/assets/stylesheets/objects/_badges.scss +53 -0
  34. data/app/assets/stylesheets/objects/_breadcrumbs.scss +35 -0
  35. data/app/assets/stylesheets/objects/_buttons.scss +287 -0
  36. data/app/assets/stylesheets/objects/_colors.scss +45 -0
  37. data/app/assets/stylesheets/objects/_dropdowns.scss +167 -0
  38. data/app/assets/stylesheets/objects/_groups.scss +102 -0
  39. data/app/assets/stylesheets/objects/_navigation.scss +377 -0
  40. data/app/assets/stylesheets/objects/_progress.scss +102 -0
  41. data/app/assets/stylesheets/objects/_wells.scss +103 -0
  42. data/concisecss.gemspec +25 -0
  43. data/lib/concisecss/concisecss_source.rb +63 -0
  44. data/lib/concisecss/engine.rb +6 -0
  45. data/lib/concisecss/version.rb +3 -0
  46. data/lib/concisecss.rb +7 -0
  47. metadata +155 -0
@@ -0,0 +1,122 @@
1
+ //
2
+ // Passing in a single value will create font-sizing in
3
+ // pixels, rems as well as a proper line-height.
4
+ //
5
+ // `@include font-size(24px);`
6
+ //
7
+ //
8
+ @mixin font-size($font-size, $line-height:true) {
9
+ font-size: $font-size;
10
+ font-size: ($font-size / $base-font-size) * 1rem;
11
+
12
+ @if $line-height == true {
13
+ line-height: ceil($font-size / $base-line-height) * ($base-line-height / $font-size);
14
+ }
15
+ }
16
+
17
+
18
+ //
19
+ // Proper vendor prefixes are created just by
20
+ // passing a property value and size value.
21
+ //
22
+ // `@include vendor(border-radius, 4px);`
23
+ //
24
+ //
25
+ @mixin vendor($property, $value...) {
26
+ -webkit-#{$property}: $value;
27
+ -moz-#{$property}: $value;
28
+ -ms-#{$property}: $value;
29
+ -o-#{$property}: $value;
30
+ #{$property}: $value;
31
+ }
32
+
33
+
34
+ //
35
+ // By passing in one of the pre-defined media queries that
36
+ // are packaged with Concise by default, you can easily
37
+ // create styles that are built from the ground-up to be
38
+ // mobile friendly.
39
+ //
40
+ // `@include breakpoint(extra-small) { [styles here] }`
41
+ //
42
+ //
43
+ @mixin breakpoint($point) {
44
+ @if $point == extra-small {
45
+ @media (min-width: $extra-small-start) { @content; }
46
+ }
47
+
48
+ @else if $point == small {
49
+ @media (min-width: $small-start) { @content; }
50
+ }
51
+
52
+ @else if $point == medium {
53
+ @media (min-width: $medium-start) { @content; }
54
+ }
55
+
56
+ @else if $point == large {
57
+ @media (min-width: $large-start) { @content; }
58
+ }
59
+
60
+ @else if $point == extra-large {
61
+ @media (min-width: $extra-large-start) { @content; }
62
+ }
63
+
64
+ @else if $point == high-density {
65
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
66
+ only screen and (min--moz-device-pixel-ratio: 1.5),
67
+ only screen and (-o-min-device-pixel-ratio: 3/2),
68
+ only screen and (min-device-pixel-ratio: 1.5) { @content; }
69
+ }
70
+ }
71
+
72
+
73
+ //
74
+ // Create variable-number grid columns given the value
75
+ // for variable `$column-number`
76
+ //
77
+ @mixin grid-setup($number: $column-number) {
78
+ // Assign percentage-based widths for columns
79
+ @for $i from 1 through $number {
80
+ .#{$column-prefix + $i} { width: 100% / $number * $i; }
81
+ }
82
+
83
+ @for $i from 1 through $number {
84
+ // Style all but the last column
85
+ @if $i != $column-number {
86
+ .gutters .#{$column-prefix + $i} { width: 100% / $number * $i - $gutters; }
87
+ } @else {
88
+ // Ensure the last column has a width of 100%
89
+ .gutters .#{$column-prefix + $i} { width: 100% }
90
+ }
91
+ }
92
+ }
93
+
94
+
95
+ //
96
+ // Create proper `.push-` classes given the value
97
+ // for variable `$column-number`
98
+ //
99
+ @mixin push-setup($number: $column-number) {
100
+ @for $i from 1 to $number {
101
+ .push-#{$i} { left: 100% / $number * $i; }
102
+ }
103
+
104
+ @for $i from 1 to $number {
105
+ .gutters .push-#{$i} { left: 100% / $number * $i - $gutters; }
106
+ }
107
+ }
108
+
109
+
110
+ //
111
+ // Create proper `.pull-` classes given the value
112
+ // for variable `$column-number`
113
+ //
114
+ @mixin pull-setup($number: $column-number) {
115
+ @for $i from 1 to $number {
116
+ .pull-#{$i} { right: 100% / $number * $i; }
117
+ }
118
+
119
+ @for $i from 1 to $number {
120
+ .gutters .pull-#{$i} { right: 100% / $number * $i - $gutters; }
121
+ }
122
+ }
@@ -0,0 +1,191 @@
1
+ @if $use-normalize == true {
2
+ //------------------------------------//
3
+ // $NORMALIZE
4
+ //------------------------------------//
5
+ html {
6
+ font-size: 100%;
7
+ @include vendor(text-size-adjust, 100%);
8
+ }
9
+
10
+ article,
11
+ aside,
12
+ details,
13
+ figcaption,
14
+ figure,
15
+ footer,
16
+ header,
17
+ hgroup,
18
+ main,
19
+ nav,
20
+ section,
21
+ summary { display: block; }
22
+
23
+ audio,
24
+ canvas,
25
+ progress,
26
+ video {
27
+ display: inline-block;
28
+ vertical-align: baseline;
29
+ }
30
+
31
+ audio:not([controls]) {
32
+ display: none;
33
+ height: 0;
34
+ }
35
+
36
+ [hidden],
37
+ template { display: none; }
38
+
39
+ a {
40
+ background: transparent;
41
+
42
+ &:focus { outline: thin dotted; }
43
+
44
+ &:active,
45
+ &:hover { outline: 0; }
46
+ }
47
+
48
+ abbr[title] { border-bottom: 1px dotted; }
49
+
50
+ b,
51
+ strong { font-weight: bold; }
52
+
53
+ dfn { font-style: italic; }
54
+
55
+ mark {
56
+ background: #ff0;
57
+ color: #000;
58
+ }
59
+
60
+ sub,
61
+ sup {
62
+ font-size: 75%;
63
+ line-height: 0;
64
+ position: relative;
65
+ vertical-align: baseline;
66
+ }
67
+
68
+ sup { top: -0.5em; }
69
+
70
+ sub { bottom: -0.25em; }
71
+
72
+ img {
73
+ border: 0;
74
+ -ms-interpolation-mode: bicubic;
75
+ }
76
+
77
+ svg:not(:root) { overflow: hidden; }
78
+
79
+ figure { margin: 1em 40px; }
80
+
81
+ hr {
82
+ border: solid #eee;
83
+ border-width: 1px 0 0;
84
+ clear: both;
85
+ height: 0;
86
+
87
+ @include vendor(box-sizing, content-box);
88
+ }
89
+
90
+ pre {
91
+ white-space: pre;
92
+ white-space: pre-wrap;
93
+ word-wrap: break-word;
94
+ }
95
+
96
+ code,
97
+ kbd,
98
+ pre,
99
+ samp {
100
+ font-family: monospace, monospace;
101
+ @include font-size($base-font-size);
102
+ }
103
+
104
+ q {
105
+ quotes: none;
106
+
107
+ &:before,
108
+ &:after {
109
+ content: '';
110
+ content: none;
111
+ }
112
+ }
113
+
114
+ form { margin: 0; }
115
+
116
+ button,
117
+ input,
118
+ optgroup,
119
+ select,
120
+ textarea {
121
+ color: inherit;
122
+ font: inherit;
123
+ margin: 0;
124
+ vertical-align: baseline;
125
+ }
126
+
127
+ button { overflow: visible; }
128
+
129
+ button,
130
+ select { text-transform: none; }
131
+
132
+ button,
133
+ html input[type="button"],
134
+ input[type="reset"],
135
+ input[type="submit"] {
136
+ -webkit-appearance: button;
137
+ cursor: pointer;
138
+ }
139
+
140
+ button[disabled],
141
+ html input[disabled] { cursor: default; }
142
+
143
+ button::-moz-focus-inner,
144
+ input::-moz-focus-inner {
145
+ border: 0;
146
+ padding: 0;
147
+ }
148
+
149
+ input {
150
+ line-height: normal;
151
+
152
+ &[type="checkbox"],
153
+ &[type="radio"] {
154
+ box-sizing: border-box;
155
+ padding: 0;
156
+ }
157
+
158
+ &[type="number"] {
159
+ &::-webkit-inner-spin-button,
160
+ &::-webkit-outer-spin-button { height: auto; }
161
+ }
162
+
163
+ &[type="search"] {
164
+ -webkit-appearance: textfield;
165
+ @include vendor(box-sizing, content-box);
166
+
167
+ &::-webkit-search-cancel-button,
168
+ &::-webkit-search-decoration { -webkit-appearance: none; }
169
+ }
170
+ }
171
+
172
+ fieldset { margin: 0 2px; }
173
+
174
+ legend {
175
+ border: 0;
176
+ padding: 0;
177
+ white-space: normal;
178
+ }
179
+
180
+ textarea { overflow: auto; }
181
+
182
+ optgroup { font-weight: bold; }
183
+
184
+ table {
185
+ border-collapse: collapse;
186
+ border-spacing: 0;
187
+ }
188
+
189
+ td,
190
+ th { padding: 0; }
191
+ }
@@ -0,0 +1,109 @@
1
+ @if $use-print == true {
2
+ //------------------------------------//
3
+ // $PRINT
4
+ //------------------------------------//
5
+ @media print {
6
+ @page { margin: 0.5cm; }
7
+
8
+ * {
9
+ background: transparent !important;
10
+ color: black !important;
11
+ text-shadow: none !important;
12
+
13
+ @include vendor(filter, none !important);
14
+
15
+ &:before, &:after {
16
+ background: transparent !important;
17
+ color: black !important;
18
+ text-shadow: none !important;
19
+
20
+ @include vendor(filter, none !important);
21
+ }
22
+ }
23
+
24
+ body {
25
+ background-color: #fff;
26
+ color: #000;
27
+ font: 0.57em / 1.3 Georgia, "Times New Roman", Times, serif;
28
+ }
29
+
30
+ img { max-width: 100% !important; }
31
+
32
+ .show-print {
33
+ display: block;
34
+ visibility: visible;
35
+ }
36
+
37
+ .hide-print,
38
+ video,
39
+ audio,
40
+ object,
41
+ embed,
42
+ nav,
43
+ footer,
44
+ a[href^="#"]:after {
45
+ display: none;
46
+ visibility: hidden;
47
+ }
48
+
49
+ p,
50
+ h2,
51
+ h3 {
52
+ orphans: 3;
53
+ widows: 3;
54
+ }
55
+
56
+ h2,
57
+ h3 { page-break-after: avoid; }
58
+
59
+ a {
60
+ color: #000;
61
+ text-decoration: underline;
62
+ word-wrap: break-word;
63
+
64
+ &:visited {
65
+ color: #000;
66
+ text-decoration: underline;
67
+ word-wrap: break-word;
68
+ }
69
+
70
+ &[href]:after {
71
+ content: " (" attr(href) ")";
72
+ font-size: smaller;
73
+ }
74
+ }
75
+
76
+ q:after { content: " (Source: " attr(cite) ")"; }
77
+
78
+ abbr[title]:after { content: " (" attr(title) ")"; }
79
+
80
+ a {
81
+ &:after,
82
+ &[href^="javascript:"]:after,
83
+ &[href^="#"]:after { content: ""; }
84
+ }
85
+
86
+ pre,
87
+ blockquote {
88
+ border: 1px solid #ededed;
89
+ page-break-inside: avoid;
90
+ }
91
+
92
+ thead { display: table-header-group; }
93
+
94
+ tr,
95
+ img { page-break-inside: avoid; }
96
+
97
+ ul {
98
+ list-style: none;
99
+
100
+ li { content: "» "; }
101
+ }
102
+
103
+ .label,
104
+ .badge {
105
+ border: 1px solid #000;
106
+ color: #000;
107
+ }
108
+ }
109
+ }
@@ -0,0 +1,37 @@
1
+ @if $use-shared == true {
2
+ //------------------------------------//
3
+ // $SHARED
4
+ //------------------------------------//
5
+ // Declare a common bottom margin for most elements
6
+ // to maintain a consistent vertical rhythm.
7
+ h1, h2, h3, h4, h5, h6,
8
+ .h1, .h2, .h3, .h4, .h5, .h6,
9
+ .giga, .mega, .kilo,
10
+ hgroup,
11
+ ul, ol, dl,
12
+ blockquote, p, address,
13
+ table,
14
+ fieldset, figure,
15
+ pre,
16
+ .row,
17
+ .well {
18
+ margin-bottom: $base-spacing-unit;
19
+ margin-bottom: ($base-spacing-unit / $base-font-size) * 1rem;
20
+ }
21
+
22
+
23
+ // Spacing for <hr> tags
24
+ hr {
25
+ margin-bottom: $base-spacing-unit - 2px;
26
+ margin-bottom: (($base-spacing-unit - 2px) / $base-font-size) * 1rem;
27
+ }
28
+
29
+
30
+ // Left margin for lists
31
+ ul,
32
+ ol,
33
+ dd {
34
+ margin-left: 2 * $base-spacing-unit;
35
+ margin-left: (2 * $base-spacing-unit / $base-font-size) * 1rem;
36
+ }
37
+ }
@@ -0,0 +1,53 @@
1
+ @if $use-badges == true {
2
+ //------------------------------------//
3
+ // $BADGES
4
+ //------------------------------------//
5
+ .label,
6
+ .badge {
7
+ background-color: #b5b5b5;
8
+ color: #fff;
9
+ @include font-size(12px);
10
+ font-weight: bold;
11
+ padding: 3px 7px;
12
+ text-align: center;
13
+ vertical-align: baseline;
14
+ white-space: nowrap;
15
+ }
16
+
17
+ .label {
18
+ border-radius: 4px;
19
+ display: inline;
20
+ }
21
+
22
+ .badge {
23
+ border-radius: 10px;
24
+ display: inline-block;
25
+ padding: 1px 7px;
26
+ }
27
+
28
+ .label[href] {
29
+ &:hover, &:focus {
30
+ color: #fff;
31
+ cursor: pointer;
32
+ text-decoration: none;
33
+ }
34
+ }
35
+
36
+ a.badge {
37
+ &:hover, &:focus {
38
+ color: #fff;
39
+ cursor: pointer;
40
+ text-decoration: none;
41
+ }
42
+ }
43
+
44
+ .label a,
45
+ .badge a {
46
+ color: #fff;
47
+ cursor: pointer;
48
+ text-decoration: none;
49
+ }
50
+
51
+ .label:empty,
52
+ .badge:empty { display: none; }
53
+ }
@@ -0,0 +1,35 @@
1
+ @if $use-breadcrumbs == true {
2
+ //------------------------------------//
3
+ // $BREADCRUMBS
4
+ //------------------------------------//
5
+ .breadcrumbs {
6
+ @include font-size(13px);
7
+ margin: 12px 0;
8
+ padding: 5px 15px 5px 0;
9
+
10
+ li {
11
+ display: inline;
12
+ margin-right: 10px;
13
+
14
+ &:last-child { margin-right: 0px; }
15
+
16
+ &:after {
17
+ content: "/";
18
+ color: #ccc;
19
+ padding-left: 12px;
20
+ vertical-align: middle;
21
+ }
22
+
23
+ &:last-child {
24
+ color: #999;
25
+
26
+ a { color: #999; }
27
+
28
+ &:after { content: ""; }
29
+ }
30
+ }
31
+
32
+ .well,
33
+ &.well { padding-left: 15px; }
34
+ }
35
+ }