I'm messing around with CSS again, running Stylus live on this site. Decided I'd like the sticky topics split off from the other topics a bit, so came up with this idea.
/* ------------------------------------------------ */
/* Seperate sticky & other topics on message index. */
#messageindex .windowbg.sticky + .windowbg:not(.sticky) {
position: relative;
margin-top: 11px;
overflow: visible;
}
#messageindex .windowbg.sticky + .windowbg:not(.sticky)::before {
display: block;
position: absolute;
top: -8px;
right: 0;
left: 0;
height: 3px;
background: #96a2bb;
content: '';
}
/* ------------------------------------------------ */
sticky_divider_21_RC4.jpg
Dang bruh, I never sticky anything bahaha! I really dont see the diff. :-\
Well if you never sticky anything it won't be any use to you. :D Lots of stickies on this site, though.
And the diff is obviously the gap and the horizontal divider between stickies and other posts.
Similar idea to this one: Make new posts stand out in threads (https://www.simplemachines.org/community/index.php?topic=574760.0).
Although that other idea is for 2.0.x and doesn't work in 2.1 (someone changed the markup of the #new link and it borks that idea).
I like the gap with the hr tag.
It's not an hr tag. It's all CSS on standard 2.1 RC4 markup, using a ::before pseudo element. :)
Even better.
Ha! I see it now lol...... Ooooooo I could put a dingbat in the center of the divider. Some sweet pin stripes hehehe and dress it up a bit. 8) Cool beans man.
I like it when you 'mess around with CSS', you come up with some interesting stuff Antechinus 8)
I like it! 8)
Quote from: Mick. on August 22, 2021, 08:02:32 PMHa! I see it now lol...... Ooooooo I could put a dingbat in the center of the divider.
You are a dingbat. :D
Quote from: Antechinus on August 22, 2021, 09:37:23 PMQuote from: Mick. on August 22, 2021, 08:02:32 PMHa! I see it now lol...... Ooooooo I could put a dingbat in the center of the divider.
You are a dingbat. :D
;D ;D
Code needs a slight tweak. The code in the OP is triggered if there is a sticky topic in the unread list. To fix that, use this (it just adds #message_index to the start of each declaration).
/* ------------------------------------------------ */
/* Seperate sticky & other topics on message index. */
#messageindex .windowbg.sticky + .windowbg:not(.sticky) {
position: relative;
margin-top: 11px;
overflow: visible;
}
#messageindex .windowbg.sticky + .windowbg:not(.sticky)::before {
display: block;
position: absolute;
top: -8px;
right: 0;
left: 0;
height: 3px;
background: #96a2bb;
content: '';
}
/* ------------------------------------------------ */
Do you want the code in the OP changed to the one above?
Sure, if you like.
Done.
Come to think of it, you can lose the three examples of important now that the #messageindex id is in the declarations. The added specificity of that makes the !important redundant. I've edited the code in reply #11.
Done.
Y'know I think it would look prettier with sparkles and dancing unicorns.
I've edited the code in reply #11 again.
:P :P :P :P :P :P ;D ;D ;D
Smarta** ... :P
I haven't edited the code in reply number 11.
I seem to be in a minority :laugh: