Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive sticky top #28352

Conversation

jahanzaibsuleman07
Copy link
Contributor

@jahanzaibsuleman07 jahanzaibsuleman07 commented Feb 24, 2019

This is solution for creating responsive sticky top class which closes #28311.

cc: @mdo

@MartijnCuppens
Copy link
Member

Hi @jahanzaibsuleman07

  • Could you move @supports (position: sticky) around the loop, this prevents the supports query from being generated multiple times
  • This needs to be documented in our docs
  • We also need documentation for if you want to use the mixin below a specific size. I guess we'll need to work with the .position-static utility class then?

@jahanzaibsuleman07
Copy link
Contributor Author

jahanzaibsuleman07 commented Apr 6, 2019

Hi @jahanzaibsuleman07

  • Could you move @supports (position: sticky) around the loop, this prevents the supports query from being generated multiple times
  • This needs to be documented in our docs
  • We also need documentation for if you want to use the mixin below a specific size. I guess we'll need to work with the .position-static utility class then?

Hi @MartijnCuppens and @mdo :

I have addressed the first two points. Please review.
For third point, do you want something in the documentation like below?

Mixins

Sass mixin can be used to create a class up to specific view port like below:

@include media-breakpoint-down(sm) {
    $infix: breakpoint-infix(sm, $grid-breakpoints);

    .position#{$infix}-static {
        position: static !important;
    }
} 

@jahanzaibsuleman07
Copy link
Contributor Author

Hi @MartijnCuppens and @mdo, do we need any further changes here?
Also please see my previous comment. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sticky based on viewport
4 participants