0.2.9 • Published 10 years ago

sass-fixed-sticky v0.2.9

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

sass-fixed-sicky

Easy "sticky position" elements. These are elements that are positioned normally until you scroll past the top boundary of the element, then it becomes "fixed position".

npm.io

Installation

bower install sass-fixed-sicky or npm install sass-fixed-sicky

In your .scss (or .sass) file:

@import "sass-fixed-sticky";

#fixed-element {
  @include position(sticky);
  top: 0;
}

top should be equivalent to how far from the top you want the element to be. You can also use the bottom property.

And then include the JS file: dist/sass-fixed-sticky.js

<script src="sass-fixed-sticky/dist/sass-fixed-sticky.js"></script>

Then you're done, all the elements you applied the mixin to will have a 'sticky' position. You don't even need to add any Javascript in your <head>.

For a complete example see #demos.

Demos

Basic example: basic.html

FAQ

Q: Do I need to require the fixed-sticky library separately?

A: No you do not, it is bundled together with sass-fixed-sticky.

Development

bower install
npm install
gulp watch

Release

gulp bump
git tag -a 0.1.7 -m "0.1.7"

Links

License

Available under the MIT License.

0.2.9

10 years ago

0.2.8

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.0.2

10 years ago