active_material 1.4.2 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +19 -41
  3. data/app/assets/javascripts/active_material/actions-toggle.js +38 -0
  4. data/app/assets/javascripts/active_material.js +4 -1
  5. data/app/assets/stylesheets/active_material/atoms/type.scss +15 -15
  6. data/app/assets/stylesheets/active_material/components/blank_slate.scss +1 -1
  7. data/app/assets/stylesheets/active_material/components/buttons.scss +1 -1
  8. data/app/assets/stylesheets/active_material/components/comments.scss +28 -0
  9. data/app/assets/stylesheets/active_material/components/forms.scss +21 -2
  10. data/app/assets/stylesheets/active_material/components/header.scss +1 -1
  11. data/app/assets/stylesheets/active_material/components/pagination.scss +20 -2
  12. data/app/assets/stylesheets/active_material/components/panels.scss +9 -0
  13. data/app/assets/stylesheets/active_material/components/scopes.scss +1 -1
  14. data/app/assets/stylesheets/active_material/components/select.scss +4 -0
  15. data/app/assets/stylesheets/active_material/components/sortable.scss +1 -1
  16. data/app/assets/stylesheets/active_material/components/tables.scss +27 -19
  17. data/app/assets/stylesheets/active_material/components/tabs.scss +2 -2
  18. data/app/assets/stylesheets/active_material/components/utility_nav.scss +37 -44
  19. data/app/assets/stylesheets/active_material/generators/functions.scss +2 -11
  20. data/app/assets/stylesheets/active_material/generators/mixins.scss +1 -11
  21. data/app/assets/stylesheets/active_material/global/foundation.scss +1 -1
  22. data/app/assets/stylesheets/active_material/prototypes/button.scss +2 -2
  23. data/app/assets/stylesheets/active_material/prototypes/datepicker.scss +4 -3
  24. data/app/assets/stylesheets/active_material/prototypes/dialog.scss +1 -1
  25. data/app/assets/stylesheets/active_material/prototypes/menu.scss +1 -1
  26. data/app/assets/stylesheets/active_material/prototypes/select.scss +6 -2
  27. data/app/assets/stylesheets/active_material/prototypes/snackbar.scss +1 -1
  28. data/app/assets/stylesheets/active_material/prototypes/subheader.scss +2 -2
  29. data/app/assets/stylesheets/active_material/prototypes/table.scss +5 -3
  30. data/app/assets/stylesheets/active_material/prototypes/tabs.scss +14 -3
  31. data/app/assets/stylesheets/active_material/prototypes/textfield.scss +14 -10
  32. data/app/assets/stylesheets/active_material/prototypes/toolbar.scss +5 -5
  33. data/app/assets/stylesheets/active_material/values/fonts.scss +14 -2
  34. data/app/assets/stylesheets/active_material.scss +59 -7
  35. data/config/importmap.rb +2 -0
  36. data/lib/active_material/font_loader.rb +12 -0
  37. data/lib/active_material/version.rb +3 -3
  38. data/lib/active_material.rb +25 -0
  39. data/package.json +23 -0
  40. metadata +28 -23
  41. data/app/assets/images/active_material/icons/account_circle.svg +0 -9
  42. data/app/assets/images/active_material/icons/arrow-dropdown.svg +0 -7
  43. data/app/assets/images/active_material/icons/arrow_down.svg +0 -7
  44. data/app/assets/images/active_material/icons/clear.svg +0 -8
  45. data/app/assets/images/active_material/icons/create.svg +0 -8
  46. data/app/assets/images/active_material/icons/email.svg +0 -8
  47. data/app/assets/images/active_material/icons/event.svg +0 -8
  48. data/app/assets/images/active_material/icons/more.svg +0 -9
  49. data/app/assets/images/active_material/icons/reorder.svg +0 -4
  50. data/app/assets/images/active_material/icons/search.svg +0 -9
  51. data/app/assets/images/active_material/icons/secret.svg +0 -8
  52. data/app/assets/javascripts/active_material/fonts.js +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9ce29513f9cdd29ec8931ecd0e11d747a966f1d2
4
- data.tar.gz: fb36f571cb37af43376ba9e99b09c6ca98636232
2
+ SHA256:
3
+ metadata.gz: 93275c327756af4eafee3c5542609ec05715b93c493640a1f9762a2222afcf10
4
+ data.tar.gz: 2ad339e7948a534d497c2c41fec43aca0aca8abfc04f51e1c710b25121d77ef8
5
5
  SHA512:
6
- metadata.gz: 3f622eedd22b4676e398095aaa1e8ddd4cf33c372ef33ff23cc76516d8d5f32e8677af10f4cd9c7944484cae8c92b744ebca64a5ed384b4531adbd60a5e89a8e
7
- data.tar.gz: 6903a9829ad94b5af962690bd4d053e00150f51e382f901318ce65f0fcc7144cd1ce01fcf74a6a2875965eefe78cc57c4e758af5cb4e0d0f6b6b924fe7e0fa0c
6
+ metadata.gz: 9824e96641f906684578de15c16fbda84188897cf22e40a260cf12f4fdb632c277e3647a6f253030f3fbf5be2fe7da4ae81d78bfbb9fa07ae5cfc35b7175d95b
7
+ data.tar.gz: 7e745b586892691b733a7a001fd495e0724a84bf8eb31d5e4456d97829a4603a02002c1540c90fcd1a443de5d56bab763767f424ed7f42dbca251bfa9702760d
data/README.md CHANGED
@@ -4,57 +4,35 @@ An ActiveAdmin skin based on Google's Material Design.
4
4
 
5
5
  <img src="http://i.imgur.com/kDkGzYe.png">
6
6
 
7
- 1. [Installation](#installation)
8
- 2. [Usage](#usage)
9
- 3. [Customization](#customization)
10
- 4. [Contributing](#contributing)
11
-
12
7
  ## Installation
8
+ ### Importmap
13
9
 
14
- Add this line to your application's Gemfile:
15
-
16
- ```ruby
17
- gem "active_material", git: "git@github.com:vigetlabs/active_material.git"
18
- ```
19
-
20
- And then execute:
21
-
22
- ```shell
23
- $ bundle
24
- ```
10
+ - Add `gem 'active_material'` to `Gemfile` and run `bundle install`
11
+ - Add `import "active_material"` to JS entrypoint (a JS file that is included for activeadmin)
12
+ - Add `@import "active_material";` in your CSS style file (the active_material SCSS files are included in the asset path automatically, but you will need to have SCSS build capabilities, using dartsass-rails or similar)
25
13
 
26
- Or install it yourself as:
14
+ NOTE: no need to pin the import in your application. That's handled internally by the gem.
27
15
 
28
- ```shell
29
- $ gem install active_material
30
- ```
16
+ ### npm
17
+ - `npm install --save active_material` or `yarn add active_material`
18
+ - Add `import "active_material"` to your JS pack file
19
+ - Add `@import "active_material/app/assets/stylesheets/active_material.scss";` to your CSS style file
31
20
 
32
- ## Usage
21
+ ## Options
33
22
 
34
- In `app/assets/stylesheets/active_admin.css.scss`, replace:
23
+ ### Change font
35
24
 
36
- `@import "active_admin/base";`
25
+ By default, this gem will load the Roboto font from google APIs and use it in the SCSS. If you would like to change that behavior, you have a few options:
37
26
 
38
- with
27
+ 1. If you want to change to another font:
28
+ - In your application config, set `config.active_material.font_url` to your font url
29
+ - In your SCSS file, just before `@import "active_material";`, add `$am-font-sans: 'Roboto';`, replacing `Roboto` with your font name.
30
+ 2. If you want to disable font loading altogether, you can use `config.active_material.load_font = true`
39
31
 
40
- `@import "active_material";`
32
+ ### Other customizations
41
33
 
42
- ## Customization
43
-
44
- Refer to the [Customization Guide](./docs/customization.md).
34
+ For other customization options, see [customization.md](./docs/customization.md)
45
35
 
46
36
  ## Contributing
47
37
 
48
- 1. Fork it ( https://github.com/[my-github-username]/active_material/fork )
49
- 2. Create your feature branch (`git checkout -b my-new-feature`)
50
- 3. Commit your changes (`git commit -am "Add some feature"`)
51
- 4. Push to the branch (`git push origin my-new-feature`)
52
- 5. Create a new Pull Request
53
-
54
- ***
55
-
56
- <a href="http://code.viget.com">
57
- <img src="http://code.viget.com/github-banner.png" alt="Code At Viget">
58
- </a>
59
-
60
- Visit [code.viget.com](http://code.viget.com) to see more projects from [Viget.](https://viget.com)
38
+ See [CONTRIBUTING.md](./CONTRIBUTING.md)
@@ -0,0 +1,38 @@
1
+ document.addEventListener("DOMContentLoaded", () => {
2
+ const actions = document.querySelectorAll("tbody .col-actions")
3
+
4
+ function waitForOutsideClick (el) {
5
+ const body = document.querySelector("body")
6
+ body.addEventListener("click", (e) => {
7
+ if (el.contains(e.currentTarget) === false) {
8
+ el.classList.remove('active')
9
+ }
10
+ })
11
+ }
12
+
13
+ actions.forEach((action) => {
14
+ // Make actions focusable
15
+ action.setAttribute('tabindex', 0)
16
+ action.setAttribute('role', 'button')
17
+
18
+ action.addEventListener('click', () => {
19
+ action.classList.add('active');
20
+ waitForOutsideClick(action);
21
+ })
22
+
23
+ action.addEventListener('keydown', (e) => {
24
+ const space = 32;
25
+ const enter = 13;
26
+ const escape = 27;
27
+
28
+ if (e.keyCode == space || e.keyCode == enter) {
29
+ e.preventDefault()
30
+ action.classList.add('active')
31
+ waitForOutsideClick(action)
32
+ } else if (e.keyCode == escape) {
33
+ e.preventDefault()
34
+ action.classList.remove('active')
35
+ }
36
+ })
37
+ })
38
+ })
@@ -1 +1,4 @@
1
- //= require active_material/fonts
1
+
2
+ import "active_material/actions-toggle"
3
+
4
+ document.querySelector('html').className += ' am-js'
@@ -7,43 +7,43 @@
7
7
 
8
8
  /// Applies rules for subheader text.
9
9
  @mixin am-type-subheader {
10
- @include am-font-size(16);
11
- font-weight: 400;
12
- line-height: am-sp(24);
10
+ @include am-font-size(16px);
11
+ font-weight: $am-font-weight-regular;
12
+ line-height: am-sp(24px);
13
13
  letter-spacing: am-tracking(10);
14
14
  }
15
15
 
16
16
  /// Applies rules for heavier, more emphasized, body text.
17
17
  @mixin am-type-body-2 {
18
- @include am-font-size(14);
19
- font-weight: 600;
20
- line-height: am-sp(24);
18
+ @include am-font-size(14px);
19
+ font-weight: $am-font-weight-semi-bold;
20
+ line-height: am-sp(24px);
21
21
  letter-spacing: am-tracking(10);
22
22
  }
23
23
 
24
24
  /// Applies rules for standard body text.
25
25
  @mixin am-type-body-1 {
26
- @include am-font-size(14);
27
- font-weight: 400;
28
- line-height: am-sp(20);
26
+ @include am-font-size(14px);
27
+ font-weight: $am-font-weight-regular;
28
+ line-height: am-sp(20px);
29
29
  letter-spacing: am-tracking(10);
30
30
  }
31
31
 
32
32
  /// Applies rules for caption text.
33
33
  @mixin am-type-caption {
34
- @include am-font-size(12);
34
+ @include am-font-size(12px);
35
35
  font-style: normal;
36
- font-weight: 500;
36
+ font-weight: $am-font-weight-medium;
37
37
  letter-spacing: am-tracking(20);
38
- line-height: am-sp(12);
38
+ line-height: am-sp(12px);
39
39
  }
40
40
 
41
41
  /// Applies rules for button text.
42
42
  @mixin am-type-btn {
43
- @include am-font-size(14);
44
- font-weight: 500;
43
+ @include am-font-size(14px);
44
+ font-weight: $am-font-weight-medium;
45
45
  letter-spacing: am-tracking(10);
46
- line-height: am-sp(12);
46
+ line-height: am-sp(12px);
47
47
  text-transform: uppercase;
48
48
  }
49
49
 
@@ -8,7 +8,7 @@
8
8
  @include am-color(tertiary-text);
9
9
  @include am-type-body-1;
10
10
  @include am-type-smooth;
11
- font-weight: 600;
11
+ font-weight: $am-font-weight-semi-bold;
12
12
  padding: am-unit(3) am-unit(2);
13
13
  text-align: center;
14
14
  }
@@ -8,7 +8,7 @@
8
8
  }
9
9
 
10
10
  .button,
11
- .cancel a {
11
+ .cancel > a {
12
12
  @include am-btn;
13
13
  }
14
14
 
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Comments
3
+ * Active Admin comments
4
+ */
5
+
6
+ div.active_admin_comment {
7
+ margin: 0 16px;
8
+
9
+ & + & {
10
+ border-top: 1px solid am-color(divider);
11
+ padding-top: am-unit(2);
12
+ }
13
+ }
14
+
15
+ .active_admin_comment_meta {
16
+ @include am-color(secondary-text);
17
+ @include am-type-caption;
18
+ }
19
+
20
+ .comments {
21
+ .pagination_information {
22
+ margin: 16px;
23
+ }
24
+
25
+ .empty {
26
+ margin: 16px;
27
+ }
28
+ }
@@ -25,31 +25,50 @@ fieldset.inputs {
25
25
 
26
26
  &.string input,
27
27
  &.stringish input,
28
- &.numberic input {
28
+ &.numeric input {
29
29
  @include am-textfield-input;
30
+
31
+ &[disabled="disabled"] {
32
+ @include am-textfield-input-disabled;
33
+ }
30
34
  }
31
35
 
32
36
  &.email input {
33
37
  @include am-textfield-input-email;
38
+
39
+ &[disabled="disabled"] {
40
+ @include am-textfield-input-disabled;
41
+ }
34
42
  }
35
43
 
36
44
  &.password input {
37
45
  @include am-textfield-input-password;
46
+
47
+ &[disabled="disabled"] {
48
+ @include am-textfield-input-disabled;
49
+ }
38
50
  }
39
51
 
40
52
  &.datepicker input {
41
53
  @include am-textfield-input-date;
54
+
55
+ &[disabled="disabled"] {
56
+ @include am-textfield-input-disabled;
57
+ }
42
58
  }
43
59
 
44
60
  &.text textarea {
45
61
  @include am-textfield-input;
46
62
  @include am-textfield-textarea;
63
+
64
+ &[disabled="disabled"] {
65
+ @include am-textfield-input-disabled;
66
+ }
47
67
  }
48
68
 
49
69
  select + input {
50
70
  margin-top: am-unit(2);
51
71
  }
52
-
53
72
  }
54
73
 
55
74
  .field_with_errors input {
@@ -4,7 +4,7 @@
4
4
  * the top of the page.
5
5
  */
6
6
 
7
- .header {
7
+ #header {
8
8
  @include am-toolbar;
9
9
  @include am-toolbar-primary;
10
10
  padding-right: am-unit(8);
@@ -8,20 +8,38 @@
8
8
  clear: both;
9
9
 
10
10
  .pagination_information,
11
- .download_links {
11
+ .download_links,
12
+ .pagination_per_page {
12
13
  @include am-type-caption;
13
14
  padding: am-unit(2);
14
15
  }
15
16
 
16
- .pagination_information {
17
+ .pagination_information,
18
+ .pagination_per_page {
17
19
  float: left;
18
20
  }
19
21
 
22
+ .pagination_information {
23
+ clear: left;
24
+ }
25
+
20
26
  .download_links {
21
27
  line-height: am-unit(3);
22
28
  float: right;
23
29
  text-align: right;
24
30
  }
31
+
32
+ .pagination_per_page {
33
+ border-bottom: 1px solid #efefef;
34
+ padding: am-unit(1) am-unit(2);
35
+
36
+ select {
37
+ @include am-select-input;
38
+
39
+ height: 34px;
40
+ line-height: 30px;
41
+ }
42
+ }
25
43
  }
26
44
 
27
45
 
@@ -27,6 +27,15 @@ body.update #main_content > form {
27
27
  }
28
28
  }
29
29
 
30
+ .admin_dashboard #wrapper #main_content{
31
+ background-color: transparent;
32
+ border-radius: 0;
33
+ box-shadow: none;
34
+ .columns{
35
+ display: flex;
36
+ }
37
+ }
38
+
30
39
  .panel {
31
40
  & + & {
32
41
  margin-top: 16px;
@@ -12,7 +12,7 @@
12
12
 
13
13
  .scope {
14
14
  font-size: 13px;
15
- font-weight: 500;
15
+ font-weight: $am-font-weight-medium;
16
16
  margin-left: am-unit(2);
17
17
 
18
18
  a {
@@ -2,6 +2,7 @@
2
2
  * Basic Selects
3
3
  */
4
4
 
5
+ .country,
5
6
  .select,
6
7
  .polymorphic_select {
7
8
 
@@ -9,6 +10,9 @@
9
10
  @include am-select-input;
10
11
  }
11
12
 
13
+ select[disabled="disabled"] {
14
+ @include am-select-input-disabled;
15
+ }
12
16
  }
13
17
 
14
18
  select[multiple] {
@@ -6,7 +6,7 @@
6
6
  ////
7
7
 
8
8
  /// The icon displayed within a sortable element's drag handle
9
- $am-sortable-icon: asset-url("active_material/icons/reorder.svg") !default;
9
+ $am-sortable-icon: url('data:image/svg+xml;utf8,<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> <path d="M0 0h24v24H0z" fill="none"/> <path d="M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"/> </svg>') !default;
10
10
  // The size of the draggable handle
11
11
  $am-sortable-handle-size: am-unit(7);
12
12
 
@@ -55,31 +55,39 @@
55
55
  }
56
56
  }
57
57
 
58
- td.col-actions {
59
- @include am-table-cell-actions;
60
-
61
- .table_actions {
62
- @include am-menu-list;
63
- @include am-menu-list-right;
64
- top: 50%;
65
- margin-top: am-unit(-2);
66
- margin-right: am-unit(2);
67
-
68
- a {
69
- @include am-menu-link;
70
- }
71
- }
58
+ // Styles for non-js actions
59
+ td.col-actions a {
60
+ padding: 0 4px
61
+ }
62
+
63
+ .am-js & {
64
+
65
+ td.col-actions {
66
+ @include am-table-cell-actions;
72
67
 
73
- &:hover,
74
- &:focus {
75
68
  .table_actions {
76
- @include am-menu-list-open;
69
+ @include am-menu-list;
70
+ @include am-menu-list-right;
71
+ top: 50%;
72
+ margin-top: am-unit(-2);
73
+ margin-right: am-unit(2);
77
74
 
78
75
  a {
79
- @include am-menu-item-open;
76
+ @include am-menu-link;
80
77
  }
81
78
  }
82
- }
83
79
 
80
+ &:hover,
81
+ &.active {
82
+ .table_actions {
83
+ @include am-menu-list-open;
84
+
85
+ a {
86
+ @include am-menu-item-open;
87
+ }
88
+ }
89
+ }
90
+
91
+ }
84
92
  }
85
93
  }
@@ -7,11 +7,11 @@
7
7
  @include am-tabs;
8
8
  @include am-tabs-list;
9
9
 
10
- > li {
10
+ > li.ui-tabs-tab {
11
11
  @include am-tabs-list-item;
12
12
  }
13
13
 
14
- > li > a {
14
+ > li.ui-tabs-tab > a {
15
15
  @include am-tabs-btn;
16
16
  }
17
17
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  #utility_nav {
7
- background: asset-url("active_material/icons/account_circle.svg") no-repeat;
7
+ background: url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjQ4cHgiIGhlaWdodD0iNDhweCIgdmlld0JveD0iMCAwIDQ4IDQ4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA0OCA0OCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+IDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0yNCw0QzEyLjk1LDQsNCwxMi45NSw0LDI0czguOTUsMjAsMjAsMjBzMjAtOC45NSwyMC0yMFMzNS4wNSw0LDI0LDR6IE0yNCwxMGMzLjMxMSwwLDYsMi42OSw2LDYgYzAsMy4zMi0yLjY4OSw2LTYsNmMtMy4zMSwwLTYtMi42OC02LTZDMTgsMTIuNjksMjAuNjksMTAsMjQsMTB6IE0yNCwzOC40Yy01LjAxLDAtOS40MS0yLjU2MS0xMi02LjQ0YzAuMDUtMy45Nyw4LjAxLTYuMTYsMTItNi4xNiBzMTEuOTM5LDIuMTksMTIsNi4xNkMzMy40MSwzNS44NCwyOS4wMSwzOC40LDI0LDM4LjR6Ii8+IDwvc3ZnPg==') no-repeat;
8
8
  background-size: am-unit(5);
9
9
  width: am-unit(5);
10
10
  height: am-unit(5);
@@ -17,6 +17,7 @@
17
17
  // Increase the hit region
18
18
  &:before {
19
19
  content: "";
20
+ cursor: pointer;
20
21
  position: absolute;
21
22
  width: 90px;
22
23
  height: 50px;
@@ -28,57 +29,49 @@
28
29
  color: #333;
29
30
  }
30
31
 
31
- #current_user,
32
- #logout {
32
+ > li {
33
+ &:first-child {
34
+ margin-top: 45px;
35
+
36
+ &:before {
37
+ content: "";
38
+ border: 7px solid transparent;
39
+ border-bottom-color: #fff;
40
+ top: -14px;
41
+ right: 12px;
42
+ position: absolute;
43
+ }
44
+ }
45
+
46
+ border-top: 1px solid #d9d9d9;
47
+ box-shadow: 0 1px 2px rgba(#000, 0.22);
48
+ width: 200px;
49
+ float: right;
50
+ border-bottom-left-radius: 2px;
51
+ border-bottom-right-radius: 2px;
52
+ background: #efefef;
53
+ text-align: right;
33
54
  clip: rect(0, 0, 0, 0);
34
55
  opacity: 0;
56
+ visibility: hidden;
35
57
  transition: 0.28s all;
36
- }
58
+ position: relative;
37
59
 
38
- &:hover {
39
- #current_user,
40
- #logout {
41
- clip: initial;
42
- opacity: 1;
60
+ a {
61
+ @include am-btn;
43
62
  }
44
63
  }
45
- }
46
64
 
47
- #current_user {
48
- box-shadow: 0 1px 2px rgba(#000, 0.22);
49
- background: #fff;
50
- border-top-right-radius: 2px;
51
- border-top-left-radius: 2px;
52
- padding: 16px;
53
- height: 56px;
54
- width: 200px;
55
- position: absolute;
56
- right: 0;
57
- top: 48px;
58
-
59
- &:before {
60
- content: "";
61
- border: 7px solid transparent;
62
- border-bottom-color: #fff;
63
- top: -14px;
64
- right: 12px;
65
- position: absolute;
65
+ #current_user {
66
+ background: #fff;
67
+ text-align: center;
66
68
  }
67
- }
68
-
69
- #logout {
70
- border-top: 1px solid #d9d9d9;
71
- box-shadow: 0 1px 2px rgba(#000, 0.22);
72
- position: absolute;
73
- width: 200px;
74
- right: 0;
75
- top: 104px;
76
- border-bottom-left-radius: 2px;
77
- border-bottom-right-radius: 2px;
78
- background: #efefef;
79
- text-align: right;
80
69
 
81
- a {
82
- @include am-btn;
70
+ &:hover {
71
+ > li {
72
+ clip: initial;
73
+ opacity: 1;
74
+ visibility: visible;
75
+ }
83
76
  }
84
77
  }
@@ -6,16 +6,7 @@
6
6
  /// @param {number} $amount - An integer value, such as 100
7
7
  /// @return {number} The amount of letter-spacing in ems.
8
8
  @function am-tracking($amount) {
9
- @return ($amount / 1000) + 0em;
10
- }
11
-
12
-
13
- /// Removes units (px, em, etc...) from a given number.
14
- ///
15
- /// @param {number} $number - The numeric value to strip units from.
16
- /// @return {number} A unitless number value.
17
- @function am-strip-units($number) {
18
- @return $number / ($number * 0 + 1);
9
+ @return calc($amount / 1000) + 0em;
19
10
  }
20
11
 
21
12
 
@@ -31,7 +22,7 @@
31
22
  /// @param {number} $baseline [16] - The assumed base font size.
32
23
  /// @return {number} Scalable pixel value in rems.
33
24
  @function am-sp($value, $baseline:16) {
34
- @return (am-strip-units($value) / $baseline) + rem;
25
+ @return calc($value / $baseline) + rem;
35
26
  }
36
27
 
37
28
 
@@ -9,16 +9,6 @@
9
9
  /// in older browsers.
10
10
  /// @param {number} $size - Font size in pixels
11
11
  @mixin am-font-size($size) {
12
- font-size: am-strip-units($size) + 0px;
12
+ font-size: $size;
13
13
  font-size: am-sp($size);
14
14
  }
15
-
16
- /// When using the Webfont.js font loader, only show the loaded font-family
17
- /// when the loader indicates it is active (via the .wf-active) class.
18
- @mixin am-web-font($family, $fallback: sans-serif) {
19
- font-family: $fallback;
20
-
21
- .wf-active & {
22
- @include am-font-family($family);
23
- }
24
- }
@@ -21,7 +21,7 @@ body {
21
21
  body {
22
22
  @include am-type-body-1;
23
23
  @include am-color(text);
24
- @include am-web-font(sans);
24
+ @include am-font-family(sans);
25
25
  margin: 0;
26
26
  }
27
27
 
@@ -20,7 +20,7 @@ $am-btn-active-color: rgba(#999, 0.4) !default;
20
20
  text-transform: uppercase;
21
21
  transition: 0.25s all;
22
22
  user-select: none;
23
- vertical-align: center;
23
+ vertical-align: middle;
24
24
 
25
25
  &:focus {
26
26
  outline: none;
@@ -37,7 +37,7 @@ $am-btn-active-color: rgba(#999, 0.4) !default;
37
37
  @include am-fill(primary);
38
38
  @include am-color(white);
39
39
  box-shadow: 0 0 2px rgba(#000, 0.12);
40
- font-weight: 600;
40
+ font-weight: $am-font-weight-semi-bold;
41
41
  min-width: $am-btn-min-width;
42
42
 
43
43
  &:focus,