Stacks icon indicating copy to clipboard operation
Stacks copied to clipboard

When a post is both "watched" and "deleted", the background color styling for deleted should take precendence

Open johnmwright opened this issue 2 years ago • 2 comments

When a post is both "watched" and "deleted", the watched styling takes precedence instead of the deleted styling. In my opinion, it should be the other way around (the fact it's deleted is more important than the fact it's watched).

Specifically, a post that has .s-post-summary__deleted and .s-post-summary__watched will have it's background color set to the watched value.

Here is a screenshot showing four posts:

  • a deleted post with red background
  • a watched & delete post with the yellow background (this is the one I think should be red)
  • a watched post with yellow background
  • a normal post with neither watched or deleted

image

Note that the style appears to come from primary.css instead of stacks.css:

image

johnmwright avatar May 27 '22 15:05 johnmwright

Seems the issue is an additional post summary style in _base-primary.less.

// TODO upstream?
.s-post-summary__watched {
    .tagged-interesting;
}

dancormier avatar May 27 '22 18:05 dancormier

Hi there!

I take a look and tried to fix this bug in post-primary.less file in Stacks here #1134

Because the component structure does does not have strict methodology, I chose a way to just raise the priority of the selector a bit.

What do you think @dancormier ?

Hope it helps!

Ondřej

ondrejkonec avatar Oct 05 '22 06:10 ondrejkonec