Skip to content

Commit 4ed6937

Browse files
authored
Merge pull request #111 from Daemonite/backfilling-bootstrap-v4.0.0-alpha.5
Backfilling bootstrap v4.0.0 alpha.5
2 parents 88cb358 + 3cea463 commit 4ed6937

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1468
-895
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Because these components will require additional markup (some may require additi
2323

2424
## Supported Bootstrap 4 Components
2525

26-
Currently based on __Bootstrap v4.0.0-alpha.4__.
26+
Currently based on __Bootstrap v4.0.0-alpha.5__.
2727

2828
| Bootstrap 4 Components | Equivalent Material Design Components |
2929
| --- | --- |

assets/js/src.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ var FloatingLabel = function ($) {
121121

122122
/*!
123123
* navigation drawer
124-
* based on bootstrap's (v4.0.0-alpha.4) modal.js
124+
* based on bootstrap's (v4.0.0-alpha.5) modal.js
125125
*/
126126
var NavDrawer = function ($) {
127127
// constants >>>
@@ -476,7 +476,7 @@ var NavDrawer = function ($) {
476476

477477
/*!
478478
* tab indicator animation
479-
* requires bootstrap's (v4.0.0-alpha.4) tab.js
479+
* requires bootstrap's (v4.0.0-alpha.5) tab.js
480480
*/
481481
var TabSwitch = function ($) {
482482
// constants >>>
@@ -620,7 +620,7 @@ var TabSwitch = function ($) {
620620

621621
/*!
622622
* global util js
623-
* based on bootstrap's (v4.0.0-alpha.4) util.js
623+
* based on bootstrap's (v4.0.0-alpha.5) util.js
624624
*/
625625
var Util = function ($) {
626626
var transition = false;
@@ -712,7 +712,7 @@ var Util = function ($) {
712712
},
713713
getUID: function getUID(prefix) {
714714
do {
715-
prefix += ~~(Math.random() * 1000000);
715+
prefix += ~ ~(Math.random() * 1000000);
716716
} while (document.getElementById(prefix));
717717
return prefix;
718718
},

assets/js/src/navdrawer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* navigation drawer
3-
* based on bootstrap's (v4.0.0-alpha.4) modal.js
3+
* based on bootstrap's (v4.0.0-alpha.5) modal.js
44
*/
55
const NavDrawer = (($) => {
66
// constants >>>

assets/js/src/tab-switch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* tab indicator animation
3-
* requires bootstrap's (v4.0.0-alpha.4) tab.js
3+
* requires bootstrap's (v4.0.0-alpha.5) tab.js
44
*/
55
const TabSwitch = (($) => {
66
// constants >>>

assets/js/src/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* global util js
3-
* based on bootstrap's (v4.0.0-alpha.4) util.js
3+
* based on bootstrap's (v4.0.0-alpha.5) util.js
44
*/
55
const Util = (($) => {
66
let transition = false;

assets/sass/_mixins.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import "mixins/background-variant";
2+
@import "mixins/border-radius";
23
@import "mixins/breakpoint";
34
@import "mixins/clearfix";
45
@import "mixins/form";

assets/sass/_utilities.scss

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
@import "utilities/material-icons";
2-
@import "utilities/utility-background";
3-
@import "utilities/utility-clearfix";
4-
@import "utilities/utility-display";
5-
@import "utilities/utility-pull";
6-
@import "utilities/utility-screenreader";
7-
@import "utilities/utility-spacing";
8-
@import "utilities/utility-text";
9-
@import "utilities/utility-visibility";
10-
@import "utilities/waves";
1+
// bootstrap
2+
@import "utilities/align";
3+
@import "utilities/border";
4+
@import "utilities/background";
5+
@import "utilities/clearfix";
6+
@import "utilities/display";
7+
@import "utilities/float";
8+
@import "utilities/screenreader";
9+
@import "utilities/spacing";
10+
@import "utilities/text";
11+
@import "utilities/visibility";
12+
13+
// material
14+
@import "utilities/material-icons";
15+
@import "utilities/waves";

assets/sass/_variables.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
@mixin _assert-ascending($map, $map-name) {
2+
$prev-key: null;
3+
$prev-num: null;
4+
5+
@each $key, $num in $map {
6+
@if $prev-num == null {
7+
} @else if not comparable($num, $prev-num) {
8+
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
9+
} @else if $num <= $prev-num {
10+
@warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !";
11+
}
12+
13+
$prev-key: $key;
14+
$prev-num: $num;
15+
}
16+
}
17+
118
@import "variables/animation";
219
@import "variables/colour";
320
@import "variables/elevation-shadow";

assets/sass/base/_base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* includes normalize and reboot from bootstrap's (v4.0.0-alpha.4)
2+
* includes normalize and reboot from bootstrap's (v4.0.0-alpha.5)
33
*/
44

55
/*! normalize.css v4.0.0 | MIT License | github.com/necolas/normalize.css */

assets/sass/bootstrap/_alert.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
.alert {
22
background-color: $card-bg;
33
border: 0;
4-
border-radius: $border-radius;
54
box-shadow: map-get($card-elevation-shadow, shadow);
65
display: block;
76
margin-bottom: $card-margin-bottom;
87
padding: $card-spacer-inner-y $card-spacer-inner-x;
98
position: relative;
109
z-index: map-get($card-elevation-shadow, elevation);
10+
@include border-radius($border-radius);
1111
}
1212

1313
// colour

assets/sass/bootstrap/_code.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ samp {
77

88
code {
99
background-color: $code-bg;
10-
border-radius: $border-radius;
1110
color: $code-color;
1211
font-size: $code-font-size;
1312
padding: $code-padding;
13+
@include border-radius($border-radius);
1414
}
1515

1616
kbd {
1717
background-color: $kbd-bg;
18-
border-radius: $border-radius;
1918
color: $kbd-color;
2019
font-size: $code-font-size;
2120
padding: $code-padding;
21+
@include border-radius($border-radius);
2222

2323
kbd {
2424
font-size: 100%;
@@ -28,12 +28,12 @@ kbd {
2828

2929
pre {
3030
background-color: $pre-bg;
31-
border-radius: $border-radius;
3231
color: $pre-color;
3332
display: block;
3433
font-size: $code-font-size;
3534
margin-top: 0;
3635
margin-bottom: $pre-margin-bottom;
36+
@include border-radius($border-radius);
3737

3838
code {
3939
background-color: transparent;

assets/sass/bootstrap/_image.scss

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
.img-circle {
2-
border-radius: 50%;
3-
}
4-
51
.img-fluid {
62
@include img-fluid;
73
}
84

9-
.img-rounded {
10-
border-radius: $border-radius;
11-
}
12-
135
.img-thumbnail {
146
box-shadow: $thumbnail-box-shadow;
15-
@include img-fluid(inline-block);
7+
@include img-fluid;
168
}
179

1810
//

assets/sass/bootstrap/_nav.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
}
5555

5656
.nav-link {
57-
border-radius: $border-radius;
5857
color: $nav-link-color;
5958
display: block;
6059
padding: $nav-link-padding;
60+
@include border-radius($border-radius);
6161
@include transition-standard(background-color, color);
6262

6363
// active, focus, hover

assets/sass/bootstrap/_pagination.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
.page-link {
1414
background-color: transparent;
15-
border-radius: $border-radius;
1615
color: $btn-color;
1716
display: block;
1817
float: left;
@@ -25,6 +24,7 @@
2524
text-align: center;
2625
vertical-align: middle;
2726
white-space: nowrap;
27+
@include border-radius($border-radius);
2828
@include transition-standard(background-color, color);
2929

3030
// active, focus, hover

assets/sass/bootstrap/_popover.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
background-clip: padding-box;
88
background-color: $dialog-content-bg;
99
border: 1px solid transparent;
10-
border-radius: $border-radius;
1110
box-shadow: map-get($dialog-elevation-shadow, shadow);
1211
display: block;
1312
font-size: $font-size-base;
@@ -16,6 +15,7 @@
1615
top: 0;
1716
left: 0;
1817
z-index: map-get($dialog-elevation-shadow, elevation);
18+
@include border-radius($border-radius);
1919
@include reset-text;
2020

2121
&.bs-tether-element-attached-bottom,

assets/sass/material.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//
1212
// bootstrap components
13-
// components covered in bootstrap's (v4.0.0-alpha.3) css but not in material design guidelines
13+
// components covered in bootstrap's (v4.0.0-alpha.5) css but not in material design guidelines
1414
//
1515
@import "bootstrap/alert";
1616
@import "bootstrap/animation";

assets/sass/material/_button.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
background-color: $btn-bg;
33
background-image: none;
44
border: 0;
5-
border-radius: $border-radius;
65
box-shadow: map-get($btn-elevation-shadow, shadow);
76
color: $btn-color;
87
cursor: pointer;
@@ -21,11 +20,11 @@
2120
vertical-align: middle;
2221
white-space: nowrap;
2322
z-index: map-get($btn-elevation-shadow, elevation);
23+
@include border-radius($border-radius);
2424
@include transition-standard(background-color, box-shadow, color);
2525

2626
&::before {
2727
background-color: $btn-focus-overlay;
28-
border-radius: $border-radius;
2928
content: "";
3029
display: block;
3130
opacity: 0;
@@ -35,6 +34,7 @@
3534
bottom: 0;
3635
left: 0;
3736
z-index: -1;
37+
@include border-radius($border-radius);
3838
@include transition-standard(opacity);
3939
}
4040

@@ -95,14 +95,14 @@
9595
.dropdown.open > & {
9696
&.dropdown-toggle,
9797
&.dropdown-toggle::before {
98-
border-radius: $border-radius $border-radius 0 0;
98+
@include border-bottom-radius(0);
9999
}
100100
}
101101

102102
.dropup.open > & {
103103
&.dropdown-toggle,
104104
&.dropdown-toggle::before {
105-
border-radius: 0 0 $border-radius $border-radius;
105+
@include border-top-radius(0);
106106
}
107107
}
108108
}

assets/sass/material/_card.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
.card {
22
background-color: $card-bg;
33
border: 0;
4-
border-radius: $border-radius;
54
box-shadow: map-get($card-elevation-shadow, shadow);
65
display: block;
76
margin-bottom: $card-margin-bottom;
87
position: relative;
8+
@include border-radius($border-radius);
99
z-index: map-get($card-elevation-shadow, elevation);
1010
}
1111

@@ -52,11 +52,11 @@
5252
@include clearfix;
5353

5454
&:first-child {
55-
border-radius: $border-radius $border-radius 0 0;
55+
@include border-top-radius($border-radius);
5656
}
5757

5858
&:last-child {
59-
border-radius: 0 0 $border-radius $border-radius;
59+
@include border-bottom-radius($border-radius);
6060
}
6161

6262
.btn {
@@ -119,7 +119,7 @@
119119
padding: $card-spacer-inner-y $card-spacer-inner-x;
120120

121121
&:last-child {
122-
border-radius: 0 0 $border-radius $border-radius;
122+
@include border-bottom-radius($border-radius);
123123
}
124124
}
125125

@@ -134,7 +134,7 @@
134134
@include clearfix;
135135

136136
&:first-child {
137-
border-radius: $border-radius $border-radius 0 0;
137+
@include border-top-radius($border-radius);
138138
}
139139

140140
> :last-child {
@@ -146,15 +146,15 @@
146146
// image
147147
//
148148
.card-img {
149-
border-radius: $border-radius;
149+
@include border-radius($border-radius);
150150
}
151151

152152
.card-img-bottom {
153-
border-radius: 0 0 $border-radius $border-radius;
153+
@include border-bottom-radius($border-radius);
154154
}
155155

156156
.card-img-top {
157-
border-radius: $border-radius $border-radius 0 0;
157+
@include border-top-radius($border-radius);
158158
}
159159

160160
//

assets/sass/material/_dialog.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@
9090
background-clip: padding-box;
9191
background-color: $dialog-content-bg;
9292
border: 1px solid transparent;
93-
border-radius: $border-radius;
9493
box-shadow: map-get($dialog-elevation-shadow, shadow);
9594
outline: 0;
9695
position: relative;
9796
vertical-align: baseline;
97+
@include border-radius($border-radius);
9898
}
9999

100100
.dialog-footer,

0 commit comments

Comments
 (0)