material-sass 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. data/.gitignore +22 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +59 -0
  5. data/Rakefile +2 -0
  6. data/app/assets/fonts/FontAwesome.otf +0 -0
  7. data/app/assets/fonts/MaterialDesignIcon.eot +0 -0
  8. data/app/assets/fonts/MaterialDesignIcon.svg +767 -0
  9. data/app/assets/fonts/MaterialDesignIcon.ttf +0 -0
  10. data/app/assets/fonts/MaterialDesignIcon.woff +0 -0
  11. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  12. data/app/assets/fonts/fontawesome-webfont.svg +565 -0
  13. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  14. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  15. data/app/assets/fonts/fontawesome-webfont.woff2 +0 -0
  16. data/app/assets/javascripts/material-sprockets.js +1 -0
  17. data/app/assets/javascripts/material.js +403 -0
  18. data/app/assets/javascripts/material/_.js +11 -0
  19. data/app/assets/javascripts/material/btn.js +11 -0
  20. data/app/assets/javascripts/material/content.js +45 -0
  21. data/app/assets/javascripts/material/datepicker.js +21 -0
  22. data/app/assets/javascripts/material/dropdown.js +15 -0
  23. data/app/assets/javascripts/material/esc.js +10 -0
  24. data/app/assets/javascripts/material/footer.js +4 -0
  25. data/app/assets/javascripts/material/form-adv.js +65 -0
  26. data/app/assets/javascripts/material/header.js +17 -0
  27. data/app/assets/javascripts/material/menu.js +39 -0
  28. data/app/assets/javascripts/material/sortable.js +10 -0
  29. data/app/assets/javascripts/material/tab.js +31 -0
  30. data/app/assets/javascripts/material/tile.js +43 -0
  31. data/app/assets/javascripts/material/toast.js +68 -0
  32. data/app/assets/javascripts/material/winresize.js +13 -0
  33. data/app/assets/stylesheets/material.scss +3 -0
  34. data/app/assets/stylesheets/material/_addon.scss +2 -0
  35. data/app/assets/stylesheets/material/_code.scss +54 -0
  36. data/app/assets/stylesheets/material/_element.scss +15 -0
  37. data/app/assets/stylesheets/material/_grid.scss +83 -0
  38. data/app/assets/stylesheets/material/_mixin.scss +4 -0
  39. data/app/assets/stylesheets/material/_reset.scss +403 -0
  40. data/app/assets/stylesheets/material/_theme.scss +4 -0
  41. data/app/assets/stylesheets/material/_utilitise.scss +252 -0
  42. data/app/assets/stylesheets/material/_variable-color.scss +6 -0
  43. data/app/assets/stylesheets/material/_variable.scss +116 -0
  44. data/app/assets/stylesheets/material/addon/_font-awesome.scss +18 -0
  45. data/app/assets/stylesheets/material/addon/_material-design-icon.scss +3053 -0
  46. data/app/assets/stylesheets/material/addon/font-awesome/_animated.scss +33 -0
  47. data/app/assets/stylesheets/material/addon/font-awesome/_bordered-pulled.scss +11 -0
  48. data/app/assets/stylesheets/material/addon/font-awesome/_core.scss +10 -0
  49. data/app/assets/stylesheets/material/addon/font-awesome/_fixed-width.scss +5 -0
  50. data/app/assets/stylesheets/material/addon/font-awesome/_flipped-rotated.scss +29 -0
  51. data/app/assets/stylesheets/material/addon/font-awesome/_icon.scss +593 -0
  52. data/app/assets/stylesheets/material/addon/font-awesome/_icons.scss +593 -0
  53. data/app/assets/stylesheets/material/addon/font-awesome/_larger.scss +22 -0
  54. data/app/assets/stylesheets/material/addon/font-awesome/_list.scss +21 -0
  55. data/app/assets/stylesheets/material/addon/font-awesome/_mixins.scss +25 -0
  56. data/app/assets/stylesheets/material/addon/font-awesome/_path.scss +12 -0
  57. data/app/assets/stylesheets/material/addon/font-awesome/_stacked.scss +29 -0
  58. data/app/assets/stylesheets/material/addon/font-awesome/_variable.scss +601 -0
  59. data/app/assets/stylesheets/material/addon/font-awesome/_variables.scss +602 -0
  60. data/app/assets/stylesheets/material/base.scss +16 -0
  61. data/app/assets/stylesheets/material/element/_avatar.scss +63 -0
  62. data/app/assets/stylesheets/material/element/_button-float.scss +145 -0
  63. data/app/assets/stylesheets/material/element/_button.scss +131 -0
  64. data/app/assets/stylesheets/material/element/_card.scss +203 -0
  65. data/app/assets/stylesheets/material/element/_dropdown.scss +116 -0
  66. data/app/assets/stylesheets/material/element/_form-adv-datepicker.scss +265 -0
  67. data/app/assets/stylesheets/material/element/_form-adv.scss +277 -0
  68. data/app/assets/stylesheets/material/element/_form.scss +226 -0
  69. data/app/assets/stylesheets/material/element/_modal.scss +121 -0
  70. data/app/assets/stylesheets/material/element/_nav.scss +40 -0
  71. data/app/assets/stylesheets/material/element/_sortable.scss +8 -0
  72. data/app/assets/stylesheets/material/element/_tab.scss +71 -0
  73. data/app/assets/stylesheets/material/element/_table.scss +77 -0
  74. data/app/assets/stylesheets/material/element/_tile.scss +154 -0
  75. data/app/assets/stylesheets/material/element/_toast.scss +61 -0
  76. data/app/assets/stylesheets/material/mixin/_css3.scss +52 -0
  77. data/app/assets/stylesheets/material/mixin/_grid.scss +82 -0
  78. data/app/assets/stylesheets/material/mixin/_responsive.scss +32 -0
  79. data/app/assets/stylesheets/material/mixin/_utilitise.scss +35 -0
  80. data/app/assets/stylesheets/material/project.scss +2 -0
  81. data/app/assets/stylesheets/material/theme/_content.scss +79 -0
  82. data/app/assets/stylesheets/material/theme/_footer.scss +23 -0
  83. data/app/assets/stylesheets/material/theme/_header.scss +103 -0
  84. data/app/assets/stylesheets/material/theme/_menu.scss +221 -0
  85. data/lib/material-sass.rb +26 -0
  86. data/lib/material-sass/engine.rb +12 -0
  87. data/lib/material-sass/version.rb +5 -0
  88. data/material-sass.gemspec +23 -0
  89. metadata +166 -0
@@ -0,0 +1,77 @@
1
+ .table {
2
+ margin-top: $line-height;
3
+ margin-bottom: $line-height;
4
+ width: 100%;
5
+ td,
6
+ th {
7
+ line-height: $line-height;
8
+ padding: (($cell-height - $line-height) / 2) $grid-gutter (($cell-height - $line-height) / 2 - 1);
9
+ vertical-align: top;
10
+ &.nowrap {
11
+ white-space: nowrap;
12
+ width: 1%;
13
+ }
14
+ }
15
+ > thead > td,
16
+ > thead > th {
17
+ vertical-align: bottom;
18
+ }
19
+ }
20
+
21
+ .table-bordered {
22
+ td,
23
+ th {
24
+ border-top: 1px solid $black-hint;
25
+ }
26
+ > tbody > tr {
27
+ &:nth-child(odd) {
28
+ > td,
29
+ > th {
30
+ background-color: $white-bg;
31
+ }
32
+ }
33
+ }
34
+ > thead > tr {
35
+ > td,
36
+ > th {
37
+ border-bottom: 2px solid $black-hint;
38
+ }
39
+ }
40
+ > thead:first-child > tr:first-child {
41
+ > td,
42
+ > th {
43
+ border-top: 0;
44
+ }
45
+ }
46
+ }
47
+
48
+ .table-simple {
49
+ td,
50
+ th {
51
+ padding-top: 0;
52
+ padding-right: 0;
53
+ padding-bottom: 0;
54
+ vertical-align: top;
55
+ &:first-child {
56
+ padding-left: 0;
57
+ }
58
+ &.nowrap .tag-block {
59
+ margin-top: 2px;
60
+ }
61
+ }
62
+ }
63
+
64
+ // responsive
65
+ .table-responsive {
66
+ margin-top: $line-height;
67
+ margin-bottom: $line-height;
68
+ min-height: 0.01%;
69
+ overflow-x: auto;
70
+ overflow-y: hidden;
71
+ -webkit-overflow-scrolling: touch;
72
+ -ms-overflow-style: -ms-autohiding-scrollbar;
73
+ .table {
74
+ margin-top: 0;
75
+ margin-bottom: 0;
76
+ }
77
+ }
@@ -0,0 +1,154 @@
1
+ .tile {
2
+ background-color: $white;
3
+ display: block;
4
+ position: relative;
5
+ @include box-shadow(0 0 1px rgba(0, 0, 0, 0.5));
6
+ @include clearfix();
7
+ &[href] {
8
+ color: $black-text;
9
+ &:focus,
10
+ &:hover {
11
+ color: $link-color;
12
+ text-decoration: none;
13
+ }
14
+ }
15
+ &.active {
16
+ margin-top: $line-height;
17
+ margin-bottom: $line-height;
18
+ }
19
+ }
20
+
21
+ // action
22
+ .tile-action {
23
+ float: right;
24
+ @include clearfix();
25
+ @include user-select(none);
26
+ .no-touch &,
27
+ .touch .tile-collapse & {
28
+ display: none;
29
+ }
30
+ .no-touch .tile:hover &,
31
+ .tile-collapse.active & {
32
+ display: block;
33
+ }
34
+ .nav {
35
+ margin-top: 0;
36
+ margin-bottom: 0;
37
+ > li {
38
+ > a {
39
+ color: $black-sec;
40
+ z-index: 1;
41
+ &:focus,
42
+ &:hover {
43
+ color: $link-color;
44
+ }
45
+ }
46
+ &.active > a,
47
+ &.open > a {
48
+ color: $link-color;
49
+ }
50
+ }
51
+ }
52
+ }
53
+
54
+ // collapse
55
+ .tile-active-show {
56
+ @include transition(height 0.15s linear);
57
+ }
58
+
59
+ .tile-collapse {
60
+ @include transition(margin 0.15s linear);
61
+ &.active, {
62
+ margin-right: ($grid-gutter * -1 + 1);
63
+ margin-left: ($grid-gutter * -1 + 1);
64
+ }
65
+ }
66
+
67
+ .tile-collapse-full {
68
+ // 1056 - 1439
69
+ @media only screen and (min-width: ($grid-gutter * 4 + $screen-md)) and (max-width: ($screen-lg - 1)) {
70
+ &.active {
71
+ margin-right: ($grid-gutter * -4 + 1);
72
+ margin-left: ($grid-gutter * -4 + 1);
73
+ }
74
+ }
75
+ // 1504
76
+ @media only screen and (min-width: ($grid-gutter * 4 + $screen-lg)) {
77
+ &.active {
78
+ margin-right: ($grid-gutter * -4 + 1);
79
+ margin-left: ($grid-gutter * -4 + 1);
80
+ }
81
+ }
82
+ }
83
+
84
+ // content
85
+ .tile-inner {
86
+ padding: ($line-height / 2) $grid-gutter;
87
+ position: relative;
88
+ .tile-side ~ & {
89
+ overflow: hidden;
90
+ }
91
+ }
92
+
93
+ .tile-side {
94
+ padding-top: ($line-height / 2);
95
+ padding-bottom: ($line-height / 2);
96
+ &.pull-left {
97
+ padding-left: $grid-gutter;
98
+ }
99
+ &.pull-right {
100
+ padding-right: $grid-gutter;
101
+ }
102
+ }
103
+
104
+ .tile-sub {
105
+ display: inline-block;
106
+ padding-right: $grid-gutter;
107
+ padding-left: $grid-gutter;
108
+ position: relative;
109
+ width: 100%;
110
+ &:before {
111
+ border-top: 1px solid $black-bg;
112
+ content: '';
113
+ display: block;
114
+ position: absolute;
115
+ top: 0;
116
+ left: 0;
117
+ width: 100%;
118
+ }
119
+ }
120
+
121
+ // footer
122
+ .tile-footer {
123
+ background-color: $white-bg;
124
+ position: relative;
125
+ @include clearfix();
126
+ &:before {
127
+ border-top: 1px solid $black-bg;
128
+ content: '';
129
+ display: block;
130
+ position: absolute;
131
+ top: 0;
132
+ left: 0;
133
+ width: 100%;
134
+ }
135
+ &:first-child {
136
+ border-top: 0;
137
+ }
138
+ .nav {
139
+ margin-top: 0;
140
+ margin-bottom: 0;
141
+ }
142
+ }
143
+
144
+ // misc
145
+ .tile-toggle {
146
+ cursor: pointer;
147
+ @include clearfix();
148
+ }
149
+
150
+ .tile-wrap {
151
+ margin-top: $line-height;
152
+ margin-bottom: $line-height;
153
+ position: relative;
154
+ }
@@ -0,0 +1,61 @@
1
+ .toast {
2
+ position: fixed;
3
+ right: 0;
4
+ bottom: 0;
5
+ left: 0;
6
+ z-index: ($top-base + 1);
7
+ .tooltip {
8
+ position: static !important;
9
+ }
10
+ // 768
11
+ @include responsive(sm) {
12
+ margin-right: ($grid-gutter * 2 + $line-height * 2);
13
+ // position
14
+ right: auto;
15
+ bottom: $line-height;
16
+ left: $grid-gutter !important;
17
+ }
18
+ }
19
+
20
+ .toast-inner {
21
+ background-color: $black-text;
22
+ color: $white;
23
+ font-size: floor($font-size * 0.9);
24
+ padding: ($line-height / 2) $grid-gutter;
25
+ @include box-shadow(0 1px 10px rgba(0, 0, 0, 0.5));
26
+ @include clearfix();
27
+ @include transform(translate3d(0, 200%, 0));
28
+ @include transition(transform 0.3s $timing);
29
+ .toast-show & {
30
+ @include transform(translate3d(0, 0, 0));
31
+ }
32
+ // 768
33
+ @include responsive(sm) {
34
+ border-radius: 2px;
35
+ float: left;
36
+ }
37
+ }
38
+
39
+ // action
40
+ [data-dismiss="toast"] {
41
+ cursor: pointer;
42
+ float: right;
43
+ font-weight: 700;
44
+ margin-left: $grid-gutter;
45
+ text-transform: uppercase;
46
+ }
47
+
48
+ .toast a {
49
+ color: lighten($link-color, 30%);
50
+ cursor: pointer;
51
+ &:focus,
52
+ &:hover {
53
+ color: lighten($link-color, 15%);
54
+ text-decoration: none;
55
+ }
56
+ }
57
+
58
+ // text
59
+ .toast-text {
60
+ overflow: hidden;
61
+ }
@@ -0,0 +1,52 @@
1
+ @mixin animation($animation...) {
2
+ -webkit-animation: $animation;
3
+ animation: $animation;
4
+ }
5
+
6
+ @mixin box-shadow($shadow...) {
7
+ -webkit-box-shadow: $shadow;
8
+ box-shadow: $shadow;
9
+ }
10
+
11
+ @mixin box-sizing($sizing) {
12
+ -webkit-box-sizing: $sizing;
13
+ -moz-box-sizing: $sizing;
14
+ box-sizing: $sizing;
15
+ }
16
+
17
+ @mixin opacity($alpha) {
18
+ opacity: $alpha;
19
+ $alpha-ie: ($alpha * 100);
20
+ filter: #{alpha(opacity=$alpha-ie)};
21
+ }
22
+
23
+ @mixin placeholder($color) {
24
+ &:-ms-input-placeholder {
25
+ color: $color;
26
+ }
27
+ &::-moz-placeholder {
28
+ color: $color;
29
+ opacity: 1;
30
+ }
31
+ &::-webkit-input-placeholder {
32
+ color: $color;
33
+ }
34
+ }
35
+
36
+ @mixin transform($transform...) {
37
+ -webkit-transform: $transform;
38
+ -ms-transform: $transform;
39
+ transform: $transform;
40
+ }
41
+
42
+ @mixin transition($transition...) {
43
+ -webkit-transition: $transition;
44
+ transition: $transition;
45
+ }
46
+
47
+ @mixin user-select($select) {
48
+ -webkit-user-select: $select;
49
+ -moz-user-select: $select;
50
+ -ms-user-select: $select;
51
+ user-select: $select;
52
+ }
@@ -0,0 +1,82 @@
1
+ // col
2
+ @mixin calc-col($index, $class, $type) {
3
+ @if ($type == colwidth) and ($index > 0) {
4
+ .col-#{$class}-#{$index} {
5
+ width: percentage(($index / $grid-cols));
6
+ }
7
+ }
8
+ @if ($type == offset) {
9
+ .col-#{$class}-offset-#{$index} {
10
+ margin-left: percentage(($index / $grid-cols));
11
+ }
12
+ }
13
+ @if ($type == pull) {
14
+ .col-#{$class}-pull-#{$index} {
15
+ right: percentage(($index / $grid-cols));
16
+ }
17
+ }
18
+ @if ($type == push) {
19
+ .col-#{$class}-push-#{$index} {
20
+ left: percentage(($index / $grid-cols));
21
+ }
22
+ }
23
+ }
24
+ @mixin float-col($class) {
25
+ $i: 1;
26
+ $list: '';
27
+ $list: ".col-#{$class}-#{$i}";
28
+ @for $i from (1 + 1) through $grid-cols {
29
+ $list: "#{$list}, .col-#{$class}-#{$i}";
30
+ }
31
+ #{$list} {
32
+ float: left;
33
+ }
34
+ }
35
+ @mixin loop-col($columns, $class, $type) {
36
+ @for $i from 0 through $columns {
37
+ @include calc-col($i, $class, $type);
38
+ }
39
+ }
40
+ @mixin make-col() {
41
+ $i: 1;
42
+ $list: '';
43
+ $list: ".col-xx-#{$i}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
44
+ @for $i from (1 + 1) through $grid-cols {
45
+ $list: "#{$list}, .col-xx-#{$i}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
46
+ }
47
+ #{$list} {
48
+ min-height: 1px;
49
+ position: relative;
50
+ padding-left: $grid-gutter;
51
+ padding-right: $grid-gutter;
52
+ }
53
+ }
54
+ @mixin make-grid($class) {
55
+ @include float-col($class);
56
+ @include loop-col($grid-cols, $class, colwidth);
57
+ @include loop-col($grid-cols, $class, offset);
58
+ @include loop-col($grid-cols, $class, pull);
59
+ @include loop-col($grid-cols, $class, push);
60
+ }
61
+
62
+ // container and row
63
+ @mixin make-container() {
64
+ margin-right: auto;
65
+ margin-left: auto;
66
+ padding-right: $grid-gutter;
67
+ padding-left: $grid-gutter;
68
+ @include clearfix();
69
+ // 992
70
+ @include responsive(md) {
71
+ width: ($screen-md - $grid-gutter * 2);
72
+ }
73
+ // 1440
74
+ @include responsive(lg) {
75
+ width: ($screen-lg - $grid-gutter * 2);
76
+ }
77
+ }
78
+ @mixin make-row() {
79
+ margin-right: ($grid-gutter * -1);
80
+ margin-left: ($grid-gutter * -1);
81
+ @include clearfix();
82
+ }
@@ -0,0 +1,32 @@
1
+ @mixin responsive($screen-size) {
2
+ // 480
3
+ @if $screen-size == xs {
4
+ @media only screen and (min-width: $screen-xs) {
5
+ @content;
6
+ }
7
+ }
8
+ // 768
9
+ @else if $screen-size == sm {
10
+ @media only screen and (min-width: $screen-sm) {
11
+ @content;
12
+ }
13
+ }
14
+ // 992
15
+ @else if $screen-size == md {
16
+ @media only screen and (min-width: $screen-md) {
17
+ @content;
18
+ }
19
+ }
20
+ // 1440
21
+ @else if $screen-size == lg {
22
+ @media only screen and (min-width: $screen-lg) {
23
+ @content;
24
+ }
25
+ }
26
+ // customised break point
27
+ @else {
28
+ @media only screen and ($screen-size) {
29
+ @content;
30
+ }
31
+ }
32
+ }