mui-sass 0.1.21.1 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e4f307757b516b7d5a0d38c91dcfb27d513ad92
4
- data.tar.gz: 125e0112d71c40f2089307fc641c5d5a4390f085
3
+ metadata.gz: edd408bf90b060770c312c4b0b1697efcb3e5d6c
4
+ data.tar.gz: 8b3daa8a3bad0454a2ee24ea79c1d1c28595b580
5
5
  SHA512:
6
- metadata.gz: 3278d7273b5ad6d672c2f8c0876df3a67a494c8fa4e0c18cf9f7a85cff3ccfed2034d48dedab644a8f62d3417d2eb6a63f94392651234659c9c2d3412686a70b
7
- data.tar.gz: 3ea917949c02b8a9e24ead6bf9657553d199d3608b37517a00604af6af6ddfc455f1105452b4894aaaa4edffaaf9f08d8ff7dda56653ecb990d1758e7b859e56
6
+ metadata.gz: 8206db09bd6da4fb02b75222ba49bd43d0719a28fe01b157f799b1d526016bf9415ed4b3860c9cc5d925d417d908ee383410b1cf034600bfa2162fafa8c6c0c8
7
+ data.tar.gz: 534f6a68045c59464db5fe290bb12b742bc8002076da798a1521c2e6907fcdeff5877ddf69c8ac42830bce4a838ee7090f00ae2bb8cf251385ccbb2e3a43cfaf
data/.travis.yml CHANGED
@@ -3,8 +3,8 @@ language: ruby
3
3
  rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
- - 2.1.6
7
- - 2.2.2
6
+ - 2.1.7
7
+ - 2.2.3
8
8
 
9
9
  before_install: gem install bundler
10
10
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.1.22 (2015-09-18)
2
+
3
+ - Update assets to match upstream version
4
+
5
+ Framework version: MUI v0.1.22
6
+
1
7
  ## 0.1.21.1 (2015-08-24)
2
8
 
3
9
  - Bug Fix: Include proper main JavaScript file
@@ -6,12 +12,15 @@ Framework version: MUI v0.1.21
6
12
 
7
13
  ## 0.1.21 (2015-08-06)
8
14
 
15
+ - Update assets to match upstream version
9
16
  - Update gem's description
10
17
 
11
18
  Framework version: MUI v0.1.21
12
19
 
13
20
  ## 0.1.20 (2015-08-05)
14
21
 
22
+ - Update assets to match upstream version
23
+
15
24
  Framework version: MUI v0.1.20
16
25
 
17
26
  ## 0.1.19 (2015-07-28)
data/README.md CHANGED
@@ -3,11 +3,11 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/mui-sass.svg)](http://badge.fury.io/rb/mui-sass)
4
4
  [![Build Status](https://travis-ci.org/rubysamurai/mui-sass.svg?branch=master)](https://travis-ci.org/rubysamurai/mui-sass)
5
5
 
6
- `mui-sass` is a Sass-powered version of [MUI framework](https://www.muicss.com/) for your Ruby applications. It works with Ruby on Rails, Compass, Sprockets, etc.
6
+ [MUI](https://www.muicss.com/) is a lightweight CSS framework that follows Google's Material Design guidelines
7
7
 
8
- ## Installation
8
+ `mui-sass` is a Sass-powered version of MUI framework for your applications. It works with Ruby on Rails, Compass, Sprockets, etc.
9
9
 
10
- This package provides MUI framework CSS and JavaScript components. HTML Email, React, WebComponents and Design Files are not included.
10
+ `mui-sass` allows to include MUI framework CSS and JavaScript components. HTML Email, React, WebComponents and Design Files are not included.
11
11
 
12
12
  ## Installation
13
13
 
@@ -16,30 +16,30 @@ This package provides MUI framework CSS and JavaScript components. HTML Email, R
16
16
 
17
17
  ### Ruby on Rails
18
18
 
19
- Add this line to your Rails application's Gemfile:
19
+ Open your Rails application's Gemfile and add this line:
20
20
 
21
21
  ```ruby
22
22
  gem 'mui-sass'
23
23
  ```
24
24
 
25
- And then execute `bundle` command to install.
25
+ Save Gemfile and execute `bundle` command to install the gem.
26
26
 
27
- Import `mui` in `app/assets/stylesheets/application.scss`:
27
+ Open `app/assets/stylesheets/application.scss` file and add this line:
28
28
 
29
29
  ```scss
30
30
  @import 'mui';
31
31
  ```
32
32
 
33
- Default Rails installation comes with `.css` file extension for stylesheet assests files, make sure you change it to `.scss` and remove all the `//= require` and `//= require_tree` statements from file.
34
-
35
- Alternatively, to keep original `application.css` file, you can create `custom.scss` file in same folder and import `mui` there.
33
+ > **Note:** Default Rails installation comes with `.css` file extension for stylesheet assests files, make sure you change it to `.scss` and remove all the `*= require_tree .` and `*= require_self` statements from file. Alternatively, to keep original `application.css` file, you can create `custom.scss` file in the same folder and import `mui` there.
36
34
 
37
- Require `mui` javascript in `app/assets/javascripts/application.js`:
35
+ Open `app/assets/javascripts/application.js` file and add this line:
38
36
 
39
37
  ````
40
38
  //= require mui
41
39
  ````
42
40
 
41
+ Restart Rails web server if it was running and now your Rails application is powered by Sass version of MUI framework.
42
+
43
43
  ### Compass
44
44
 
45
45
  To use Compass extension you'll need to install `mui-sass` gem:
@@ -84,7 +84,7 @@ This command will create a new Compass project with `styles.scss` file, which im
84
84
 
85
85
  By default, using `@import 'mui';` and `//= require mui`, all of MUI components are imported.
86
86
 
87
- You can import individual `scss` components like this:
87
+ You can also import individual Sass components.
88
88
 
89
89
  First you need to include core components:
90
90
 
@@ -95,7 +95,8 @@ First you need to include core components:
95
95
  @import 'mui/mixins';
96
96
  ```
97
97
 
98
- Then add component:
98
+ Then include desired Sass component:
99
+
99
100
  ```scss
100
101
  @import 'mui/appbar';
101
102
  @import 'mui/buttons';
@@ -115,8 +116,29 @@ Then add component:
115
116
  @import 'mui/typography';
116
117
  ```
117
118
 
118
- The full set of MUI variables can be found [here](https://github.com/rubysamurai/mui-sass/blob/master/vendor/assets/stylesheets/mui/_variables.scss)
119
+ ### Variables
120
+
121
+ Sass version of MUI framework provides many variables to make customization process convenient. The full set of MUI variables can be found [here](https://github.com/rubysamurai/mui-sass/blob/master/vendor/assets/stylesheets/mui/_variables.scss)
122
+
123
+ To override the variable it must be redefined before the @import directive, like this:
124
+
125
+ ```scss
126
+ $mui-base-font-size: 16px !default;
127
+ @import 'mui';
128
+ ```
129
+
130
+ ## Versioning
131
+
132
+ MUI for Sass follows the upstream version of MUI framework. But last version number may be ahead, in case there is a need to release project specific changes.
133
+
134
+ Please always refer to the [CHANGELOG](https://github.com/rubysamurai/mui-sass/blob/master/CHANGELOG.md) when upgrading.
119
135
 
120
136
  ## Contributing
121
137
 
122
- Fork the project and submit a pull request.
138
+ Anyone is welcome to contribute to MUI Sass. Please [raise an issue](https://github.com/rubysamurai/mui-sass/issues), fork the project, make changes to your forked repository and submit a pull request.
139
+
140
+ ## License
141
+
142
+ MUI © Andres Morey, 2015. Released under the [MIT](https://github.com/muicss/mui/blob/master/LICENSE.txt) license.
143
+
144
+ `mui-sass` © Dmitriy Tarasov, 2015. Released under the [MIT](https://github.com/rubysamurai/mui-sass/blob/master/LICENSE.txt) license.
@@ -1,5 +1,5 @@
1
1
  module Mui
2
2
  module Sass
3
- VERSION = '0.1.21.1'
3
+ VERSION = '0.1.22'
4
4
  end
5
5
  end
@@ -23,7 +23,7 @@ var jqLite = require('./lib/jqLite.js'),
23
23
  util = require('./lib/util.js'),
24
24
  attrKey = 'data-mui-toggle',
25
25
  attrSelector = '[data-mui-toggle="dropdown"]',
26
- openClass = 'mui-open',
26
+ openClass = 'mui-is-open',
27
27
  menuClass = 'mui-dropdown-menu';
28
28
 
29
29
 
@@ -1087,14 +1087,23 @@ function callbackFn(instance, funcName) {
1087
1087
  * @param {String} eventType - The event type.
1088
1088
  * @param {Boolean} bubbles=true - If true, event bubbles.
1089
1089
  * @param {Boolean} cancelable=true = If true, event is cancelable
1090
+ * @param {Object} [data] - Data to add to event object
1090
1091
  */
1091
- function dispatchEventFn(element, eventType, bubbles, cancelable) {
1092
+ function dispatchEventFn(element, eventType, bubbles, cancelable, data) {
1092
1093
  var ev = document.createEvent('HTMLEvents'),
1093
1094
  bubbles = (bubbles !== undefined) ? bubbles : true,
1094
- cancelable = (cancelable !== undefined) ? cancelable : true;
1095
+ cancelable = (cancelable !== undefined) ? cancelable : true,
1096
+ k;
1095
1097
 
1096
1098
  ev.initEvent(eventType, bubbles, cancelable);
1097
- element.dispatchEvent(ev);
1099
+
1100
+ // add data to event object
1101
+ if (data) for (k in data) ev[k] = data[k];
1102
+
1103
+ // dispatch
1104
+ if (element) element.dispatchEvent(ev);
1105
+
1106
+ return ev;
1098
1107
  }
1099
1108
 
1100
1109
 
@@ -1369,7 +1378,7 @@ module.exports = overlayFn;
1369
1378
  var jqLite = require('./lib/jqLite.js'),
1370
1379
  util = require('./lib/util.js'),
1371
1380
  btnClass = 'mui-btn',
1372
- btnFlatClass = 'mui-btn-flat',
1381
+ btnStyleKey = 'data-mui-style',
1373
1382
  btnFloatingClass = 'mui-btn-floating',
1374
1383
  rippleClass = 'mui-ripple-effect',
1375
1384
  animationName = 'mui-btn-inserted';
@@ -1426,7 +1435,9 @@ function eventHandler(ev) {
1426
1435
  radius;
1427
1436
 
1428
1437
  // get height
1429
- if (jqLite.hasClass(buttonEl, btnFloatingClass)) {
1438
+ // TODO: remove class check
1439
+ if (jqLite.hasClass(buttonEl, btnFloatingClass) ||
1440
+ buttonEl.getAttribute(btnStyleKey) === 'fab') {
1430
1441
  diameter = offset.height / 2;
1431
1442
  } else {
1432
1443
  diameter = offset.height;
@@ -1480,7 +1491,11 @@ var jqLite = require('./lib/jqLite.js'),
1480
1491
  attrKey = 'data-mui-toggle',
1481
1492
  attrSelector = '[' + attrKey + '="tab"]',
1482
1493
  controlsAttrKey = 'data-mui-controls',
1483
- activeClass = 'mui-active';
1494
+ activeClass = 'mui-is-active',
1495
+ showstartKey = 'mui.tabs.showstart',
1496
+ showendKey = 'mui.tabs.showend',
1497
+ hidestartKey = 'mui.tabs.hidestart',
1498
+ hideendKey = 'mui.tabs.hideend';
1484
1499
 
1485
1500
 
1486
1501
  /**
@@ -1510,10 +1525,7 @@ function clickHandler(ev) {
1510
1525
  // exit if toggle element is disabled
1511
1526
  if (toggleEl.getAttribute('disabled') !== null) return;
1512
1527
 
1513
- // let event bubble before toggling tab
1514
- setTimeout(function() {
1515
- if (!ev.defaultPrevented) activateTab(toggleEl);
1516
- }, 0);
1528
+ activateTab(toggleEl);
1517
1529
  }
1518
1530
 
1519
1531
 
@@ -1521,35 +1533,76 @@ function clickHandler(ev) {
1521
1533
  * Activate the tab controlled by the toggle element.
1522
1534
  * @param {Element} toggleEl - The toggle element.
1523
1535
  */
1524
- function activateTab(toggleEl) {
1525
- var tabEl = toggleEl.parentNode,
1526
- paneId = toggleEl.getAttribute(controlsAttrKey),
1527
- paneEl = document.getElementById(paneId),
1528
- tabs,
1529
- panes,
1530
- el,
1531
- i;
1536
+ function activateTab(currToggleEl) {
1537
+ var currTabEl = currToggleEl.parentNode,
1538
+ currPaneId = currToggleEl.getAttribute(controlsAttrKey),
1539
+ currPaneEl = document.getElementById(currPaneId),
1540
+ prevTabEl,
1541
+ prevPaneEl,
1542
+ prevPaneId,
1543
+ prevToggleEl,
1544
+ currData,
1545
+ prevData,
1546
+ ev1,
1547
+ ev2,
1548
+ cssSelector;
1532
1549
 
1533
1550
  // raise error if pane doesn't exist
1534
- if (!paneEl) util.raiseError('Tab pane "' + paneId + '" not found');
1551
+ if (!currPaneEl) util.raiseError('Tab pane "' + currPaneId + '" not found');
1535
1552
 
1536
- // de-activate tab siblings
1537
- tabs = tabEl.parentNode.children;
1538
- for (i=tabs.length - 1; i >= 0; i--) {
1539
- el = tabs[i];
1540
- if (el !== tabEl) jqLite.removeClass(el, activeClass);
1541
- }
1542
-
1543
- // de-activate pane siblings
1544
- panes = paneEl.parentNode.children;
1545
- for (i=panes.length - 1; i >= 0; i--) {
1546
- el = panes[i];
1547
- if (el !== paneEl) jqLite.removeClass(el, activeClass);
1553
+ // get previous pane
1554
+ prevPaneEl = getActiveSibling(currPaneEl);
1555
+ prevPaneId = prevPaneEl.id;
1556
+
1557
+ // get previous toggle and tab elements
1558
+ cssSelector = '[' + controlsAttrKey + '="' + prevPaneId + '"]';
1559
+ prevToggleEl = document.querySelectorAll(cssSelector)[0];
1560
+ prevTabEl = prevToggleEl.parentNode;
1561
+
1562
+ // define event data
1563
+ currData = {paneId: currPaneId, relatedPaneId: prevPaneId};
1564
+ prevData = {paneId: prevPaneId, relatedPaneId: currPaneId};
1565
+
1566
+ // dispatch 'hidestart', 'showstart' events
1567
+ ev1 = util.dispatchEvent(prevToggleEl, hidestartKey, true, true, prevData);
1568
+ ev2 = util.dispatchEvent(currToggleEl, showstartKey, true, true, currData);
1569
+
1570
+ // let events bubble
1571
+ setTimeout(function() {
1572
+ // exit if either event was canceled
1573
+ if (ev1.defaultPrevented || ev2.defaultPrevented) return;
1574
+
1575
+ // de-activate previous
1576
+ if (prevTabEl) jqLite.removeClass(prevTabEl, activeClass);
1577
+ if (prevPaneEl) jqLite.removeClass(prevPaneEl, activeClass);
1578
+
1579
+ // activate current
1580
+ jqLite.addClass(currTabEl, activeClass);
1581
+ jqLite.addClass(currPaneEl, activeClass);
1582
+
1583
+ // dispatch 'hideend', 'showend' events
1584
+ util.dispatchEvent(prevToggleEl, hideendKey, true, false, prevData);
1585
+ util.dispatchEvent(currToggleEl, showendKey, true, false, currData);
1586
+ }, 0);
1587
+ }
1588
+
1589
+
1590
+ /**
1591
+ * Get previous active sibling.
1592
+ * @param {Element} el - The anchor element.
1593
+ */
1594
+ function getActiveSibling(el) {
1595
+ var elList = el.parentNode.children,
1596
+ q = elList.length,
1597
+ activeEl = null,
1598
+ tmpEl;
1599
+
1600
+ while (q-- && !activeEl) {
1601
+ tmpEl = elList[q];
1602
+ if (tmpEl !== el && jqLite.hasClass(tmpEl, activeClass)) activeEl = tmpEl
1548
1603
  }
1549
-
1550
- // activate tab and pane
1551
- jqLite.addClass(tabEl, activeClass);
1552
- jqLite.addClass(paneEl, activeClass);
1604
+
1605
+ return activeEl;
1553
1606
  }
1554
1607
 
1555
1608
 
@@ -13,13 +13,21 @@ $mui-btn-box-shadow-active:
13
13
 
14
14
 
15
15
  // ============================================================================
16
- // MAIN-BUTTON-CLASS
16
+ // DEFAULT-BUTTON
17
17
  // ============================================================================
18
18
 
19
19
  .mui-btn {
20
20
  @include mui-node-inserted();
21
21
  @include mui-text("button");
22
22
 
23
+ @include button-variant(
24
+ $mui-btn-default-font-color,
25
+ $mui-btn-default-bg-color);
26
+
27
+ @include button-flat-variant(
28
+ $mui-btn-default-font-color,
29
+ $mui-btn-flat-bg-color-hover);
30
+
23
31
  transition: all 0.2s ease-in-out;
24
32
 
25
33
  // Layout
@@ -42,6 +50,7 @@ $mui-btn-box-shadow-active:
42
50
  vertical-align: middle;
43
51
  white-space: nowrap;
44
52
  user-select: none;
53
+ font-size: $mui-btn-font-size;
45
54
 
46
55
  // For ripples
47
56
  position: relative;
@@ -65,7 +74,7 @@ $mui-btn-box-shadow-active:
65
74
  }
66
75
 
67
76
  &:disabled,
68
- &.mui-disabled {
77
+ &.mui-is-disabled {
69
78
  cursor: $mui-cursor-disabled;
70
79
  pointer-events: none;
71
80
  opacity: 0.60;
@@ -80,21 +89,16 @@ $mui-btn-box-shadow-active:
80
89
 
81
90
 
82
91
  // ============================================================================
83
- // BUTTON-SIZES
92
+ // BUTTON-STYLES
84
93
  // ============================================================================
85
94
 
86
- .mui-btn-lg {
87
- height: $mui-btn-height-lg;
88
- line-height: $mui-btn-height-lg;
89
- }
90
95
 
96
+ // ----------------------------------------------------------------------------
97
+ // FLAT
98
+ // ----------------------------------------------------------------------------
91
99
 
92
-
93
- // ============================================================================
94
- // FLAT-BUTTONS
95
- // ============================================================================
96
-
97
- .mui-btn-flat {
100
+ .mui-btn-flat,
101
+ .mui-btn[data-mui-style="flat"] {
98
102
  background-color: $mui-btn-flat-bg-color;
99
103
 
100
104
  &:hover,
@@ -106,12 +110,12 @@ $mui-btn-box-shadow-active:
106
110
  }
107
111
 
108
112
 
113
+ // ----------------------------------------------------------------------------
114
+ // RAISED
115
+ // ----------------------------------------------------------------------------
109
116
 
110
- // ============================================================================
111
- // RAISED-BUTTONS
112
- // ============================================================================
113
-
114
- .mui-btn-raised {
117
+ .mui-btn-raised,
118
+ .mui-btn[data-mui-style="raised"] {
115
119
  box-shadow: $mui-btn-box-shadow-raised;
116
120
 
117
121
  &:active {
@@ -120,30 +124,51 @@ $mui-btn-box-shadow-active:
120
124
  }
121
125
 
122
126
 
127
+ // ----------------------------------------------------------------------------
128
+ // FLOATING-ACTION-BUTTON-(FAB)
129
+ // ----------------------------------------------------------------------------
130
+
131
+ .mui-btn-floating,
132
+ .mui-btn[data-mui-style="fab"] {
133
+ @extend .mui-btn-raised;
134
+
135
+ // Layout
136
+ position: relative;
137
+ padding: 0;
138
+ width: $mui-btn-fab-diameter;
139
+ height: $mui-btn-fab-diameter;
140
+ line-height: $mui-btn-fab-diameter;
141
+ border-radius: 50%;
142
+ z-index: 1;
143
+ }
144
+
145
+
123
146
 
124
147
  // ============================================================================
125
148
  // BUTTON-COLORS
126
149
  // ============================================================================
127
150
 
128
- .mui-btn-default {
151
+ .mui-btn-primary,
152
+ .mui-btn[data-mui-color="primary"] {
129
153
  @include button-variant(
130
- $mui-btn-default-font-color,
131
- $mui-btn-default-bg-color);
154
+ $mui-btn-primary-font-color,
155
+ $mui-btn-primary-bg-color);
132
156
  @include button-flat-variant(
133
- $mui-btn-default-font-color,
157
+ $mui-btn-primary-bg-color,
134
158
  $mui-btn-flat-bg-color-hover);
135
159
  }
136
160
 
137
- .mui-btn-primary {
161
+ .mui-btn[data-mui-color="dark"] {
138
162
  @include button-variant(
139
- $mui-btn-primary-font-color,
140
- $mui-btn-primary-bg-color);
163
+ $mui-btn-dark-font-color,
164
+ $mui-btn-dark-bg-color);
141
165
  @include button-flat-variant(
142
- $mui-btn-primary-bg-color,
166
+ $mui-btn-dark-bg-color,
143
167
  $mui-btn-flat-bg-color-hover);
144
168
  }
145
169
 
146
- .mui-btn-danger {
170
+ .mui-btn-danger,
171
+ .mui-btn[data-mui-color="danger"] {
147
172
  @include button-variant(
148
173
  $mui-btn-danger-font-color,
149
174
  $mui-btn-danger-bg-color);
@@ -152,7 +177,8 @@ $mui-btn-box-shadow-active:
152
177
  $mui-btn-flat-bg-color-hover);
153
178
  }
154
179
 
155
- .mui-btn-accent {
180
+ .mui-btn-accent,
181
+ .mui-btn[data-mui-color="accent"] {
156
182
  @include button-variant(
157
183
  $mui-btn-accent-font-color,
158
184
  $mui-btn-accent-bg-color);
@@ -164,38 +190,33 @@ $mui-btn-box-shadow-active:
164
190
 
165
191
 
166
192
  // ============================================================================
167
- // FLOATING-BUTTON
193
+ // BUTTON-SIZES
168
194
  // ============================================================================
169
195
 
170
- .mui-btn-floating {
171
- @extend .mui-btn-raised;
172
-
173
- position: relative;
174
- z-index: 1;
175
- width: 55px;
176
- height: 55px;
177
- line-height: 55px;
178
- padding: 0;
179
- border-radius: 50%;
180
- color: $mui-btn-floating-font-color;
181
- background-color: $mui-btn-floating-bg-color;
182
-
183
- &:hover,
184
- &:focus,
185
- &:active {
186
- color: $mui-btn-floating-font-color;
187
- background-color: lighten($mui-btn-floating-bg-color, 5%);
188
- }
196
+ .mui-btn[data-mui-size="small"] {
197
+ height: $mui-btn-height-sm;
198
+ line-height: $mui-btn-height-sm;
199
+ padding: 0 $mui-btn-padding-horizontal-sm;
200
+ font-size: $mui-btn-font-size-sm;
189
201
  }
190
202
 
203
+ .mui-btn-lg,
204
+ .mui-btn[data-mui-size="large"] {
205
+ height: $mui-btn-height-lg;
206
+ line-height: $mui-btn-height-lg;
207
+ padding: 0 $mui-btn-padding-horizontal-lg;
208
+ font-size: $mui-btn-font-size-lg;
209
+ }
191
210
 
211
+ .mui-btn-floating-mini,
212
+ .mui-btn[data-mui-size="small"][data-mui-style="fab"] {
213
+ width: $mui-btn-fab-diameter-sm;
214
+ height: $mui-btn-fab-diameter-sm;
215
+ line-height: $mui-btn-fab-diameter-sm;
216
+ }
192
217
 
193
- // ============================================================================
194
- // FLOATING-BUTTON-SIZES
195
- // ============================================================================
196
-
197
- .mui-btn-floating-mini {
198
- width: 40px;
199
- height: 40px;
200
- line-height: 40px;
218
+ .mui-btn[data-mui-size="large"][data-mui-style="fab"] {
219
+ width: $mui-btn-fab-diameter-lg;
220
+ height: $mui-btn-fab-diameter-lg;
221
+ line-height: $mui-btn-fab-diameter-lg;
201
222
  }
@@ -42,7 +42,7 @@
42
42
  background-clip: padding-box;
43
43
 
44
44
  // open state
45
- &.mui-open {
45
+ &.mui-is-open {
46
46
  display: block;
47
47
  }
48
48
 
@@ -65,7 +65,7 @@
65
65
  }
66
66
  }
67
67
 
68
- > .mui-disabled > a {
68
+ > .mui-is-disabled > a {
69
69
  &,
70
70
  &:hover,
71
71
  &:focus {
@@ -84,7 +84,8 @@
84
84
  }
85
85
 
86
86
  // right align
87
- .mui-dropdown-menu-right {
87
+ .mui-dropdown-menu-right,
88
+ .mui-dropdown-menu[data-mui-align="right"] {
88
89
  left: auto;
89
90
  right: 0;
90
91
  }
@@ -83,7 +83,7 @@ input[type="checkbox"]:disabled {
83
83
  }
84
84
 
85
85
  textarea.mui-form-control {
86
- height: auto; // Reset height for <textarea>'s
86
+ height: auto; // Reset height for <textarea>s
87
87
  }
88
88
 
89
89
  input.mui-form-control:focus {
@@ -16,6 +16,7 @@
16
16
  }
17
17
  }
18
18
 
19
- .mui-container-fluid {
19
+ .mui-container-fluid,
20
+ .mui-container[data-mui-fluid="true"] {
20
21
  @include container-fixed;
21
22
  }
@@ -5,7 +5,7 @@
5
5
  // ============================================================================
6
6
  // RIPPLE
7
7
  // ============================================================================
8
- .mui-ripple-effect{
8
+ .mui-ripple-effect {
9
9
  position: absolute;
10
10
  border-radius: 50%;
11
11
  pointer-events: none;
@@ -14,14 +14,14 @@
14
14
  }
15
15
 
16
16
  @keyframes mui-ripple-animation {
17
- from {
18
- transform: scale(1);
19
- opacity: 0.4;
20
- }
21
- to {
22
- transform: scale(100);
23
- opacity: 0;
24
- }
17
+ from {
18
+ transform: scale(1);
19
+ opacity: 0.4;
20
+ }
21
+ to {
22
+ transform: scale(100);
23
+ opacity: 0;
24
+ }
25
25
  }
26
26
 
27
27
 
@@ -30,26 +30,32 @@
30
30
  // ============================================================================
31
31
  // BUTTON-SPECIFIC STYLES
32
32
  // ============================================================================
33
- .mui-btn-default > .mui-ripple-effect {
33
+ .mui-btn-default > .mui-ripple-effect,
34
+ .mui-btn > .mui-ripple-effect {
34
35
  background-color: $mui-btn-default-ripple-color;
35
36
  }
36
37
 
37
- .mui-btn-primary > .mui-ripple-effect {
38
+ .mui-btn-primary > .mui-ripple-effect,
39
+ .mui-btn[data-mui-color="primary"] > .mui-ripple-effect {
38
40
  background-color: $mui-btn-primary-ripple-color;
39
41
  }
40
42
 
41
- .mui-btn-danger > .mui-ripple-effect {
43
+ .mui-btn[data-mui-color="dark"] > .mui-ripple-effect {
44
+ background-color: $mui-btn-dark-ripple-color;
45
+ }
46
+
47
+ .mui-btn-danger > .mui-ripple-effect,
48
+ .mui-btn[data-mui-color="danger"] > .mui-ripple-effect {
42
49
  background-color: $mui-btn-danger-ripple-color;
43
50
  }
44
51
 
45
- .mui-btn-accent > .mui-ripple-effect {
52
+ .mui-btn-accent > .mui-ripple-effect,
53
+ .mui-btn[data-mui-color="accent"] > .mui-ripple-effect {
46
54
  background-color: $mui-btn-accent-ripple-color;
47
55
  }
48
56
 
49
- .mui-btn-flat > .mui-ripple-effect {
57
+ .mui-btn-flat > .mui-ripple-effect,
58
+ .mui-btn[data-mui-style="flat"] > .mui-ripple-effect {
50
59
  background-color: $mui-btn-flat-ripple-color;
51
60
  }
52
61
 
53
- .mui-btn-floating > .mui-ripple-effect {
54
- background-color: $mui-btn-floating-ripple-color;
55
- }
@@ -38,7 +38,8 @@ th {
38
38
  }
39
39
 
40
40
  // Bordered style
41
- &.mui-table-bordered > tbody > tr > td {
41
+ &.mui-table-bordered > tbody > tr > td,
42
+ &[data-mui-borders="true"] > tbody > tr > td {
42
43
  border-bottom: 1px solid $mui-table-border-color;
43
44
  }
44
45
  }
@@ -30,7 +30,7 @@
30
30
  }
31
31
  }
32
32
 
33
- &.mui-active {
33
+ &.mui-is-active {
34
34
  border-bottom: 2px solid $mui-tab-border-color-active;
35
35
 
36
36
  > a {
@@ -64,7 +64,7 @@
64
64
  > .mui-tab-pane {
65
65
  display: none;
66
66
 
67
- &.mui-active {
67
+ &.mui-is-active {
68
68
  display: block;
69
69
  }
70
70
  }
@@ -86,14 +86,32 @@ $mui-base-font-smoothing: false;
86
86
  // ============================================================================
87
87
 
88
88
  $mui-btn-height: 36px !default;
89
+ $mui-btn-height-sm: $mui-btn-height * 0.85 !default;
89
90
  $mui-btn-height-lg: $mui-btn-height * 1.5 !default;
90
91
 
91
92
  $mui-btn-border-radius: $mui-border-radius-default !default;
93
+
92
94
  $mui-btn-padding-horizontal: 26px !default;
95
+ $mui-btn-padding-horizontal-sm: 16px !default;
96
+ $mui-btn-padding-horizontal-lg: $mui-btn-padding-horizontal !default;
97
+
98
+ $mui-btn-font-size: 14px !default;
99
+ $mui-btn-font-size-sm: 13px !default;
100
+ $mui-btn-font-size-lg: $mui-btn-font-size !default;
101
+
102
+ $mui-btn-fab-diameter: 55px !default;
103
+ $mui-btn-fab-diameter-sm: 44px !default;
104
+ $mui-btn-fab-diameter-lg: 75px !default;
93
105
 
94
106
  $mui-btn-margin-vertical: 6px !default;
95
107
  $mui-btn-spacing-horizontal: 8px !default;
96
108
 
109
+
110
+
111
+ // ----------------------------------------------------------------------------
112
+ // COLORS
113
+ // ----------------------------------------------------------------------------
114
+
97
115
  $mui-btn-default-bg-color: mui-color('white') !default;
98
116
  $mui-btn-default-font-color: $mui-base-font-color !default;
99
117
  $mui-btn-default-ripple-color: darken(mui-color('white'), 35%) !default;
@@ -106,6 +124,10 @@ $mui-btn-danger-bg-color: $mui-danger-color !default;
106
124
  $mui-btn-danger-font-color: mui-color('white') !default;
107
125
  $mui-btn-danger-ripple-color: mui-color('white') !default;
108
126
 
127
+ $mui-btn-dark-bg-color: mui-color('grey', '800') !default;
128
+ $mui-btn-dark-font-color: mui-color('white') !default;
129
+ $mui-btn-dark-ripple-color: mui-color('white') !default;
130
+
109
131
  $mui-btn-accent-bg-color: $mui-accent-color !default;
110
132
  $mui-btn-accent-font-color: mui-color('white') !default;
111
133
  $mui-btn-accent-ripple-color: mui-color('white') !default;
@@ -114,10 +136,6 @@ $mui-btn-flat-bg-color: transparent !default;
114
136
  $mui-btn-flat-bg-color-hover: darken(mui-color('white'), 5%) !default;
115
137
  $mui-btn-flat-ripple-color: darken(mui-color('white'), 35%) !default;
116
138
 
117
- $mui-btn-floating-bg-color: $mui-accent-color !default;
118
- $mui-btn-floating-font-color: mui-color('white') !default;
119
- $mui-btn-floating-ripple-color: mui-color('white') !default;
120
-
121
139
 
122
140
 
123
141
 
@@ -4,15 +4,12 @@
4
4
 
5
5
  &:hover,
6
6
  &:focus,
7
- &:active,
8
- .mui-open > &.mui-dropdown-toggle {
7
+ &:active {
9
8
  color: $font-color;
10
9
  background-color: lighten($bg-color, 5%);
11
10
  }
12
11
 
13
- &[disabled],
14
- fieldset[disabled] & {
15
- &,
12
+ &[disabled] {
16
13
  &:hover,
17
14
  &:focus,
18
15
  &:active {
@@ -23,21 +20,19 @@
23
20
  }
24
21
 
25
22
  @mixin button-flat-variant($font-color, $bg-color-hover) {
26
- &.mui-btn-flat {
23
+ &.mui-btn-flat,
24
+ &[data-mui-style="flat"] {
27
25
  color: $font-color;
28
26
  background-color: transparent;
29
27
 
30
28
  &:hover,
31
29
  &:focus,
32
- &:active,
33
- .mui-open > &.mui-dropdown-toggle {
30
+ &:active {
34
31
  color: $font-color;
35
32
  background-color: $bg-color-hover;
36
33
  }
37
34
 
38
- &[disabled],
39
- fieldset[disabled] & {
40
- &,
35
+ &[disabled] {
41
36
  &:hover,
42
37
  &:focus,
43
38
  &:active {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mui-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21.1
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Tarasov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass