concisecss 0.0.5 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -2,31 +2,33 @@
2
2
  //------------------------------------
3
3
  // MAIN
4
4
  //------------------------------------
5
-
5
+
6
6
  // Variables
7
- $font-size: #{($base-font-size/16px)*1em};
7
+ $font-size: #{($base-font-size / 16px) * 1em};
8
8
  $line-height-integer: #{$line-height-ratio};
9
-
9
+
10
10
  *{
11
11
  &,
12
12
  &:before,
13
13
  &:after {
14
- @include vendor(box-sizing, border-box);
14
+ @include vendor(box-sizing, border-box, official);
15
15
  }
16
16
  }
17
-
18
- html,
17
+
18
+ html,
19
19
  body {
20
- background-color: #fff;
20
+ background-color: $website-bg-color;
21
21
  color: $base-font-color;
22
22
  font: normal normal $font-size/$line-height-integer $base-font-family;
23
23
  margin: 0;
24
-
25
- font-smooth: always;
26
-
27
- -webkit-font-smoothing: antialiased;
28
- -moz-font-smoothing: antialiased;
24
+
25
+ @if $enable-font-smoothing == true {
26
+ font-smooth: always;
27
+
28
+ -webkit-font-smoothing: antialiased;
29
+ -moz-font-smoothing: antialiased;
30
+ }
29
31
  }
30
32
 
31
33
  html[dir="rtl"] { direction: rtl; }
32
- }
34
+ }
@@ -5,106 +5,88 @@
5
5
  @media print {
6
6
  @page { margin: 0.5cm; }
7
7
 
8
- * {
8
+ *,
9
+ *:before,
10
+ *:after {
9
11
  background: transparent !important;
10
12
  color: black !important;
11
13
  text-shadow: none !important;
12
-
13
- @include vendor(filter, none !important);
14
-
15
- &:before,
16
- &:after {
17
- background: transparent !important;
18
- color: black !important;
19
- text-shadow: none !important;
20
-
21
- @include vendor(filter, none !important);
22
- }
14
+
15
+ @include vendor(filter, none !important, webkit moz ms official);
23
16
  }
24
-
17
+
25
18
  body {
26
19
  background-color: #fff;
27
20
  color: #000;
28
- font: 0.57em / 1.3 Georgia, "Times New Roman", Times, serif;
21
+ font: 0.57em / 1.3 $base-print-font-family;
29
22
  }
30
-
23
+
31
24
  img { max-width: 100% !important; }
32
-
25
+
33
26
  .show-print {
34
27
  display: block;
35
28
  visibility: visible;
36
29
  }
37
-
38
- .hide-print,
39
- video,
40
- audio,
41
- object,
42
- embed,
43
- nav,
44
- footer,
30
+
31
+ .hide-print,
32
+ video,
33
+ audio,
34
+ object,
35
+ embed,
36
+ nav,
37
+ footer,
45
38
  a[href^="#"]:after {
46
39
  display: none;
47
40
  visibility: hidden;
48
41
  }
49
-
50
- p,
51
- h2,
42
+
43
+ p,
44
+ h2,
52
45
  h3 {
53
46
  orphans: 3;
54
47
  widows: 3;
55
48
  }
56
-
57
- h2,
49
+
50
+ h2,
58
51
  h3 { page-break-after: avoid; }
59
-
60
- a {
52
+
53
+ a,
54
+ a:visited {
61
55
  color: #000;
62
56
  text-decoration: underline;
63
57
  word-wrap: break-word;
64
-
65
- &:visited {
66
- color: #000;
67
- text-decoration: underline;
68
- word-wrap: break-word;
69
- }
70
-
58
+
71
59
  &[href]:after {
72
60
  content: " (" attr(href) ")";
73
61
  font-size: smaller;
74
62
  }
75
63
  }
76
-
64
+
77
65
  q:after { content: " (Source: " attr(cite) ")"; }
78
-
66
+
79
67
  abbr[title]:after { content: " (" attr(title) ")"; }
80
-
68
+
81
69
  a {
82
- &:after,
83
- &[href^="javascript:"]:after,
70
+ &:after,
71
+ &[href^="javascript:"]:after,
84
72
  &[href^="#"]:after { content: ""; }
85
73
  }
86
-
74
+
87
75
  pre,
88
76
  blockquote {
89
77
  border: 1px solid #ededed;
90
78
  page-break-inside: avoid;
91
79
  }
92
-
80
+
93
81
  thead { display: table-header-group; }
94
-
95
- tr,
82
+
83
+ tr,
96
84
  img { page-break-inside: avoid; }
97
-
85
+
98
86
  ul {
99
87
  list-style: none;
100
-
88
+
101
89
  li { content: "» "; }
102
90
  }
103
-
104
- .label,
105
- .badge {
106
- border: 1px solid #000;
107
- color: #000;
108
- }
109
91
  }
110
- }
92
+ }
@@ -2,20 +2,26 @@
2
2
  //------------------------------------
3
3
  // SELECTION
4
4
  //------------------------------------
5
+
6
+ // Silent Class
7
+ %selection-style {
8
+ background-color: $selection-background;
9
+ color: $selection-color;
10
+ }
11
+
12
+
13
+ // Selection Style
5
14
  * {
6
15
  &::-webkit-selection {
7
- background-color: $selection-background;
8
- color: $selection-color;
16
+ @extend %selection-style;
9
17
  }
10
-
18
+
11
19
  &::-moz-selection {
12
- background-color: $selection-background;
13
- color: $selection-color;
20
+ @extend %selection-style;
14
21
  }
15
-
22
+
16
23
  &::selection {
17
- background-color: $selection-background;
18
- color: $selection-color;
24
+ @extend %selection-style;
19
25
  }
20
26
  }
21
- }
27
+ }
@@ -2,48 +2,50 @@
2
2
  //------------------------------------
3
3
  // TYPE
4
4
  //------------------------------------
5
+
6
+ // Variables
7
+ $small-size: 12px !default;
8
+ $micro-size: 10px !default;
9
+
10
+
5
11
  // Links
6
12
  a {
7
- color: $base-link-color;
13
+ color: $base-link-color;
8
14
  text-decoration: none;
9
-
10
- &:hover,
15
+
16
+ &:hover,
11
17
  &:visited {
12
18
  color: lighten($base-link-color, 10%);
13
19
  cursor: pointer;
14
20
  text-decoration: underline;
15
21
  }
16
- }
17
22
 
18
- p a {
19
- line-height: inherit;
20
-
21
- &:visited { line-height: inherit; }
23
+ p & {
24
+ &,
25
+ &:visited { line-height: inherit; }
26
+ }
22
27
  }
23
28
 
24
29
 
25
30
  // Sizing
26
- small,
31
+ small,
27
32
  .small {
28
- @include font-size($small-size);
33
+ @include font-size($small-size);
29
34
  }
30
35
 
31
- .micro {
32
- @include font-size($micro-size);
36
+ .micro {
37
+ @include font-size($micro-size);
33
38
  }
34
39
 
35
40
 
36
41
  // Addresses
37
- address {
38
- font-style: normal;
39
-
40
- > strong { display: block; }
41
- }
42
+ address { font-style: normal; }
42
43
 
43
44
 
44
45
  // Other elements
45
46
  abbr {
46
- &[title], &[data-original-title] {
47
+ &[title],
48
+ &[data-original-title] {
47
49
  cursor: help;
48
50
  border-bottom: 1px dotted #999;
49
51
  }
@@ -51,7 +53,7 @@
51
53
 
52
54
  acronym {
53
55
  cursor: help;
54
- border-bottom: 1px dashed blue;
56
+ border-bottom: 1px dashed $base-link-color;
55
57
  }
56
58
 
57
59
  kbd {
@@ -1,24 +1,23 @@
1
- @if $use-shared == true {
1
+ @if $use-vertical-rhythm == true {
2
2
  //------------------------------------
3
3
  // SHARED
4
4
  //------------------------------------
5
-
5
+
6
6
  // Thanks to inuitcss for some simple ways to help maintain
7
7
  // vertical rhythm (https://github.com/csswizardry/inuit.css/edit/master/generic/_shared.scss)
8
-
9
- // Declare a common bottom margin for most elements
8
+
9
+ // Declare a common bottom margin for most elements
10
10
  // to maintain a consistent vertical rhythm.
11
- h1, h2, h3, h4, h5, h6,
11
+ h1, h2, h3, h4, h5, h6,
12
12
  .h1, .h2, .h3, .h4, .h5, .h6,
13
- .giga, .mega, .kilo,
13
+ .giga, .mega, .kilo,
14
14
  hgroup,
15
15
  ul, ol, dl,
16
16
  blockquote, p, address,
17
17
  table,
18
18
  fieldset, figure,
19
19
  pre,
20
- .row,
21
- .well {
20
+ .row, .form-item {
22
21
  margin-bottom: $base-spacing-unit;
23
22
  margin-bottom: ($base-spacing-unit / $base-font-size) * 1rem;
24
23
  }
@@ -32,8 +31,8 @@
32
31
 
33
32
 
34
33
  // Left margin for lists
35
- ul,
36
- ol,
34
+ ul,
35
+ ol,
37
36
  dd {
38
37
  margin-left: 2 * $base-spacing-unit;
39
38
  margin-left: (2 * $base-spacing-unit / $base-font-size) * 1rem;
@@ -0,0 +1,174 @@
1
+ @if $use-buttons == true {
2
+ //------------------------------------
3
+ // BUTTONS
4
+ //------------------------------------
5
+ .btn {
6
+ background-color: $object-ui-color;
7
+ border: 0;
8
+ color: $button-font-color;
9
+ cursor: pointer;
10
+ display: inline-block;
11
+ font-family: inherit;
12
+ font-size: 100%;
13
+ line-height: 1;
14
+ padding: 0.5em 1em;
15
+ position: relative;
16
+ text-align: center;
17
+ text-decoration: none;
18
+ vertical-align: baseline;
19
+ white-space: nowrap;
20
+
21
+ -webkit-touch-callout: none;
22
+
23
+ @include vendor(user-select, none, webkit ms o official);
24
+
25
+ @include vendor(user-drag, none, webkit);
26
+
27
+ &::-moz-focus-inner {
28
+ padding: 0;
29
+ border: 0;
30
+ }
31
+
32
+ &:hover { background-color: darken($object-ui-color, 10%); }
33
+
34
+ &:active { background-color: darken($object-ui-color, 5%); }
35
+
36
+ &[disabled] {
37
+ &,
38
+ &:hover,
39
+ &:active,
40
+ &:focus {
41
+ background: #dededc !important;
42
+ border: none;
43
+ color: #b3b3b1;
44
+ cursor: not-allowed;
45
+ }
46
+ }
47
+
48
+
49
+ // Background colors
50
+ @if $use-button-bg-colors == true {
51
+ @each $bg-color, $color in $bg-colors {
52
+ &.bg-#{$bg-color} { background-color: $color; }
53
+
54
+ &.bg-#{$bg-color}:hover { background-color: darken($color, 10%); }
55
+
56
+ &.bg-#{$bg-color}:active { background-color: darken($color, 5%); }
57
+
58
+ @if $bg-color != "white" {
59
+ &.bg-light-#{$bg-color} { background-color: lighten($color, 32.5%); }
60
+ }
61
+ }
62
+ }
63
+ }
64
+
65
+ a.btn {
66
+ &,
67
+ &:hover {
68
+ color: $button-hover-font-color;
69
+ text-decoration: none;
70
+ }
71
+
72
+ &:active { outline: 0; }
73
+ }
74
+
75
+ input[type="submit"].btn {
76
+ color: $button-font-color;
77
+ height: auto;
78
+ padding: 0.5em 1em;
79
+ }
80
+
81
+ button.btn { color: $button-font-color; }
82
+
83
+
84
+ @if $use-button-styles == true {
85
+ // Full-width collapsed button
86
+ .btn-collapse-full {
87
+ display: block;
88
+ margin: 12px 0;
89
+ width: 100%;
90
+
91
+ @include breakpoint(extra-small) {
92
+ & {
93
+ display: inline-block;
94
+ margin: 0;
95
+ width: auto;
96
+ }
97
+ }
98
+ }
99
+
100
+
101
+ // Button sizes
102
+ .btn-extra-small,
103
+ a.btn-extra-small,
104
+ p.btn-extra-small,
105
+ input.btn-extra-small {
106
+ @include font-size(10px);
107
+ padding: 0.25em 0.75em;
108
+ }
109
+
110
+ .btn-small,
111
+ a.btn-small,
112
+ p.btn-small,
113
+ input.btn-small { @include font-size(12px); }
114
+
115
+ .btn-large,
116
+ a.btn-large,
117
+ p.btn-large,
118
+ input.btn-large {
119
+ @include font-size(18px);
120
+ padding: 1em 2em;
121
+ }
122
+
123
+ .btn-extra-large,
124
+ a.btn-extra-large,
125
+ p.btn-extra-large,
126
+ input.btn-extra-large {
127
+ @include font-size(24px);
128
+ padding: 1em 2em;
129
+ }
130
+
131
+
132
+ // Dropdowns
133
+ .btn.dropdown {
134
+ width: 100%;
135
+
136
+ .dropdown-menu {
137
+ margin-top: auto;
138
+ text-align: left;
139
+ top: 100%;
140
+ width: 100%;
141
+ }
142
+
143
+ &[class*='dropdown-arrow-'] .dropdown-menu { margin-top: 10px; }
144
+
145
+ &.up {
146
+ .dropdown-menu {
147
+ margin-bottom: 0px;
148
+ top: auto;
149
+ }
150
+
151
+ &[class*='dropdown-arrow-'] .dropdown-menu { margin-bottom: 10px; }
152
+ }
153
+ }
154
+
155
+ @include breakpoint(small) {
156
+ .btn-extra-small .caret,
157
+ .btn-small .caret {
158
+ border-top: 4px solid;
159
+ border-right: 4px solid transparent;
160
+ border-left: 4px solid transparent;
161
+ }
162
+
163
+ .btn.dropdown {
164
+ width: auto;
165
+
166
+ &.extra-small .dropdown-menu { margin-top: 6px; }
167
+
168
+ &.dropdown-small .dropdown-menu { margin-top: 11px; }
169
+
170
+ &.dropdown-large .dropdown-menu { margin-top: 21px; }
171
+ }
172
+ }
173
+ }
174
+ }