Skip to content

Commit

Permalink
Merge pull request kenwheeler#2090 from leggomuhgreggo/master
Browse files Browse the repository at this point in the history
Add slick-dotted to slider when dots enable so spacing is triggered instead of default
  • Loading branch information
leggomuhgreggo committed Feb 2, 2016
2 parents a06adb5 + 3cf605d commit a5f823b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions slick/slick-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,21 @@
}

/* Dots */
.slick-slider
.slick-dotted.slick-slider
{
margin-bottom: 30px;
}

.slick-dots
{
position: absolute;
bottom: -45px;
bottom: -25px;

display: block;

width: 100%;
padding: 0;
margin: 0;

list-style: none;

Expand Down
5 changes: 3 additions & 2 deletions slick/slick-theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,18 @@

/* Dots */

.slick-slider {
.slick-dotted .slick-slider {
margin-bottom: 30px;
}

.slick-dots {
position: absolute;
bottom: -45px;
bottom: -25px;
list-style: none;
display: block;
text-align: center;
padding: 0;
margin: 0;
width: 100%;
li {
position: relative;
Expand Down
5 changes: 3 additions & 2 deletions slick/slick-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,18 @@ $slick-opacity-not-active: 0.25 !default;

/* Dots */

.slick-slider {
.slick-dotted.slick-slider {
margin-bottom: 30px;
}

.slick-dots {
position: absolute;
bottom: -45px;
bottom: -25px;
list-style: none;
display: block;
text-align: center;
padding: 0;
margin: 0;
width: 100%;
li {
position: relative;
Expand Down
3 changes: 3 additions & 0 deletions slick/slick.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@

if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

_.$slider.addClass('slick-dotted');

dot = $('<ul />').addClass(_.options.dotsClass);

for (i = 0; i <= _.getDotCount(); i += 1) {
Expand Down Expand Up @@ -895,6 +897,7 @@

_.$slider.removeClass('slick-slider');
_.$slider.removeClass('slick-initialized');
_.$slider.removeClass('slick-dotted');

_.unslicked = true;

Expand Down

0 comments on commit a5f823b

Please sign in to comment.