9

These userstyles attempt to revert the unpopular changes introduced to the Top Questions pages.

See

/** Container **/

.s-post-summary {
  padding-left: 8px;
}

/** Stats grid **/

.s-post-summary .s-post-summary--stats {
  display: grid;
  width: unset;
  grid-template-areas:
    "score answers views"
    ". bounty ."
    ;
  grid-template-columns: repeat(2, 1fr); /* change to 3 for views */
  column-gap: var(--s-post-summary-stats-gap);
  row-gap: var(--s-post-summary-stats-gap);
  align-content: start;
  align-items: center;
}

.s-post-summary--stats .s-post-summary--stats-item,
.s-post-summary--stats .s-post-summary--stats-item.has-answers {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 4px;
  width: 60px;
}

/** State grid items **/

.s-post-summary--stats .s-post-summary--stats-item .s-post-summary--stats-item-number {
  font-size: larger;
  margin-right: 0 !important;
}

.s-post-summary--stats .s-post-summary--stats-item:nth-child(1) {
  grid-area: score;
}

.s-post-summary--stats .s-post-summary--stats-item:nth-child(2) {
  grid-area: answers;
}

.s-post-summary--stats .s-post-summary--stats-item:nth-child(3) {
  grid-area: views;
  display: none; /* remove for views */
}

.s-post-summary--stats-item.has-bounty {
  grid-area: bounty;
}

.s-post-summary--stats .s-post-summary--stats-item.s-post-summary--stats-item__emphasized {
  color: var(--fc-light);
}

/** Tags **/

.post-tag.s-tag__watched {
  padding-left: 0.5em;
}

.post-tag.s-tag__watched:before {
  content: none;
}

/** Hide unwanted elements **/
.s-post-summary--stats .s-post-summary--stats-item.has-accepted-answer .iconCheckmarkSm,
.s-post-summary--meta .s-avatar {
  display: none;
}

Apply to URLs matching regex https://(.+\.)?stackoverflow.com/(questions)?(\?tab=.*)?

light mode

dark mode

Caveats:

  • Bounty badges aren't exactly where they used to be (though TBH it doesn't look too bad)
  • I haven't changed the user and timestamp alignment (again, I think this looks ok)
1

2 Answers 2

3

Only works on StackOverflow, not on other SE sites. E.g. check out https://ru.stackoverflow.com/

5 Comments

Did you install from Userstyles.org? I think I hard-coded the URL. Looking at the HTML and CSS, it should work though
@PhilBrown Yep, from userstyles.org.
Hmm, I imagine detecting the views column is going to be tricky on non-english sites since I use the title attribute. Will have to think about this some more
@PhilBrown Mhm. I guess you could hardcode all translations (and their different forms).
I've fixed the URL to use a regex on userstyles.org now so should work on any *.stackoverflow.com
3

Views are not hidden when there's exactly one view:

pic

2 Comments

Oh wow, great catch. Will fix
I'm able to use nth-child() positions now so should be fixed

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.