refills 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.hound.yml +3 -2
- data/.ruby-version +1 -1
- data/.scss-lint.yml +97 -24
- data/CONTRIBUTING.md +4 -3
- data/Gemfile +13 -10
- data/README.md +31 -15
- data/circle.yml +7 -0
- data/config.rb +4 -13
- data/{lib → helpers}/snippet_helpers.rb +14 -6
- data/lib/refills/version.rb +1 -1
- data/refills.gemspec +2 -2
- data/sache.json +1 -1
- data/source/_badges.html.erb +1 -1
- data/source/_cards.html.erb +1 -1
- data/source/_centered_navigation.html.erb +5 -5
- data/source/_comment.html.erb +2 -2
- data/source/_device.html.erb +0 -1
- data/source/_expander.html.erb +2 -2
- data/source/_flex_boxes.html.erb +6 -6
- data/source/_footer.html.erb +1 -1
- data/source/_footer_2.html.erb +1 -1
- data/source/_grid_items.html.erb +7 -7
- data/source/_grid_items_lines.html.erb +8 -8
- data/source/_hero.html.erb +4 -9
- data/source/_icon_bullet_points.html.erb +6 -7
- data/source/_logo_section.html.erb +8 -0
- data/source/_modal.html.erb +2 -2
- data/source/_navigation.html.erb +2 -3
- data/source/_search_bar.html.erb +1 -1
- data/source/_search_tools.html.erb +54 -52
- data/source/_side_image.html.erb +0 -1
- data/source/_sliding_panel.html.erb +13 -0
- data/source/_type_system_geometric.html.erb +4 -3
- data/source/_type_system_rounded.html.erb +3 -3
- data/source/_type_system_sans.html.erb +3 -3
- data/source/_type_system_serif.html.erb +4 -4
- data/source/_type_system_slab.html.erb +3 -3
- data/source/_type_system_traditional.html.erb +3 -3
- data/source/components.html.erb +9 -5
- data/source/images/background-image.png +0 -0
- data/source/images/cosmin_capitanu_screen.jpg +0 -0
- data/source/images/new.svg +22 -0
- data/source/images/placeholder_square.png +0 -0
- data/source/images/placeholder_wide.png +0 -0
- data/source/images/placeholder_wider.png +0 -0
- data/source/index.html.erb +10 -3
- data/source/javascripts/jquery.erToc.js +1 -6
- data/source/javascripts/refills/accordion_base.js +5 -0
- data/source/javascripts/refills/accordion_tabs.js +1 -2
- data/source/javascripts/refills/accordion_tabs_minimal.js +1 -2
- data/source/javascripts/refills/base-accordion.js +5 -0
- data/source/javascripts/refills/centered_navigation.js +27 -9
- data/source/javascripts/refills/coffeescript/accordion.coffee +3 -4
- data/source/javascripts/refills/coffeescript/accordion_base.coffee +6 -0
- data/source/javascripts/refills/coffeescript/accordion_tabs.coffee +9 -12
- data/source/javascripts/refills/coffeescript/accordion_tabs_minimal.coffee +9 -12
- data/source/javascripts/refills/coffeescript/animate.coffee +4 -7
- data/source/javascripts/refills/coffeescript/base-accordion.coffee +5 -0
- data/source/javascripts/refills/coffeescript/centered_navigation.coffee +6 -8
- data/source/javascripts/refills/coffeescript/dropdown.coffee +6 -10
- data/source/javascripts/refills/coffeescript/expander.coffee +4 -6
- data/source/javascripts/refills/coffeescript/fade_in.coffee +6 -8
- data/source/javascripts/refills/coffeescript/modal.coffee +7 -11
- data/source/javascripts/refills/coffeescript/navigation.coffee +6 -8
- data/source/javascripts/refills/coffeescript/parallax.coffee +9 -8
- data/source/javascripts/refills/coffeescript/scroll_on_page.coffee +6 -11
- data/source/javascripts/refills/coffeescript/search_tools.coffee +0 -85
- data/source/javascripts/refills/coffeescript/sliding_panel.coffee +6 -0
- data/source/javascripts/refills/coffeescript/vertical_tabs.coffee +21 -21
- data/source/javascripts/refills/dropdown.js +8 -8
- data/source/javascripts/refills/expander.js +1 -4
- data/source/javascripts/refills/modal.js +1 -1
- data/source/javascripts/refills/navigation.js +26 -7
- data/source/javascripts/refills/navigation_centered.js +13 -0
- data/source/javascripts/refills/scroll_on_page.js +8 -5
- data/source/javascripts/refills/search_tools.js +2 -2
- data/source/javascripts/refills/sliding_panel.js +6 -0
- data/source/javascripts/refills/unstyled/accordion.js +5 -0
- data/source/javascripts/refills/unstyled/accordion_tabs.js +18 -0
- data/source/javascripts/refills/unstyled/dropdown.js +12 -0
- data/source/javascripts/refills/unstyled/expander.js +8 -0
- data/source/javascripts/refills/unstyled/modal.js +17 -0
- data/source/javascripts/refills/unstyled/navigation.js +13 -0
- data/source/javascripts/refills/unstyled/navigation_centered.js +13 -0
- data/source/javascripts/refills/unstyled/scroll_on_page.js +29 -0
- data/source/javascripts/refills/unstyled/sliding_panel.js +6 -0
- data/source/javascripts/refills/unstyled/vertical_tabs.js +32 -0
- data/source/layouts/layout.erb +3 -3
- data/source/refills-hero.html.erb +6 -3
- data/source/stylesheets/_bourbon-nav.scss +14 -7
- data/source/stylesheets/_refill.scss +215 -0
- data/source/stylesheets/_refills-footer.scss +62 -0
- data/source/stylesheets/_refills-header.scss +113 -0
- data/source/stylesheets/_refills-menu.scss +91 -0
- data/source/stylesheets/_refills-nav.scss +13 -13
- data/source/stylesheets/_refills-styles.scss +8 -644
- data/source/stylesheets/_refills-variables.scss +20 -0
- data/source/stylesheets/all.css.scss +78 -0
- data/source/stylesheets/refills/_accordion-tabs-minimal.scss +9 -14
- data/source/stylesheets/refills/_accordion-tabs.scss +11 -16
- data/source/stylesheets/refills/_accordion.scss +13 -29
- data/source/stylesheets/refills/_animate.scss +9 -10
- data/source/stylesheets/refills/_badges.scss +18 -35
- data/source/stylesheets/refills/_breadcrumbs.scss +15 -19
- data/source/stylesheets/refills/_button-group.scss +6 -12
- data/source/stylesheets/refills/_cards.scss +22 -31
- data/source/stylesheets/refills/_centered-navigation.scss +16 -13
- data/source/stylesheets/refills/_comment.scss +3 -6
- data/source/stylesheets/refills/_device.scss +29 -40
- data/source/stylesheets/refills/_dropdown.scss +17 -27
- data/source/stylesheets/refills/_expander.scss +14 -21
- data/source/stylesheets/refills/_fade-in.scss +7 -11
- data/source/stylesheets/refills/_flashes.scss +21 -33
- data/source/stylesheets/refills/_flex-boxes.scss +18 -26
- data/source/stylesheets/refills/_footer-2.scss +19 -33
- data/source/stylesheets/refills/_footer.scss +15 -38
- data/source/stylesheets/refills/_grid-items-lines.scss +12 -21
- data/source/stylesheets/refills/_grid-items.scss +31 -40
- data/source/stylesheets/refills/_hero.scss +22 -55
- data/source/stylesheets/refills/_hover-tile-animation.scss +8 -17
- data/source/stylesheets/refills/_icon-bullet-points.scss +26 -35
- data/source/stylesheets/refills/_image-gradient-dynamic.scss +31 -20
- data/source/stylesheets/refills/_logo-section.scss +25 -0
- data/source/stylesheets/refills/_maps.scss +2 -2
- data/source/stylesheets/refills/_modal.scss +32 -45
- data/source/stylesheets/refills/_navigation.scss +33 -39
- data/source/stylesheets/refills/_pagination.scss +10 -23
- data/source/stylesheets/refills/_progress-bar-indication.scss +8 -15
- data/source/stylesheets/refills/_progress-bar.scss +24 -26
- data/source/stylesheets/refills/_ribbon.scss +4 -5
- data/source/stylesheets/refills/_scroll-on-page.scss +12 -15
- data/source/stylesheets/refills/_search-bar.scss +6 -13
- data/source/stylesheets/refills/_search-tools.scss +41 -42
- data/source/stylesheets/refills/_side-image.scss +8 -20
- data/source/stylesheets/refills/_sliding-panel.scss +79 -0
- data/source/stylesheets/refills/_stats.scss +2 -3
- data/source/stylesheets/refills/_switch.scss +13 -16
- data/source/stylesheets/refills/_tables-minimal.scss +12 -24
- data/source/stylesheets/refills/_tables.scss +11 -20
- data/source/stylesheets/refills/_texture-legend.scss +17 -13
- data/source/stylesheets/refills/_textures.scss +13 -9
- data/source/stylesheets/refills/_tooltip.scss +9 -16
- data/source/stylesheets/refills/_type-system-geometric.scss +14 -17
- data/source/stylesheets/refills/_type-system-rounded.scss +19 -19
- data/source/stylesheets/refills/_type-system-sans.scss +26 -26
- data/source/stylesheets/refills/_type-system-serif.scss +17 -20
- data/source/stylesheets/refills/_type-system-slab.scss +14 -17
- data/source/stylesheets/refills/_type-system-traditional.scss +18 -21
- data/source/stylesheets/refills/_vertical-tabs.scss +26 -30
- data/source/stylesheets/refills/_video.scss +1 -1
- data/source/stylesheets/refills/unstyled/_accordion-tabs.scss +36 -0
- data/source/stylesheets/refills/unstyled/_accordion.scss +17 -0
- data/source/stylesheets/refills/unstyled/_button-group.scss +30 -0
- data/source/stylesheets/refills/unstyled/_cards.scss +20 -0
- data/source/stylesheets/refills/unstyled/_comment.scss +28 -0
- data/source/stylesheets/refills/unstyled/_dropdown.scss +42 -0
- data/source/stylesheets/refills/unstyled/_expander.scss +20 -0
- data/source/stylesheets/refills/unstyled/_footer.scss +64 -0
- data/source/stylesheets/refills/unstyled/_hover-menu.scss +60 -0
- data/source/stylesheets/refills/unstyled/_modal.scss +71 -0
- data/source/stylesheets/refills/unstyled/_navigation-centered.scss +92 -0
- data/source/stylesheets/refills/unstyled/_navigation.scss +82 -0
- data/source/stylesheets/refills/unstyled/_scroll-on-page.scss +22 -0
- data/source/stylesheets/refills/unstyled/_search-bar.scss +26 -0
- data/source/stylesheets/refills/unstyled/_sliding-panel.scss +36 -0
- data/source/stylesheets/refills/unstyled/_switch.scss +50 -0
- data/source/stylesheets/refills/unstyled/_tooltip.scss +36 -0
- data/source/stylesheets/refills/unstyled/_vertical-tabs.scss +53 -0
- data/source/stylesheets/vendor/prism.css +4 -4
- data/source/svgs/_menu_icon.html.erb +6 -0
- data/source/svgs/_refills_logo.html.erb +8 -0
- data/source/type-systems.html.erb +5 -1
- data/spec/refills/import_generator_spec.rb +1 -1
- metadata +59 -19
- data/.travis.yml +0 -8
- data/source/_sliding_menu.html.erb +0 -13
- data/source/images/placeholder_logo_1.png +0 -0
- data/source/images/placeholder_logo_1_dark.png +0 -0
- data/source/images/placeholder_logo_2.png +0 -0
- data/source/images/placeholder_logo_2_dark.png +0 -0
- data/source/images/placeholder_logo_3.png +0 -0
- data/source/images/placeholder_logo_3_dark.png +0 -0
- data/source/images/placeholder_logo_4.png +0 -0
- data/source/images/placeholder_logo_4_dark.png +0 -0
- data/source/javascripts/refills/sliding_menu.js +0 -6
- data/source/stylesheets/all.scss +0 -66
- data/source/stylesheets/refills/_sliding-menu.scss +0 -86
@@ -0,0 +1,60 @@
|
|
1
|
+
.hover-menu {
|
2
|
+
$large-screen: 53.75em !default;
|
3
|
+
$submenu-width: 12em;
|
4
|
+
|
5
|
+
overflow: visible;
|
6
|
+
padding-right: 0;
|
7
|
+
|
8
|
+
@include media($large-screen) {
|
9
|
+
position: relative;
|
10
|
+
}
|
11
|
+
|
12
|
+
.hover-menu-item {
|
13
|
+
left: 0;
|
14
|
+
position: relative;
|
15
|
+
|
16
|
+
&::after {
|
17
|
+
content: "›";
|
18
|
+
padding-left: 0.5em;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
.submenu {
|
23
|
+
display: none;
|
24
|
+
margin: 0;
|
25
|
+
padding-left: 0;
|
26
|
+
|
27
|
+
@include media($large-screen) {
|
28
|
+
left: 0;
|
29
|
+
position: absolute;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
.submenu li {
|
34
|
+
display: block;
|
35
|
+
padding-right: 0;
|
36
|
+
}
|
37
|
+
|
38
|
+
.submenu li a {
|
39
|
+
display: inline-block;
|
40
|
+
text-align: right;
|
41
|
+
width: 100%;
|
42
|
+
|
43
|
+
@include media($large-screen) {
|
44
|
+
text-align: left;
|
45
|
+
width: $submenu-width;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
.submenu .submenu {
|
50
|
+
@include media($large-screen) {
|
51
|
+
left: $submenu-width;
|
52
|
+
top: 0;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
&:focus > .submenu,
|
57
|
+
&:hover > .submenu {
|
58
|
+
display: block;
|
59
|
+
}
|
60
|
+
}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
.modal {
|
2
|
+
$medium-screen: 40em !default;
|
3
|
+
$large-screen: 53.75em !default;
|
4
|
+
|
5
|
+
label {
|
6
|
+
cursor: pointer;
|
7
|
+
font-weight: normal;
|
8
|
+
margin-bottom: 0;
|
9
|
+
}
|
10
|
+
|
11
|
+
.modal-state {
|
12
|
+
display: none;
|
13
|
+
}
|
14
|
+
|
15
|
+
.modal-fade-screen { // overlay
|
16
|
+
@include position(fixed, 0);
|
17
|
+
background-color: rgba(#000, 0.85);
|
18
|
+
opacity: 0;
|
19
|
+
transition: opacity 0.25s ease;
|
20
|
+
visibility: hidden;
|
21
|
+
z-index: 99999;
|
22
|
+
|
23
|
+
@include media($large-screen) {
|
24
|
+
padding-top: 10em;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
.modal-bg {
|
29
|
+
@include position(absolute, 0);
|
30
|
+
cursor: pointer;
|
31
|
+
}
|
32
|
+
|
33
|
+
.modal-close {
|
34
|
+
cursor: pointer;
|
35
|
+
}
|
36
|
+
|
37
|
+
.modal-inner {
|
38
|
+
background-color: #fff;
|
39
|
+
margin: auto;
|
40
|
+
max-height: 95%;
|
41
|
+
overflow: auto;
|
42
|
+
position: relative;
|
43
|
+
top: 0.5em;
|
44
|
+
transition: opacity 0.25s ease;
|
45
|
+
width: 95%;
|
46
|
+
|
47
|
+
@include media($medium-screen) {
|
48
|
+
max-height: 70%;
|
49
|
+
width: 60%;
|
50
|
+
}
|
51
|
+
|
52
|
+
@include media($large-screen) {
|
53
|
+
width: 50%;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
.modal-state:checked + .modal-fade-screen {
|
58
|
+
opacity: 1;
|
59
|
+
visibility: visible;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
.modal-open {
|
64
|
+
overflow: hidden;
|
65
|
+
}
|
66
|
+
|
67
|
+
.modal-closed {
|
68
|
+
overflow: auto;
|
69
|
+
}
|
70
|
+
|
71
|
+
// Based on code by Kasper Mikiewicz
|
@@ -0,0 +1,92 @@
|
|
1
|
+
.navigation-centered {
|
2
|
+
$large-screen: 53.75em !default;
|
3
|
+
$centered-navigation-height: 60px;
|
4
|
+
$centered-navigation-logo-height: 2em;
|
5
|
+
|
6
|
+
width: 100%;
|
7
|
+
|
8
|
+
// Mobile view
|
9
|
+
.mobile-logo {
|
10
|
+
display: inline;
|
11
|
+
float: left;
|
12
|
+
|
13
|
+
@include media($large-screen) {
|
14
|
+
display: none;
|
15
|
+
}
|
16
|
+
|
17
|
+
img {
|
18
|
+
max-height: $centered-navigation-logo-height;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
.navigation-centered-mobile-menu {
|
23
|
+
float: right;
|
24
|
+
padding-top: 0.5em;
|
25
|
+
|
26
|
+
@include media ($large-screen) {
|
27
|
+
display: none;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
// Nav menu
|
32
|
+
.navigation-centered-wrapper {
|
33
|
+
@include clearfix;
|
34
|
+
position: relative;
|
35
|
+
}
|
36
|
+
|
37
|
+
ul.navigation-centered-menu {
|
38
|
+
clear: both;
|
39
|
+
display: none;
|
40
|
+
margin: 0 auto;
|
41
|
+
overflow: visible;
|
42
|
+
padding: 0;
|
43
|
+
width: 100%;
|
44
|
+
|
45
|
+
&.show {
|
46
|
+
display: block;
|
47
|
+
}
|
48
|
+
|
49
|
+
@include media ($large-screen) {
|
50
|
+
display: block;
|
51
|
+
text-align: center;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
// Nav items
|
56
|
+
ul li.nav-link {
|
57
|
+
display: block;
|
58
|
+
text-align: right;
|
59
|
+
width: 100%;
|
60
|
+
|
61
|
+
a {
|
62
|
+
display: inline-block;
|
63
|
+
}
|
64
|
+
|
65
|
+
&:last-child a {
|
66
|
+
padding-right: 0;
|
67
|
+
}
|
68
|
+
|
69
|
+
@include media($large-screen) {
|
70
|
+
display: inline;
|
71
|
+
|
72
|
+
a {
|
73
|
+
padding-right: 1em;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
// Centered logo
|
79
|
+
li.logo.nav-link {
|
80
|
+
display: none;
|
81
|
+
line-height: 0;
|
82
|
+
|
83
|
+
@include media($large-screen) {
|
84
|
+
display: inline;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
.logo img {
|
89
|
+
margin-bottom: -$centered-navigation-logo-height / 3;
|
90
|
+
max-height: $centered-navigation-logo-height;
|
91
|
+
}
|
92
|
+
}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
.navigation {
|
2
|
+
$large-screen: 53.75em !default;
|
3
|
+
$large-screen: $large-screen;
|
4
|
+
|
5
|
+
// Mobile view
|
6
|
+
.navigation-menu-button {
|
7
|
+
display: block;
|
8
|
+
float: right;
|
9
|
+
margin: 0;
|
10
|
+
padding-top: 0.5em;
|
11
|
+
|
12
|
+
@include media ($large-screen) {
|
13
|
+
display: none;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
// Nav menu
|
18
|
+
.navigation-wrapper {
|
19
|
+
@include clearfix;
|
20
|
+
position: relative;
|
21
|
+
}
|
22
|
+
|
23
|
+
.logo {
|
24
|
+
float: left;
|
25
|
+
|
26
|
+
img {
|
27
|
+
max-height: 2em;
|
28
|
+
padding-right: 1em;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
nav {
|
33
|
+
float: none;
|
34
|
+
|
35
|
+
@include media ($large-screen) {
|
36
|
+
float: left;
|
37
|
+
line-height: 1.5em;
|
38
|
+
padding-top: 0.3em;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
ul.navigation-menu {
|
43
|
+
clear: both;
|
44
|
+
display: none;
|
45
|
+
margin: 0 auto;
|
46
|
+
overflow: visible;
|
47
|
+
padding: 0;
|
48
|
+
width: 100%;
|
49
|
+
|
50
|
+
@include media ($large-screen) {
|
51
|
+
display: block;
|
52
|
+
margin: 0;
|
53
|
+
padding: 0;
|
54
|
+
}
|
55
|
+
|
56
|
+
&.show {
|
57
|
+
display: block;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
// Nav items
|
62
|
+
ul li.nav-link {
|
63
|
+
display: block;
|
64
|
+
text-align: right;
|
65
|
+
width: 100%;
|
66
|
+
|
67
|
+
@include media ($large-screen) {
|
68
|
+
background: transparent;
|
69
|
+
display: inline;
|
70
|
+
text-decoration: none;
|
71
|
+
width: auto;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
li.nav-link a {
|
76
|
+
display: inline-block;
|
77
|
+
|
78
|
+
@include media ($large-screen) {
|
79
|
+
padding-right: 1em;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
.scroll-on-page {
|
2
|
+
$large-screen: 53.75em !default;
|
3
|
+
|
4
|
+
aside {
|
5
|
+
@include media($large-screen) {
|
6
|
+
@include span-columns(4);
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
.scroll-on-page-link {
|
11
|
+
display: block;
|
12
|
+
outline: none;
|
13
|
+
}
|
14
|
+
|
15
|
+
article {
|
16
|
+
@include media($large-screen) {
|
17
|
+
@include span-columns(8);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
// Based on code by http://codepen.io/xmark/
|
@@ -0,0 +1,26 @@
|
|
1
|
+
.search-bar {
|
2
|
+
width: 100%;
|
3
|
+
|
4
|
+
form {
|
5
|
+
position: relative;
|
6
|
+
}
|
7
|
+
|
8
|
+
input {
|
9
|
+
box-sizing: border-box;
|
10
|
+
display: block;
|
11
|
+
margin: 0;
|
12
|
+
position: relative;
|
13
|
+
width: 100%;
|
14
|
+
}
|
15
|
+
|
16
|
+
button {
|
17
|
+
@include position(absolute, 0 0 0 null);
|
18
|
+
padding: 5px 10px;
|
19
|
+
|
20
|
+
}
|
21
|
+
|
22
|
+
img {
|
23
|
+
height: 12px;
|
24
|
+
opacity: 0.7;
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
.sliding-panel-content {
|
2
|
+
$sliding-panel-width: 220px;
|
3
|
+
|
4
|
+
@include position(fixed, 0 auto 0 0);
|
5
|
+
@include size($sliding-panel-width, 100%);
|
6
|
+
background: #fff;
|
7
|
+
-webkit-overflow-scrolling: touch;
|
8
|
+
overflow-y: auto;
|
9
|
+
transform: translateX(- $sliding-panel-width);
|
10
|
+
transition: all 0.25s linear;
|
11
|
+
z-index: 999999;
|
12
|
+
|
13
|
+
&.is-visible {
|
14
|
+
transform: translateX(0);
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
.sliding-panel-fade-screen {
|
19
|
+
@include position(fixed, 0);
|
20
|
+
background: #000;
|
21
|
+
opacity: 0;
|
22
|
+
transition: all 0.2s ease-in-out;
|
23
|
+
visibility: hidden;
|
24
|
+
z-index: 9999;
|
25
|
+
|
26
|
+
&.is-visible {
|
27
|
+
opacity: 0.4;
|
28
|
+
visibility: visible;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
.sliding-panel-close {
|
33
|
+
cursor: pointer;
|
34
|
+
}
|
35
|
+
|
36
|
+
// Based on code by Diego Eis
|
@@ -0,0 +1,50 @@
|
|
1
|
+
.switch {
|
2
|
+
$switch-width: 52px;
|
3
|
+
$switch-padding: 2px;
|
4
|
+
$switch-height: 32px;
|
5
|
+
$knob-size: $switch-height - ($switch-padding * 2);
|
6
|
+
$knob-width: $knob-size;
|
7
|
+
|
8
|
+
cursor: pointer;
|
9
|
+
display: inline-block;
|
10
|
+
position: relative;
|
11
|
+
|
12
|
+
input {
|
13
|
+
display: none;
|
14
|
+
|
15
|
+
+ .checkbox {
|
16
|
+
@include size($switch-width, $switch-height);
|
17
|
+
border: 1px solid #000;
|
18
|
+
cursor: pointer;
|
19
|
+
position: relative;
|
20
|
+
width: $switch-width;
|
21
|
+
z-index: 0;
|
22
|
+
|
23
|
+
&::before {
|
24
|
+
@include position(absolute, $switch-padding 0 0 $switch-padding);
|
25
|
+
content: "";
|
26
|
+
width: $switch-width - ($switch-padding * 2);
|
27
|
+
z-index: 1;
|
28
|
+
}
|
29
|
+
|
30
|
+
&::after {
|
31
|
+
@include position(absolute, 1px 0 0 1px);
|
32
|
+
@include size($knob-size);
|
33
|
+
background-color: #000;
|
34
|
+
content: "";
|
35
|
+
transition: all 0.3s ease;
|
36
|
+
z-index: 2;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
&:checked {
|
41
|
+
+ .checkbox {
|
42
|
+
background-color: #aaa;
|
43
|
+
|
44
|
+
&::after {
|
45
|
+
left: $switch-width - $knob-width - ($switch-padding * 2) + 1px;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|