• Resolved camya

    (@ecc)


    At the moment, each HTML element which should be set as fixed has the
    class="FixedWidget__fixed_widget" attached to it.

    If the element has reached, only some inline CSS styles are updated.

    Feature request: Can you add another CSS class, e.g. FixedWidget__sticky_active if it’s currently active. This makes it easier to style the widget, if active.

    # Element is set as sticky
    class="FixedWidget__fixed_widget"

    # Element is sticky and is currently active sticky.
    class="FixedWidget__fixed_widget FixedWidget__sticky_active"

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Thomas Maier

    (@webzunft)

    Hey camya,

    thanks for your suggestion!

    I’d like to learn a bit more about your use case. Which kind of styling do you have in mind?

    Thanks,
    Thomas

    Thread Starter camya

    (@ecc)

    Hi Thomas

    Here is my use case:

    Precondition: I set the .post-header in the “Custom Fixed Elements” section!

    A fixed “Post Header” of a Single Post. (.post-header)

    Initially the .post-header element looks fine. But if fixed, the HTML element needs a background-color, a z-index, padding, border, aso. Otherwise the header is unreadable, because of the missing background color.

    Feature request:

    If fixed and active, the plugin adds the CSS class FixedWidget__sticky_active.

    This will make it possible to style the element with a CSS class only if active and fixed:

    .post-header.FixedWidget__sticky_active {
      background-color: #FFF;
      padding: 1rem;
      z-index: 999;
      border: solid 1px #DDD;
    }
    • This reply was modified 2 years, 2 months ago by camya.
    • This reply was modified 2 years, 2 months ago by camya.
    Plugin Author Thomas Maier

    (@webzunft)

    Hey camya,

    thanks for the explanation. This makes a good use case. I will discuss internally if we can add it in the near future.

    Thomas

    Thread Starter camya

    (@ecc)

    Fine, that sounds great. Can’t wait. 🙂

    Plugin Author Thomas Maier

    (@webzunft)

    Hey camya,

    I wanted to let you know that the next version of Fixed Widget will include this. I hope to finish the final tests and release it next week.
    Check out the changelog of that release for more information.

    Thomas

    Thread Starter camya

    (@ecc)

    Great, I will test it asap after release. Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Feature request: Add CSS class “FixedWidget__sticky_active”, when scrolling.’ is closed to new replies.