Browse Source

Adds container option for sticky, adds checkbox vars

pull/4625/head
Jack Lukic 8 years ago
parent
commit
b008a19de8
3 changed files with 12 additions and 2 deletions
  1. 2
      RELEASE-NOTES.md
  2. 4
      src/definitions/modules/checkbox.less
  3. 8
      src/definitions/modules/sticky.js

2
RELEASE-NOTES.md

@ -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)

4
src/definitions/modules/checkbox.less

@ -15,7 +15,7 @@
@type : 'module';
@element : 'checkbox';
@import (multiple) '../../theme.config';
@import (multiple) '../../theme.config.import.less';
/*******************************
Checkbox
@ -500,6 +500,7 @@
top: @toggleLaneVerticalOffset;
background: @toggleLaneBackground;
box-shadow: @toggleLaneBoxShadow;
width: @toggleLaneWidth;
height: @toggleLaneHeight;
border-radius: @toggleHandleRadius;
@ -556,6 +557,7 @@
.ui.toggle.checkbox input:checked ~ .box:after,
.ui.toggle.checkbox input:checked ~ label:after {
left: @toggleOnOffset;
box-shadow: @toggleOnHandleBoxShadow;
}

8
src/definitions/modules/sticky.js

@ -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() {
@ -882,6 +887,7 @@ $.fn.sticky.settings = {
pushing : false,
context : false,
container : false,
// Context to watch scroll events
scrollContext : window,

Loading…
Cancel
Save