uniform-ui 1.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +5 -5
  2. data/lib/assets/config/manifest.js +1 -0
  3. data/lib/assets/javascripts/uniform/checkbox.js +31 -0
  4. data/lib/assets/javascripts/uniform/component.js +42 -0
  5. data/lib/assets/javascripts/uniform/dom-helpers.js +136 -0
  6. data/lib/assets/javascripts/uniform/dropdown.js +149 -0
  7. data/lib/assets/javascripts/uniform/floating-label.js +54 -0
  8. data/lib/assets/javascripts/uniform/icons.js +16 -0
  9. data/lib/assets/javascripts/uniform/modal.js +103 -0
  10. data/lib/assets/javascripts/uniform/resizer.js +43 -0
  11. data/lib/assets/javascripts/uniform/select.js +235 -0
  12. data/lib/assets/javascripts/uniform/tooltip.js +120 -0
  13. data/lib/assets/javascripts/uniform-es5.js +1 -0
  14. data/lib/assets/javascripts/uniform-jquery.js +124 -0
  15. data/lib/assets/javascripts/uniform.js +17 -0
  16. data/lib/assets/stylesheets/uniform/base.scss +3 -0
  17. data/lib/assets/stylesheets/uniform/components/alert.scss +72 -0
  18. data/lib/assets/stylesheets/uniform/components/buttons.scss +219 -0
  19. data/{vendor → lib}/assets/stylesheets/uniform/components/card.scss +33 -25
  20. data/lib/assets/stylesheets/uniform/components/container.scss +19 -0
  21. data/{vendor → lib}/assets/stylesheets/uniform/components/dropdown.scss +8 -4
  22. data/lib/assets/stylesheets/uniform/components/form/checkbox-collection.scss +103 -0
  23. data/lib/assets/stylesheets/uniform/components/form/checkbox.scss +58 -0
  24. data/lib/assets/stylesheets/uniform/components/form/floating-label.scss +64 -0
  25. data/lib/assets/stylesheets/uniform/components/form/input-group.scss +56 -0
  26. data/lib/assets/stylesheets/uniform/components/form.scss +143 -0
  27. data/lib/assets/stylesheets/uniform/components/grid.scss +158 -0
  28. data/lib/assets/stylesheets/uniform/components/label.scss +26 -0
  29. data/lib/assets/stylesheets/uniform/components/loaders.scss +80 -0
  30. data/{vendor → lib}/assets/stylesheets/uniform/components/modal.scss +26 -4
  31. data/lib/assets/stylesheets/uniform/components/nav.scss +124 -0
  32. data/lib/assets/stylesheets/uniform/components/row.scss +69 -0
  33. data/lib/assets/stylesheets/uniform/components/select.scss +122 -0
  34. data/lib/assets/stylesheets/uniform/components/table.scss +127 -0
  35. data/lib/assets/stylesheets/uniform/components/thumb.scss +41 -0
  36. data/lib/assets/stylesheets/uniform/components/tooltip.scss +63 -0
  37. data/lib/assets/stylesheets/uniform/components.scss +11 -0
  38. data/{vendor → lib}/assets/stylesheets/uniform/defaults.scss +7 -4
  39. data/lib/assets/stylesheets/uniform/functions.scss +31 -0
  40. data/lib/assets/stylesheets/uniform/helpers/border.scss +19 -0
  41. data/lib/assets/stylesheets/uniform/helpers/colors.scss +23 -0
  42. data/lib/assets/stylesheets/uniform/helpers/margin.scss +27 -0
  43. data/lib/assets/stylesheets/uniform/helpers/padding.scss +9 -0
  44. data/lib/assets/stylesheets/uniform/helpers/position.scss +13 -0
  45. data/lib/assets/stylesheets/uniform/helpers/sizes.scss +38 -0
  46. data/{vendor → lib}/assets/stylesheets/uniform/helpers/text.scss +86 -73
  47. data/lib/assets/stylesheets/uniform/helpers.scss +127 -0
  48. data/lib/assets/stylesheets/uniform/mixins.scss +116 -0
  49. data/lib/assets/stylesheets/uniform/print/grid.scss +50 -0
  50. data/lib/assets/stylesheets/uniform/variables.scss +72 -0
  51. data/lib/assets/stylesheets/uniform-print.scss +1 -0
  52. data/lib/assets/stylesheets/uniform.scss +11 -0
  53. data/lib/uniform/version.rb +3 -0
  54. data/lib/uniform.rb +15 -0
  55. metadata +87 -95
  56. data/.gitignore +0 -2
  57. data/CHANGELOG.md +0 -27
  58. data/CNAME +0 -1
  59. data/Gemfile +0 -8
  60. data/Gemfile.lock +0 -40
  61. data/LICENSE +0 -22
  62. data/README.md +0 -35
  63. data/Rakefile +0 -74
  64. data/index.html +0 -251
  65. data/lib/uniform/rails/engine.rb +0 -8
  66. data/lib/uniform/rails.rb +0 -6
  67. data/lib/uniform/ui.rb +0 -1
  68. data/preview/alerts.html.erb +0 -1
  69. data/preview/buttons.html.erb +0 -62
  70. data/preview/cards.html.erb +0 -23
  71. data/preview/colors.html.erb +0 -22
  72. data/preview/dropdown.html.erb +0 -1
  73. data/preview/form.html.erb +0 -233
  74. data/preview/grid.html.erb +0 -304
  75. data/preview/helpers.html.erb +0 -225
  76. data/preview/index.html.erb +0 -77
  77. data/preview/labels.html.erb +0 -1
  78. data/preview/layout.html.erb +0 -63
  79. data/preview/loaders.html.erb +0 -83
  80. data/preview/modal.html.erb +0 -1
  81. data/preview/nav.html.erb +0 -77
  82. data/preview/preview.scss +0 -76
  83. data/preview/rows.html.erb +0 -36
  84. data/preview/select.html.erb +0 -1
  85. data/preview/tables.html.erb +0 -1
  86. data/preview/tabs.html.erb +0 -17
  87. data/preview/tiles.html.erb +0 -1
  88. data/preview/tooltip.erb +0 -1
  89. data/preview.css +0 -0
  90. data/site/alerts.html +0 -157
  91. data/site/alerts.html copy +0 -133
  92. data/site/buttons.html +0 -286
  93. data/site/cards.html +0 -177
  94. data/site/colors.html +0 -275
  95. data/site/dropdown.html +0 -157
  96. data/site/dropdown.html copy +0 -141
  97. data/site/form.html +0 -369
  98. data/site/grid.html +0 -716
  99. data/site/helpers.html +0 -1008
  100. data/site/index.html +0 -251
  101. data/site/labels.html +0 -157
  102. data/site/layout.html +0 -313
  103. data/site/loaders.html +0 -233
  104. data/site/logo.png +0 -0
  105. data/site/modal.html +0 -157
  106. data/site/nav.html +0 -229
  107. data/site/preview.css +0 -1
  108. data/site/preview.js +0 -59
  109. data/site/rows.html +0 -190
  110. data/site/select.html +0 -157
  111. data/site/tables.html +0 -157
  112. data/site/tabs.html +0 -171
  113. data/site/tiles.html +0 -157
  114. data/site/tiles.html copy +0 -109
  115. data/site/tooltip +0 -157
  116. data/site/uniform.css +0 -1
  117. data/uniform.gemspec +0 -22
  118. data/vendor/assets/stylesheets/uniform/base.scss +0 -2
  119. data/vendor/assets/stylesheets/uniform/components/alert.scss +0 -27
  120. data/vendor/assets/stylesheets/uniform/components/buttons.scss +0 -212
  121. data/vendor/assets/stylesheets/uniform/components/form.scss +0 -290
  122. data/vendor/assets/stylesheets/uniform/components/grid.scss +0 -225
  123. data/vendor/assets/stylesheets/uniform/components/label.scss +0 -63
  124. data/vendor/assets/stylesheets/uniform/components/loaders.scss +0 -82
  125. data/vendor/assets/stylesheets/uniform/components/nav.scss +0 -197
  126. data/vendor/assets/stylesheets/uniform/components/row.scss +0 -92
  127. data/vendor/assets/stylesheets/uniform/components/select.scss +0 -98
  128. data/vendor/assets/stylesheets/uniform/components/table.scss +0 -83
  129. data/vendor/assets/stylesheets/uniform/components/tabs.scss +0 -45
  130. data/vendor/assets/stylesheets/uniform/components/tile.scss +0 -20
  131. data/vendor/assets/stylesheets/uniform/components/tooltip.scss +0 -46
  132. data/vendor/assets/stylesheets/uniform/helpers/colors.scss +0 -37
  133. data/vendor/assets/stylesheets/uniform/helpers/margin.scss +0 -44
  134. data/vendor/assets/stylesheets/uniform/helpers/padding.scss +0 -74
  135. data/vendor/assets/stylesheets/uniform/helpers/sizes.scss +0 -31
  136. data/vendor/assets/stylesheets/uniform/helpers.scss +0 -124
  137. data/vendor/assets/stylesheets/uniform/mixins.scss +0 -77
  138. data/vendor/assets/stylesheets/uniform/variables.scss +0 -36
  139. data/vendor/assets/stylesheets/uniform.scss +0 -9
@@ -0,0 +1,122 @@
1
+ select.uniformSelect{
2
+ display:none;
3
+ }
4
+
5
+ .uniformSelect-edit{
6
+ @include text-overflow;
7
+ position:relative;
8
+ text-align: left;
9
+ padding-right: 1.8em;
10
+ &.active{
11
+ z-index: 10000;
12
+ .uniformSelect-edit-icon{
13
+ svg{
14
+ transform: rotate(180deg);
15
+ }
16
+ }
17
+ }
18
+ .uniformSelect-edit-icon{
19
+ font-size:2em;
20
+ @include position-v-center();
21
+ right:0;
22
+ z-index:0;
23
+ line-height: 0;
24
+ svg{
25
+ fill: color('gray');
26
+ transition: transform 0.2s;
27
+ }
28
+ }
29
+ &.-invert{
30
+ background: color('gray');
31
+ color: white;
32
+ border-color: color('gray-dark');
33
+ .uniformSelect-edit-icon{
34
+ svg {
35
+ fill: white;
36
+ }
37
+ }
38
+ }
39
+ }
40
+
41
+ .uniformSelect-options{
42
+ @include text-overflow;
43
+ position: absolute;
44
+ background: white;
45
+ z-index: 9999;
46
+ box-shadow: 0 0 15px 1px rgba(black, 0.2), 0 0 2px 1px rgba(black, 0.1) ;
47
+ button{
48
+ appearance: none;
49
+ outline: none;
50
+ border: none;
51
+ background: none;
52
+ width: 100%;
53
+ padding: 0.5em;
54
+ &:hover{
55
+ background: lighten(color('blue'), 45);
56
+ }
57
+ }
58
+
59
+ .uniformSelect-options-actions{
60
+ border-top: 1px solid color('gray-light');
61
+ border-bottom: 1px solid color('gray-light');
62
+ background: color('background');
63
+ padding: 0.5em;
64
+ &:empty{
65
+ display:none;
66
+ }
67
+ }
68
+ .uniformSelect-show-all {
69
+ color: color('blue');
70
+ background: none;
71
+ &:hover{
72
+ background: none;
73
+ }
74
+ }
75
+ .uniformSelect-done{
76
+ border-radius: 0.25em;
77
+ border: 1px solid color('gray-light');
78
+ background: white;
79
+ }
80
+ }
81
+ .uniformSelect-option{
82
+ position:relative;
83
+ cursor: pointer;
84
+ &.active{
85
+ box-shadow:none;
86
+ color: color('green-dark');
87
+ padding-left: 2.5em !important;
88
+ font-weight: bold;
89
+ }
90
+ .uniformSelect-option-icon{
91
+ fill: color('green');
92
+ position: absolute;
93
+ top: 0.2em;
94
+ left: 0.2em;
95
+ font-size: 1.5em;
96
+ }
97
+ }
98
+
99
+ @include size-rule('sm'){
100
+ .uniformSelect-options{
101
+ top: 0 !important;
102
+ left: 0 !important;
103
+ min-height: 100vh;
104
+ width: 100vw;
105
+ padding: 1em;
106
+ button{
107
+ margin-bottom: 0.5em;
108
+ border: 1px solid lighten(color('gray'), 40);
109
+ &.uniformSelect-done{
110
+ margin-bottom: 0;
111
+ }
112
+ }
113
+ .uniformSelect-options-actions{
114
+ margin: 0 -1em;
115
+ }
116
+ }
117
+ body.uniformModal-hideBody{
118
+ & > *:not(.uniformSelect-options):not(.uniformDropdown-dropdown) {
119
+ position: fixed;
120
+ }
121
+ }
122
+ }
@@ -0,0 +1,127 @@
1
+ @include size-rules('.table'){
2
+ display:table;
3
+ width:100%;
4
+ & > *,
5
+ .row > *{
6
+ display:table-cell;
7
+ float:none;
8
+ &.top{
9
+ vertical-align:top;
10
+ }
11
+ &.middle > *{
12
+ vertical-align:middle;
13
+ }
14
+ }
15
+ .row{
16
+ display:table-row;
17
+ }
18
+ }
19
+
20
+ .uniformTable{
21
+ width:100%;
22
+ .row > *,
23
+ tr td,
24
+ th {
25
+ padding: 0.5em;
26
+ border-bottom: 1px solid color('gray-light');
27
+ }
28
+
29
+ &.tight{
30
+ .row > *,
31
+ tr td,
32
+ th {
33
+ padding: 0.2em 0.5em;
34
+ }
35
+ }
36
+
37
+ &.tight-more{
38
+ .row > *,
39
+ tr td,
40
+ th {
41
+ padding: 0 0.5em;
42
+ }
43
+ }
44
+
45
+ &.no-pad{
46
+ .row > *,
47
+ tr td,
48
+ th {
49
+ padding-left: 0;
50
+ padding-right: 0;
51
+ }
52
+ }
53
+
54
+ .head > *,
55
+ thead th{
56
+ color: lighten(color('gray'), 20);
57
+ border-bottom: 1px solid darken(color('gray-light'), 20) !important;
58
+ }
59
+
60
+ .head.dark > *,
61
+ thead.dark th{
62
+ background: lighten(color('background'), 2);
63
+ }
64
+
65
+ tr.middle > td,
66
+ td.middle,
67
+ &.middle > *,
68
+ .middle{
69
+ vertical-align:middle;
70
+ }
71
+
72
+ tr.top > td,
73
+ td.top,
74
+ &.top > *,
75
+ .top{
76
+ vertical-align:top;
77
+ }
78
+
79
+ &.hover{
80
+ tr:hover td{
81
+ background: lighten(color('blue'), 50);
82
+ }
83
+ }
84
+
85
+ .row:last-of-type,
86
+ tr:last-of-type{
87
+ td, th{
88
+ border-bottom: none;
89
+ }
90
+ }
91
+ &.invert{
92
+ .row > *,
93
+ td, th{
94
+ border-bottom-color: color('gray-dark');
95
+ }
96
+ }
97
+ }
98
+
99
+ .uniformTableDotLeaders{
100
+ line-height: 1;
101
+ table-layout: fixed;
102
+ td, th{
103
+ padding: 0.3em 0;
104
+ }
105
+ td{
106
+ vertical-align:bottom;
107
+ padding-left:0.5em;
108
+ }
109
+ th{
110
+ background: url("data:image/svg+xml; utf8,#{icon-circle(6, 8, 1, color('gray'))}");
111
+ background-repeat: repeat-x;
112
+ background-position: left bottom;
113
+ span{
114
+ background-color: white;
115
+ padding-right: 0.5em;
116
+ position: relative;
117
+ }
118
+ }
119
+ &.bg-background{
120
+ th{
121
+ background-image:radial-gradient(black 1px, color('background') 0px);
122
+ span{
123
+ background-color: color('background');
124
+ }
125
+ }
126
+ }
127
+ }
@@ -0,0 +1,41 @@
1
+ .uniformThumb{
2
+ display:inline-block;
3
+ background: darken(color('gray-light'), 10);
4
+ position:relative;
5
+ color: white;
6
+ .aspect-4x3{
7
+ padding-top: 75%;
8
+ }
9
+ .aspect-2x1{
10
+ padding-top: 50%;
11
+ }
12
+ .aspect-square{
13
+ padding-top:100%;
14
+ }
15
+ img{
16
+ position:absolute;
17
+ top:0;
18
+ left: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ object-fit: cover;
22
+ }
23
+ .text{
24
+ display:block;
25
+ @include position-v-center;
26
+ left: 0;
27
+ width: 100%;
28
+ text-align:center;
29
+ }
30
+ }
31
+
32
+ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
33
+ .uniformThumb {
34
+ overflow: hidden;
35
+ img {
36
+ @include position-center;
37
+ width: auto;
38
+ height: 100%;
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,63 @@
1
+ .uniformTooltip{
2
+ position:relative;
3
+ cursor: pointer;
4
+ &.active{
5
+ z-index:2;
6
+ }
7
+ }
8
+ .uniformTooltip-popup{
9
+ display:none;
10
+ position: absolute;
11
+ background: white;
12
+ border: 1px solid color('gray-light');
13
+ padding: 0.5em;
14
+ opacity: 0;
15
+ bottom: 200%;
16
+ left: -1.5em;
17
+ margin: 0.5em;
18
+ z-index: 1;
19
+ color: color('gray');
20
+ font-size:0.9em;
21
+ border-radius: 0.25em;
22
+ max-width: 30vw;
23
+ transition: left 0.2s ease-in, top 0.2s ease-in, bottom 0.2s ease-in, opacity 0.2s ease-in;
24
+ &.-reveal{
25
+ bottom: 100%;
26
+ opacity: 1;
27
+ &.-align-bottom{
28
+ top: 100%;
29
+ }
30
+ }
31
+ &.-align-bottom{
32
+ top: 200%;
33
+ bottom: auto;
34
+ .uniformTooltip-pointer{
35
+ top: -1em;
36
+ &:after{
37
+ top: 85%;
38
+ }
39
+ }
40
+ }
41
+ p:last-child{
42
+ margin-bottom: 0;
43
+ }
44
+ .uniformTooltip-pointer{
45
+ position:absolute;
46
+ top: 100%;
47
+ left: 1em;
48
+ width: 1em;
49
+ height: 1em;
50
+ overflow: hidden;
51
+ &:after{
52
+ content: "";
53
+ position: absolute;
54
+ width: 100%;
55
+ height: 100%;
56
+ background: white;
57
+ transform: rotate(-45deg);
58
+ top: -85%;
59
+ left: 0;
60
+ border: 1px solid color('gray-light');
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,11 @@
1
+ .square-icon{
2
+ display: inline-block;
3
+ height: 1em;
4
+ width: 1em;
5
+ border: 1px solid color('gray');
6
+ border-radius: 0.1em;
7
+ vertical-align:middle;
8
+ &.gray-light{
9
+ border-color: lighten(color('gray'), 40);
10
+ }
11
+ }
@@ -8,9 +8,9 @@ body{
8
8
  box-sizing: border-box;
9
9
  }
10
10
  a{
11
- color:$blue;
11
+ color: color('blue');
12
12
  &:hover{
13
- color:$blue-dark;
13
+ color: color('blue-dark');
14
14
  }
15
15
  &:visited{
16
16
  color: #6738e4;
@@ -29,6 +29,9 @@ dl,
29
29
  pre{
30
30
  margin: 0;
31
31
  margin-bottom: 1em; // might want to do rem
32
+ &:last-child{
33
+ margin-bottom: 0;
34
+ }
32
35
  }
33
36
 
34
37
  ul,
@@ -78,7 +81,7 @@ button{
78
81
 
79
82
  #{$text-inputs},
80
83
  textarea{
81
- border:1px solid lighten($gray, 40);
84
+ border:1px solid lighten(color('gray'), 40);
82
85
  }
83
86
 
84
87
  [hidden] {
@@ -91,6 +94,6 @@ time{
91
94
 
92
95
  button{
93
96
  font-family: $system-font;
94
- color: $gray;
97
+ color: color('gray');
95
98
  cursor: pointer;
96
99
  }
@@ -0,0 +1,31 @@
1
+ /// Replace `$search` with `$replace` in `$string`
2
+ /// @author Hugo Giraudel
3
+ /// @param {String} $string - Initial string
4
+ /// @param {String} $search - Substring to replace
5
+ /// @param {String} $replace ('') - New value
6
+ /// @return {String} - Updated string
7
+ @function str-replace($string, $search, $replace: '') {
8
+ $index: str-index($string, $search);
9
+
10
+ @if $index {
11
+ @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
12
+ }
13
+
14
+ @return $string;
15
+ }
16
+
17
+ @function icon-check($color: #000000){
18
+ @return '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewBox="0 0 32 32"><path d="M28.998 8.531l-2.134-2.134c-0.394-0.393-1.030-0.393-1.423 0l-12.795 12.795-6.086-6.13c-0.393-0.393-1.029-0.393-1.423 0l-2.134 2.134c-0.393 0.394-0.393 1.030 0 1.423l8.924 8.984c0.393 0.393 1.030 0.393 1.423 0l15.648-15.649c0.393-0.392 0.393-1.030 0-1.423z" fill="#{$color}"></path></svg>';
19
+ }
20
+
21
+ @function icon-x($size: 32, $color: #000000){
22
+ @return url("data:image/svg+xml; utf8,<svg version='1.2' baseProfile='tiny' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='#{$size}px' height='#{$size}px' viewBox='0 0 64 64' xml:space='preserve' fill='#{$color}'><g><rect x='-2.352' y='29.385' transform='matrix(0.7071 0.7071 -0.7071 0.7071 32.3545 -14.3899)' width='71.799' height='4.95'/></g><g><rect x='-2.374' y='29.376' transform='matrix(0.7071 -0.7071 0.7071 0.7071 -12.7023 33.0352)' width='71.799' height='4.95'/></g></svg>");
23
+ }
24
+
25
+ @function icon-circle($width: 2, $height: 2, $radius: 1, $color: #000000){
26
+ @return '<svg version="1.0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="#{$width}px" height="#{$height}px" viewBox="0 0 #{$width} #{$height}" enable-background="new 0 0 #{$width} #{$height}" xml:space="preserve"><circle cx="#{$width / 2}" cy="#{$height / 2}" r="#{$radius}" fill="#{$color}"/></svg>';
27
+ }
28
+
29
+ @function color($key) {
30
+ @return map-get($colors, $key);
31
+ }
@@ -0,0 +1,19 @@
1
+ .border{
2
+ border: 1px solid color('gray-light');
3
+ }
4
+ @include colors('.border', 'border-color'){
5
+ border-width: 1px;
6
+ border-style: solid;
7
+ }
8
+
9
+ @each $direction in 'top' 'right' 'bottom' 'left' {
10
+ @include size-rules('.border-#{$direction}'){
11
+ border-#{$direction}-color: color('gray-light') !important;
12
+ border-#{$direction}-style: solid;
13
+ border-#{$direction}-width: 1px;
14
+ }
15
+ @include colors('.border-#{$direction}', 'border-#{$direction}-color'){
16
+ border-#{$direction}-width: 1px;
17
+ border-#{$direction}-style: solid;
18
+ }
19
+ }
@@ -0,0 +1,23 @@
1
+ @each $key, $value in $colors {
2
+ .text-#{$key} { color: $value !important;}
3
+ .a-hover-#{$key} a:hover { color: $value !important;}
4
+ .hover-#{$key} :hover { color: $value !important;}
5
+ .bg-#{$key} { background-color: $value !important;}
6
+ .a-#{$key} a {
7
+ color: $value;
8
+ &:hover{
9
+ color: lighten($value, 20);
10
+ }
11
+ &:visited{
12
+ color: $value;
13
+ }
14
+ }
15
+ }
16
+
17
+ @for $i from 1 through 20 {
18
+ .opacity-#{$i * 5} { opacity: #{$i * 5 / 100.0}; }
19
+ }
20
+
21
+ .bg-none{
22
+ background: transparent;
23
+ }
@@ -0,0 +1,27 @@
1
+ //----------------------------------------------------------------
2
+ // Margin
3
+ //----------------------------------------------------------------
4
+
5
+ @include sizes('.margin', 'margin');
6
+ @include sizes('.margin-v', ('margin-top' 'margin-bottom'));
7
+ @include sizes('.margin-h', ('margin-left' 'margin-right'));
8
+ @each $direction in 'top' 'right' 'bottom' 'left' {
9
+ @include sizes('.margin-#{$direction}', 'margin-#{$direction}');
10
+ .margin-#{$direction}-nest{
11
+ margin-#{$direction}: -1em;
12
+ }
13
+ }
14
+ @include size-rules('.margin-nest'){
15
+ margin: -1em;
16
+ }
17
+ @include size-rules('.margin-v-nest'){
18
+ margin-top: -1em;
19
+ margin-bottom: -1em;
20
+ }
21
+ @include size-rules('.margin-h-nest'){
22
+ margin-left: -1em;
23
+ margin-right: -1em;
24
+ }
25
+ @include size-rules('.margin-nest-half'){
26
+ margin: -0.5em;
27
+ }
@@ -0,0 +1,9 @@
1
+ //----------------------------------------------------------------
2
+ // Pad
3
+ //----------------------------------------------------------------
4
+ @include sizes('.pad', 'padding');
5
+ @include sizes('.pad-v', ('padding-top' 'padding-bottom'));
6
+ @include sizes('.pad-h', ('padding-left' 'padding-right'));
7
+ @each $direction in 'top' 'right' 'bottom' 'left' {
8
+ @include sizes('.pad-#{$direction}', 'padding-#{$direction}');
9
+ }
@@ -0,0 +1,13 @@
1
+ .relative{ position:relative;}
2
+ .absolute{ position:absolute;}
3
+ .fixed{ position:fixed;}
4
+ .position-top{ top: 0;}
5
+ .position-left{ left: 0;}
6
+ .position-right{ right: 0;}
7
+ .position-bottom{ bottom: 0;}
8
+ .position-center{ @include position-center;}
9
+ .position-v-center{ @include position-v-center;}
10
+ .position-h-center{ @include position-h-center;}
11
+ @for $i from 1 through 100 {
12
+ .z-#{$i} { z-index: #{$i}; }
13
+ }
@@ -0,0 +1,38 @@
1
+ @for $i from 0 through 100 {
2
+ @include size-rules(".width-#{$i * 5}-px"){
3
+ width: #{$i * 5 + "px"};
4
+ }
5
+ .min-width-#{$i * 5}-px { min-width: #{$i * 5 + "px"}; }
6
+ .max-width-#{$i * 5}-px { max-width: #{$i * 5 + "px"}; }
7
+
8
+ .height-#{$i * 5}-px { height: #{$i * 5 + "px"}; }
9
+ .max-height-#{$i * 5}-px { max-height: #{$i * 5 + "px"}; }
10
+ .min-height-#{$i * 5}-px { min-height: #{$i * 5 + "px"}; }
11
+ }
12
+ @for $i from 0 through 20 {
13
+ @include size-rules(".width-#{$i * 5}-p"){
14
+ width: #{$i * 5 + "%"};
15
+ }
16
+ .width-#{$i * 5}-vw { width: #{$i * 5 +"vw"}; }
17
+
18
+ .min-width-#{$i * 5}-vh { min-width: #{$i * 5 +"vh"}; }
19
+ .min-width-#{$i * 5}-p { min-width: #{$i * 5 +"%"}; }
20
+
21
+ .max-width-#{$i * 5}-vh { max-width: #{$i * 5 +"vh"}; }
22
+ .max-width-#{$i * 5}-p { max-width: #{$i * 5 +"%"}; }
23
+
24
+ @include size-rules(".height-#{$i * 5}-vh"){
25
+ height: #{$i * 5 + "vh"};
26
+ }
27
+ .height-#{$i * 5}-p { height: #{$i * 5 +"%"}; }
28
+
29
+ .min-height-#{$i * 5}-vh { min-height: #{$i * 5 +"vh"}; }
30
+ .min-height-#{$i * 5}-p { min-height: #{$i * 5 +"%"}; }
31
+ }
32
+
33
+ .height-auto{
34
+ height: auto;
35
+ }
36
+ .width-auto{
37
+ width:auto;
38
+ }