Skip to content

Commit

Permalink
Adds container option for sticky, adds checkbox vars
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Sep 20, 2016
1 parent 1f04853 commit b008a19
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions RELEASE-NOTES.md
Expand Up @@ -6,6 +6,8 @@
- **Search** - Fixed issue where pressing "up" key when no results selected would cause bottom result to be selected

**Enhancements**
- **Checkbox** - Adds additional variables for styling toggle checkbox on/off state
- **Sticky** - Adds `container` setting. This can be used to specify the offsetParent of the sticky element and avoid having to calculate on initialization (improving performance)
- **Progress** - Progress now includes transitionEnd failback for progress bar animations, this will prevent labels from continuing to be updated if the `transitionEnd` css callback does not fire correctly
- **Transition** - You can now specify `data-display` to specify the final display state for an animation in cases that it is detected incorrectly (you can also pass in as a setting)

Expand Down
4 changes: 3 additions & 1 deletion src/definitions/modules/checkbox.less
Expand Up @@ -15,7 +15,7 @@
@type : 'module';
@element : 'checkbox';

@import (multiple) '../../theme.config';
@import (multiple) '../../theme.config.import.less';

/*******************************
Checkbox
Expand Down Expand Up @@ -500,6 +500,7 @@
top: @toggleLaneVerticalOffset;

background: @toggleLaneBackground;
box-shadow: @toggleLaneBoxShadow;
width: @toggleLaneWidth;
height: @toggleLaneHeight;
border-radius: @toggleHandleRadius;
Expand Down Expand Up @@ -556,6 +557,7 @@
.ui.toggle.checkbox input:checked ~ .box:after,
.ui.toggle.checkbox input:checked ~ label:after {
left: @toggleOnOffset;
box-shadow: @toggleOnHandleBoxShadow;
}


Expand Down
8 changes: 7 additions & 1 deletion src/definitions/modules/sticky.js
Expand Up @@ -135,7 +135,12 @@ $.fn.sticky = function(parameters) {
},

determineContainer: function() {
$container = $module.offsetParent();
if(settings.container) {
$container = $(settings.container);
}
else {
$container = $module.offsetParent();
}
},

determineContext: function() {
Expand Down Expand Up @@ -882,6 +887,7 @@ $.fn.sticky.settings = {
pushing : false,

context : false,
container : false,

// Context to watch scroll events
scrollContext : window,
Expand Down

0 comments on commit b008a19

Please sign in to comment.