Edit: I have applied a background that matches the background of each box, so the username and avatar follow the user with a background of the color of each theme (Dark and White) remaining on top of the box. It looks great, especially on mobile, and improves the usability to know who is replying in a long post.

/* APLICA CAMBIOS EN AMBOS MODOS */

:root {
  & when (@config-dark-mode = true) { 

/* Avatares Sticky modo dark */

article > div > header.Post-header {
    position: sticky;
    top: 50px;
    z-index: 999;
    background:#15191e;
}

@media @phone {
article > div > header.Post-header {
    position: sticky;    
    top: 46px;
    overflow:hidden;
    background:#15191e;
} 
}
} 

   & when (@config-dark-mode = false) { 

/* Avatares Sticky modo white */

article > div > header.Post-header {
    position: sticky;
    top: 50px;
    z-index: 999;
    background:#eaedf0;
}

@media @phone {
article > div > header.Post-header {
    position: sticky;    
    top: 46px;
    overflow:hidden;
    background:#eaedf0;
} 
}
}
}

Hi, I wanted to know if there is any possibility to make the avatar area become sticky. Sometimes, discussions can be very long, and it would be nice if the post editor avatar follows the user while scrolling down.

This is something that comes standard in Discourse CSS, but I haven't seen any classes to apply this to on mobile and desktop. If I apply position: sitcky, the avatar gets sloppy in the post, but it doesn't follow the user. Any ideas?

I really wanted this for a long time. I tried to make this happen with css but i think it needs js too.

    dragsugur Well, it would be nice if this could be solved in the kernel or by an extension. Being something that significantly improves usability, I think it should come inside the core directly.

    I don't think simple CSS would work based on how the post CSS is structured. So either JS or once we refactor the CSS in 2.0 to improve it, it would allow for a simple CSS solution that we might end up just adding in core at that point.

      SychO Ok, thank you. It would be a great help and a very important step in usability that this is the native CSS of Flarum.

      This is an idea, since the username part has no selector, it occurred to me that I could blur the background. It's not ideal, but it's better than how it is currently. Thanks @Darkle for the help in the Spanish community

      /* Avatares Sticky */
      
      article > div > header.Post-header {
          position: sticky;
          top: 50px;
          z-index: 999;
          backdrop-filter: blur(5px);
          -webkit-backdrop-filter: blur(5px);
          background-clip: padding-box;
      }
      
      
      @media @phone {
      
      article > div > header.Post-header {
          position: sticky;    
          top: 7%;
          overflow:hidden;
          backdrop-filter: blur(5px);
          -webkit-backdrop-filter: blur(5px);
          background-clip: padding-box;
      } 
      }

      Sorry for the double post, but I think I finally got it. I have applied a background that matches the background of each box, so the username and avatar follow the user with a box that stays on top of the box and looks great, especially on mobile.

      /* APLICA CAMBIOS EN AMBOS MODOS */
      
      :root {
        & when (@config-dark-mode = true) { 
      
      /* Avatares Sticky modo dark */
      
      article > div > header.Post-header {
          position: sticky;
          top: 50px;
          z-index: 999;
          background:#15191e;
      }
      
      @media @phone {
      article > div > header.Post-header {
          position: sticky;    
          top: 46px;
          overflow:hidden;
          background:#15191e;
      } 
      }
      } 
      
         & when (@config-dark-mode = false) { 
      
      /* Avatares Sticky modo white */
      
      article > div > header.Post-header {
          position: sticky;
          top: 50px;
          z-index: 999;
          background:#eaedf0;
      }
      
      @media @phone {
      article > div > header.Post-header {
          position: sticky;    
          top: 46px;
          overflow:hidden;
          background:#eaedf0;
      } 
      }
      }
      }

        Oshvam looks great, but if the mobile user tries to tap on the date/edit history text, then there might be issues, but anyways it looks pretty good!

          cilia Ah, yes sorry, possibly it's because I have some customizations for the Asirem theme and they may conflict with some of the styles in your theme. You will have to adapt a little bit those areas where it doesn't fit.

          4 months later

          Too bad they edited out all the codes, maybe someone wanted no name).

          123

          hid behind a hat