spectre_scss 0.3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +5 -0
  5. data/Gemfile +6 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +48 -0
  8. data/Rakefile +34 -0
  9. data/bin/console +7 -0
  10. data/bin/setup +6 -0
  11. data/lib/spectre_scss.rb +5 -0
  12. data/lib/spectre_scss/engine.rb +4 -0
  13. data/lib/spectre_scss/version.rb +3 -0
  14. data/spectre_scss.gemspec +26 -0
  15. data/vendor/assets/stylesheets/spectre.scss +1 -0
  16. data/vendor/assets/stylesheets/spectre/spectre-exp.scss +16 -0
  17. data/vendor/assets/stylesheets/spectre/spectre-icons.scss +8 -0
  18. data/vendor/assets/stylesheets/spectre/spectre.scss +50 -0
  19. data/vendor/assets/stylesheets/spectre/src/_accordions.scss +34 -0
  20. data/vendor/assets/stylesheets/spectre/src/_animations.scss +20 -0
  21. data/vendor/assets/stylesheets/spectre/src/_asian.scss +33 -0
  22. data/vendor/assets/stylesheets/spectre/src/_autocomplete.scss +41 -0
  23. data/vendor/assets/stylesheets/spectre/src/_avatars.scss +77 -0
  24. data/vendor/assets/stylesheets/spectre/src/_badges.scss +70 -0
  25. data/vendor/assets/stylesheets/spectre/src/_bars.scss +71 -0
  26. data/vendor/assets/stylesheets/spectre/src/_base.scss +40 -0
  27. data/vendor/assets/stylesheets/spectre/src/_breadcrumbs.scss +29 -0
  28. data/vendor/assets/stylesheets/spectre/src/_buttons.scss +182 -0
  29. data/vendor/assets/stylesheets/spectre/src/_calendars.scss +206 -0
  30. data/vendor/assets/stylesheets/spectre/src/_cards.scss +39 -0
  31. data/vendor/assets/stylesheets/spectre/src/_carousels.scss +124 -0
  32. data/vendor/assets/stylesheets/spectre/src/_chips.scss +24 -0
  33. data/vendor/assets/stylesheets/spectre/src/_codes.scss +32 -0
  34. data/vendor/assets/stylesheets/spectre/src/_comparison-sliders.scss +114 -0
  35. data/vendor/assets/stylesheets/spectre/src/_dropdowns.scss +36 -0
  36. data/vendor/assets/stylesheets/spectre/src/_empty.scss +21 -0
  37. data/vendor/assets/stylesheets/spectre/src/_filters.scss +29 -0
  38. data/vendor/assets/stylesheets/spectre/src/_forms.scss +514 -0
  39. data/vendor/assets/stylesheets/spectre/src/_icons.scss +656 -0
  40. data/vendor/assets/stylesheets/spectre/src/_labels.scss +33 -0
  41. data/vendor/assets/stylesheets/spectre/src/_layout.scss +422 -0
  42. data/vendor/assets/stylesheets/spectre/src/_media.scss +70 -0
  43. data/vendor/assets/stylesheets/spectre/src/_menus.scss +56 -0
  44. data/vendor/assets/stylesheets/spectre/src/_meters.scss +57 -0
  45. data/vendor/assets/stylesheets/spectre/src/_mixins.scss +185 -0
  46. data/vendor/assets/stylesheets/spectre/src/_modals.scss +73 -0
  47. data/vendor/assets/stylesheets/spectre/src/_navbar.scss +29 -0
  48. data/vendor/assets/stylesheets/spectre/src/_navigation.scss +13 -0
  49. data/vendor/assets/stylesheets/spectre/src/_navs.scss +34 -0
  50. data/vendor/assets/stylesheets/spectre/src/_normalize.scss +437 -0
  51. data/vendor/assets/stylesheets/spectre/src/_pagination.scss +61 -0
  52. data/vendor/assets/stylesheets/spectre/src/_panels.scss +23 -0
  53. data/vendor/assets/stylesheets/spectre/src/_parallax.scss +131 -0
  54. data/vendor/assets/stylesheets/spectre/src/_popovers.scss +70 -0
  55. data/vendor/assets/stylesheets/spectre/src/_progress.scss +45 -0
  56. data/vendor/assets/stylesheets/spectre/src/_sliders.scss +93 -0
  57. data/vendor/assets/stylesheets/spectre/src/_steps.scss +70 -0
  58. data/vendor/assets/stylesheets/spectre/src/_tables.scss +45 -0
  59. data/vendor/assets/stylesheets/spectre/src/_tabs.scss +62 -0
  60. data/vendor/assets/stylesheets/spectre/src/_tiles.scss +38 -0
  61. data/vendor/assets/stylesheets/spectre/src/_timelines.scss +55 -0
  62. data/vendor/assets/stylesheets/spectre/src/_toasts.scss +41 -0
  63. data/vendor/assets/stylesheets/spectre/src/_tooltips.scss +77 -0
  64. data/vendor/assets/stylesheets/spectre/src/_typography.scss +127 -0
  65. data/vendor/assets/stylesheets/spectre/src/_utilities.scss +7 -0
  66. data/vendor/assets/stylesheets/spectre/src/_variables.scss +105 -0
  67. data/vendor/assets/stylesheets/spectre/src/utilities/_colors.scss +45 -0
  68. data/vendor/assets/stylesheets/spectre/src/utilities/_display.scss +47 -0
  69. data/vendor/assets/stylesheets/spectre/src/utilities/_divider.scss +50 -0
  70. data/vendor/assets/stylesheets/spectre/src/utilities/_loading.scss +34 -0
  71. data/vendor/assets/stylesheets/spectre/src/utilities/_position.scss +35 -0
  72. data/vendor/assets/stylesheets/spectre/src/utilities/_shapes.scss +7 -0
  73. data/vendor/assets/stylesheets/spectre/src/utilities/_text.scss +52 -0
  74. metadata +157 -0
@@ -0,0 +1,61 @@
1
+ // Pagination
2
+ .pagination {
3
+ display: flex;
4
+ list-style: none;
5
+ margin: $unit-1 0;
6
+ padding: $unit-1 0;
7
+
8
+ .page-item {
9
+ margin: $unit-1 $unit-o;
10
+
11
+ span {
12
+ display: inline-block;
13
+ padding: $unit-1 $unit-1;
14
+ }
15
+
16
+ a {
17
+ border-radius: $border-radius;
18
+ color: $gray-color-dark;
19
+ display: inline-block;
20
+ padding: $unit-1 $unit-2;
21
+ text-decoration: none;
22
+ &:focus,
23
+ &:hover {
24
+ color: $primary-color;
25
+ }
26
+ }
27
+
28
+ &.disabled {
29
+ a {
30
+ cursor: default;
31
+ opacity: .5;
32
+ pointer-events: none;
33
+ }
34
+ }
35
+
36
+ &.active {
37
+ a {
38
+ background: $primary-color;
39
+ color: $light-color;
40
+ }
41
+ }
42
+
43
+ &.page-prev,
44
+ &.page-next {
45
+ flex: 1 0 50%;
46
+ }
47
+
48
+ &.page-next {
49
+ text-align: right;
50
+ }
51
+
52
+ .page-item-title {
53
+ margin: 0;
54
+ }
55
+
56
+ .page-item-subtitle {
57
+ margin: 0;
58
+ opacity: .5;
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,23 @@
1
+ // Panels
2
+ .panel {
3
+ border: $border-width solid $border-color;
4
+ border-radius: $border-radius;
5
+ display: flex;
6
+ flex-direction: column;
7
+
8
+ .panel-header,
9
+ .panel-footer {
10
+ flex: 0 0 auto;
11
+ padding: $layout-spacing-lg;
12
+ }
13
+
14
+ .panel-nav {
15
+ flex: 0 0 auto;
16
+ }
17
+
18
+ .panel-body {
19
+ flex: 1 1 auto;
20
+ overflow-y: auto;
21
+ padding: 0 $layout-spacing-lg;
22
+ }
23
+ }
@@ -0,0 +1,131 @@
1
+ // Parallax
2
+ $parallax-deg: 3deg;
3
+ $parallax-offset: 6.5px;
4
+ $parallax-offset-z: 100px;
5
+ $parallax-perspective: 1000px;
6
+ $parallax-scale: 1 - unit-less($parallax-offset-z / $parallax-perspective);
7
+
8
+ // Mixin: Parallax direction
9
+ @mixin parallax-dir() {
10
+ height: 50%;
11
+ position: absolute;
12
+ width: 50%;
13
+ z-index: $zindex-3;
14
+ }
15
+
16
+ .parallax {
17
+ display: block;
18
+ height: auto;
19
+ position: relative;
20
+ width: auto;
21
+
22
+ .parallax-content {
23
+ height: auto;
24
+ @include shadow-variant(1rem);
25
+ transform: perspective($parallax-perspective);
26
+ transform-style: preserve-3d;
27
+ transition: all .4s ease;
28
+ width: 100%;
29
+
30
+ &::before {
31
+ content: "";
32
+ display: block;
33
+ height: 100%;
34
+ left: 0;
35
+ position: absolute;
36
+ top: 0;
37
+ width: 100%;
38
+ }
39
+ }
40
+
41
+ .parallax-front {
42
+ align-items: center;
43
+ color: $light-color;
44
+ display: flex;
45
+ height: 100%;
46
+ justify-content: center;
47
+ left: 0;
48
+ position: absolute;
49
+ text-align: center;
50
+ text-shadow: 0 0 20px rgba($dark-color, .5);
51
+ top: 0;
52
+ transform: translateZ($parallax-offset-z) scale($parallax-scale);
53
+ transition: all .4s ease;
54
+ width: 100%;
55
+ z-index: $zindex-0;
56
+ }
57
+
58
+ .parallax-top-left {
59
+ @include parallax-dir();
60
+ left: 0;
61
+ top: 0;
62
+
63
+ &:hover ~ .parallax-content {
64
+ transform: perspective($parallax-perspective) rotateX(-$parallax-deg) rotateY($parallax-deg);
65
+
66
+ &::before {
67
+ background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 50%);
68
+ }
69
+
70
+ .parallax-front {
71
+ transform: translate3d(-$parallax-offset, -$parallax-offset, $parallax-offset-z) scale($parallax-scale);
72
+ }
73
+ }
74
+ }
75
+
76
+ .parallax-top-right {
77
+ @include parallax-dir();
78
+ right: 0;
79
+ top: 0;
80
+
81
+ &:hover ~ .parallax-content {
82
+ transform: perspective($parallax-perspective) rotateX(-$parallax-deg) rotateY(-$parallax-deg);
83
+
84
+ &::before {
85
+ background: linear-gradient(-135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 50%);
86
+ }
87
+
88
+ .parallax-front {
89
+ transform: translate3d($parallax-offset, -$parallax-offset, $parallax-offset-z) scale($parallax-scale);
90
+ }
91
+ }
92
+ }
93
+
94
+ .parallax-bottom-left {
95
+ @include parallax-dir();
96
+ bottom: 0;
97
+ left: 0;
98
+
99
+ &:hover ~ .parallax-content {
100
+ transform: perspective($parallax-perspective) rotateX($parallax-deg) rotateY($parallax-deg);
101
+
102
+ &::before {
103
+ background: linear-gradient(45deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 50%);
104
+ }
105
+
106
+ .parallax-front {
107
+ transform: translate3d(-$parallax-offset, $parallax-offset, $parallax-offset-z) scale($parallax-scale);
108
+ }
109
+ }
110
+ }
111
+
112
+ .parallax-bottom-right {
113
+ @include parallax-dir();
114
+ bottom: 0;
115
+ right: 0;
116
+
117
+ &:hover ~ .parallax-content {
118
+ transform: perspective($parallax-perspective) rotateX($parallax-deg) rotateY(-$parallax-deg);
119
+
120
+ &::before {
121
+ background: linear-gradient(-45deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 50%);
122
+ }
123
+
124
+ .parallax-front {
125
+ transform: translate3d($parallax-offset, $parallax-offset, $parallax-offset-z) scale($parallax-scale);
126
+ }
127
+ }
128
+ }
129
+ }
130
+
131
+
@@ -0,0 +1,70 @@
1
+ // Popovers
2
+ .popover {
3
+ display: inline-block;
4
+ position: relative;
5
+
6
+ .popover-container {
7
+ content: attr(data-tooltip);
8
+ opacity: 0;
9
+ left: 50%;
10
+ padding: $layout-spacing;
11
+ position: absolute;
12
+ top: 0;
13
+ transform: translate(-50%, -50%) scale(0);
14
+ transition: transform .2s ease;
15
+ width: $control-max-width;
16
+ z-index: $zindex-4;
17
+ }
18
+
19
+ :focus + .popover-container,
20
+ &:hover .popover-container,
21
+ .popover-container:hover {
22
+ display: block;
23
+ opacity: 1;
24
+ transform: translate(-50%, -100%) scale(1);
25
+ }
26
+
27
+ &.popover-right {
28
+ .popover-container {
29
+ left: 100%;
30
+ top: 50%;
31
+ }
32
+
33
+ :focus + .popover-container,
34
+ &:hover .popover-container,
35
+ .popover-container:hover {
36
+ transform: translate(0, -50%) scale(1);
37
+ }
38
+ }
39
+
40
+ &.popover-bottom {
41
+ .popover-container {
42
+ left: 50%;
43
+ top: 100%;
44
+ }
45
+
46
+ :focus + .popover-container,
47
+ &:hover .popover-container,
48
+ .popover-container:hover {
49
+ transform: translate(-50%, 0) scale(1);
50
+ }
51
+ }
52
+
53
+ &.popover-left {
54
+ .popover-container {
55
+ left: 0;
56
+ top: 50%;
57
+ }
58
+
59
+ :focus + .popover-container,
60
+ &:hover .popover-container,
61
+ .popover-container:hover {
62
+ transform: translate(-100%, -50%) scale(1);
63
+ }
64
+ }
65
+
66
+ .card {
67
+ border: 0;
68
+ @include shadow-variant(.2rem);
69
+ }
70
+ }
@@ -0,0 +1,45 @@
1
+ // Progress
2
+ // Credit: https://css-tricks.com/html5-progress-element/
3
+ .progress {
4
+ appearance: none;
5
+ background: $bg-color-dark;
6
+ border: 0;
7
+ border-radius: $border-radius;
8
+ color: $primary-color;
9
+ height: $unit-1;
10
+ position: relative;
11
+ width: 100%;
12
+
13
+ &::-webkit-progress-bar {
14
+ background: transparent;
15
+ border-radius: $border-radius;
16
+ }
17
+
18
+ &::-webkit-progress-value {
19
+ background: $primary-color;
20
+ border-radius: $border-radius;
21
+ }
22
+
23
+ &::-moz-progress-bar {
24
+ background: $primary-color;
25
+ border-radius: $border-radius;
26
+ }
27
+
28
+ &:indeterminate {
29
+ animation: progress-indeterminate 1.5s linear infinite;
30
+ background: $bg-color-dark linear-gradient(to right, $primary-color 30%, $bg-color-dark 30%) top left / 150% 150% no-repeat;
31
+
32
+ &::-moz-progress-bar {
33
+ background: transparent;
34
+ }
35
+ }
36
+ }
37
+
38
+ @keyframes progress-indeterminate {
39
+ 0% {
40
+ background-position: 200% 0;
41
+ }
42
+ 100% {
43
+ background-position: -200% 0;
44
+ }
45
+ }
@@ -0,0 +1,93 @@
1
+ // Sliders
2
+ // Credit: https://css-tricks.com/styling-cross-browser-compatible-range-inputs-css/
3
+ .slider {
4
+ appearance: none;
5
+ background: transparent;
6
+ display: block;
7
+ width: 100%;
8
+ height: $unit-6;
9
+
10
+ &:focus {
11
+ @include control-shadow();
12
+ outline: none;
13
+ }
14
+
15
+ // Slider Thumb
16
+ &::-webkit-slider-thumb {
17
+ -webkit-appearance: none;
18
+ background: $primary-color;
19
+ border: 0;
20
+ border-radius: 50%;
21
+ height: $unit-3;
22
+ margin-top: -($unit-3 - $unit-h) / 2 ;
23
+ transition: transform .2s ease;
24
+ width: $unit-3;
25
+ }
26
+ &::-moz-range-thumb {
27
+ background: $primary-color;
28
+ border: 0;
29
+ border-radius: 50%;
30
+ height: $unit-3;
31
+ transition: transform .2s ease;
32
+ width: $unit-3;
33
+ }
34
+ &::-ms-thumb {
35
+ background: $primary-color;
36
+ border: 0;
37
+ border-radius: 50%;
38
+ height: $unit-3;
39
+ transition: transform .2s ease;
40
+ width: $unit-3;
41
+ }
42
+
43
+ &:active {
44
+ &::-webkit-slider-thumb {
45
+ transform: scale(1.25);
46
+ }
47
+ &::-moz-range-thumb {
48
+ transform: scale(1.25);
49
+ }
50
+ &::-ms-thumb {
51
+ transform: scale(1.25);
52
+ }
53
+ }
54
+
55
+ &:disabled,
56
+ &.disabled {
57
+ &::-webkit-slider-thumb {
58
+ background: $gray-color-light;
59
+ transform: scale(1);
60
+ }
61
+ &::-moz-range-thumb {
62
+ background: $gray-color-light;
63
+ transform: scale(1);
64
+ }
65
+ &::-ms-thumb {
66
+ background: $gray-color-light;
67
+ transform: scale(1);
68
+ }
69
+ }
70
+
71
+ // Slider Track
72
+ &::-webkit-slider-runnable-track {
73
+ background: $bg-color-dark;
74
+ border-radius: $border-radius;
75
+ height: $unit-h;
76
+ width: 100%;
77
+ }
78
+ &::-moz-range-track {
79
+ background: $bg-color-dark;
80
+ border-radius: $border-radius;
81
+ height: $unit-h;
82
+ width: 100%;
83
+ }
84
+ &::-ms-track {
85
+ background: $bg-color-dark;
86
+ border-radius: $border-radius;
87
+ height: $unit-h;
88
+ width: 100%;
89
+ }
90
+ &::-ms-fill-lower {
91
+ background: $primary-color;
92
+ }
93
+ }
@@ -0,0 +1,70 @@
1
+ // Steps
2
+ .step {
3
+ display: flex;
4
+ flex-wrap: nowrap;
5
+ list-style: none;
6
+ margin: $unit-1 0;
7
+ width: 100%;
8
+
9
+ .step-item {
10
+ flex: 1 1 0;
11
+ margin-top: 0;
12
+ min-height: 20px;
13
+ text-align: center;
14
+ position: relative;
15
+
16
+ &:not(:first-child)::before {
17
+ background: $primary-color;
18
+ content: "";
19
+ height: 2px;
20
+ left: -50%;
21
+ position: absolute;
22
+ top: 9px;
23
+ width: 100%;
24
+ }
25
+
26
+ a {
27
+ color: $gray-color;
28
+ display: inline-block;
29
+ padding: 20px 10px 0;
30
+ text-decoration: none;
31
+
32
+ &::before {
33
+ background: $primary-color;
34
+ border: $border-width-lg solid $light-color;
35
+ border-radius: 50%;
36
+ content: "";
37
+ display: block;
38
+ height: $unit-3;
39
+ left: 50%;
40
+ position: absolute;
41
+ top: $unit-1;
42
+ transform: translateX(-50%);
43
+ width: $unit-3;
44
+ z-index: $zindex-0;
45
+ }
46
+ }
47
+
48
+ &.active {
49
+ a {
50
+ &::before {
51
+ background: $light-color;
52
+ border: $border-width-lg solid $primary-color;
53
+ }
54
+ }
55
+
56
+ & ~ .step-item {
57
+ &::before {
58
+ background: $border-color;
59
+ }
60
+
61
+ a {
62
+
63
+ &::before {
64
+ background: $gray-color-light;
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }