Skip to content

Commit

Permalink
Merge branch 'v4-dev' into v4-dev-martijncuppens-progress-transition
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhlauke committed Jan 14, 2019
2 parents 018b13f + e2a6f29 commit 47ff93f
Show file tree
Hide file tree
Showing 12 changed files with 135 additions and 122 deletions.
22 changes: 9 additions & 13 deletions .gitignore
@@ -1,13 +1,12 @@
# Ignore docs files
_gh_pages
_site
site/docs/**/dist/
/_gh_pages/
/site/.jekyll-metadata
/site/docs/**/dist/

# Ignore ruby files
.ruby-version
.bundle
vendor/cache
vendor/bundle
# Ignore ruby/bundler files
/.bundle/
/vendor/
/.ruby-version

# Numerous always-ignore extensions
*.diff
Expand Down Expand Up @@ -39,9 +38,6 @@ Thumbs.db
.komodotools
*.komodoproject

# Jekyll metadata
docs/.jekyll-metadata

# Folders to ignore
node_modules
js/coverage
/js/coverage/
/node_modules/
4 changes: 3 additions & 1 deletion js/src/carousel.js
Expand Up @@ -268,7 +268,9 @@ class Carousel {
.on(Event.MOUSELEAVE, (event) => this.cycle(event))
}

this._addTouchEventListeners()
if (this._config.touch) {
this._addTouchEventListeners()
}
}

_addTouchEventListeners() {
Expand Down
17 changes: 15 additions & 2 deletions js/tests/unit/carousel.js
Expand Up @@ -948,7 +948,7 @@ $(function () {
$textArea.trigger(eventKeyDown)
})

QUnit.test('Should not go to the next item when the carousel is not visible', function (assert) {
QUnit.test('should not go to the next item when the carousel is not visible', function (assert) {
assert.expect(2)
var done = assert.async()
var html = '<div id="myCarousel" class="carousel slide" data-interval="50" style="display: none;">' +
Expand Down Expand Up @@ -985,7 +985,7 @@ $(function () {
}, 80)
})

QUnit.test('Should not go to the next item when the parent of the carousel is not visible', function (assert) {
QUnit.test('should not go to the next item when the parent of the carousel is not visible', function (assert) {
assert.expect(2)
var done = assert.async()
var html = '<div id="parent" style="display: none;">' +
Expand Down Expand Up @@ -1317,4 +1317,17 @@ $(function () {
done()
}, 5)
})

QUnit.test('should not add touch event listeners when touch option set to false', function (assert) {
assert.expect(1)

var spy = sinon.spy(Carousel.prototype, '_addTouchEventListeners')
var $carousel = $('<div class="carousel" data-ride="carousel" data-touch="false"></div>')

$carousel.appendTo('#qunit-fixture')
$carousel.bootstrapCarousel()

assert.strictEqual(spy.called, false)
spy.restore()
})
})
3 changes: 1 addition & 2 deletions scss/_carousel.scss
Expand Up @@ -127,8 +127,7 @@
display: inline-block;
width: $carousel-control-icon-width;
height: $carousel-control-icon-width;
background: transparent no-repeat center center;
background-size: 100% 100%;
background: no-repeat 50% / 100% 100%;
}
.carousel-control-prev-icon {
background-image: $carousel-control-prev-icon-bg;
Expand Down
4 changes: 1 addition & 3 deletions scss/_custom-forms.scss
Expand Up @@ -95,9 +95,7 @@
width: $custom-control-indicator-size;
height: $custom-control-indicator-size;
content: "";
background-repeat: no-repeat;
background-position: center center;
background-size: $custom-control-indicator-bg-size;
background: no-repeat 50% / #{$custom-control-indicator-bg-size};
}
}

Expand Down
4 changes: 3 additions & 1 deletion scss/_dropdown.scss
Expand Up @@ -7,6 +7,8 @@
}

.dropdown-toggle {
white-space: nowrap;

// Generate the caret automatically
@include caret;
}
Expand All @@ -22,7 +24,7 @@
min-width: $dropdown-min-width;
padding: $dropdown-padding-y 0;
margin: $dropdown-spacer 0 0; // override default ul
font-size: $font-size-base; // Redeclare because nesting can cause inheritance issues
font-size: $dropdown-font-size;
color: $body-color;
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
list-style: none;
Expand Down
92 changes: 40 additions & 52 deletions scss/_popover.scss
Expand Up @@ -40,21 +40,18 @@

> .arrow {
bottom: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
}

> .arrow::before,
> .arrow::after {
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
}

> .arrow::before {
bottom: 0;
border-top-color: $popover-arrow-outer-color;
}
&::before {
bottom: 0;
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
border-top-color: $popover-arrow-outer-color;
}

> .arrow::after {
bottom: $popover-border-width;
border-top-color: $popover-arrow-color;
&::after {
bottom: $popover-border-width;
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
border-top-color: $popover-arrow-color;
}
}
}

Expand All @@ -66,21 +63,18 @@
width: $popover-arrow-height;
height: $popover-arrow-width;
margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
}

> .arrow::before,
> .arrow::after {
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
}

> .arrow::before {
left: 0;
border-right-color: $popover-arrow-outer-color;
}
&::before {
left: 0;
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
border-right-color: $popover-arrow-outer-color;
}

> .arrow::after {
left: $popover-border-width;
border-right-color: $popover-arrow-color;
&::after {
left: $popover-border-width;
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
border-right-color: $popover-arrow-color;
}
}
}

Expand All @@ -89,21 +83,18 @@

> .arrow {
top: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
}

> .arrow::before,
> .arrow::after {
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
}

> .arrow::before {
top: 0;
border-bottom-color: $popover-arrow-outer-color;
}
&::before {
top: 0;
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
border-bottom-color: $popover-arrow-outer-color;
}

> .arrow::after {
top: $popover-border-width;
border-bottom-color: $popover-arrow-color;
&::after {
top: $popover-border-width;
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
border-bottom-color: $popover-arrow-color;
}
}

// This will remove the popover-header's border just below the arrow
Expand All @@ -127,21 +118,18 @@
width: $popover-arrow-height;
height: $popover-arrow-width;
margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
}

> .arrow::before,
> .arrow::after {
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
}

> .arrow::before {
right: 0;
border-left-color: $popover-arrow-outer-color;
}
&::before {
right: 0;
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
border-left-color: $popover-arrow-outer-color;
}

> .arrow::after {
right: $popover-border-width;
border-left-color: $popover-arrow-color;
&::after {
right: $popover-border-width;
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
border-left-color: $popover-arrow-color;
}
}
}

Expand Down
4 changes: 0 additions & 4 deletions scss/_tables.scss
Expand Up @@ -23,10 +23,6 @@
tbody + tbody {
border-top: (2 * $table-border-width) solid $table-border-color;
}

.table {
background-color: $body-bg;
}
}


Expand Down

0 comments on commit 47ff93f

Please sign in to comment.