ronilaukkarinen / mastodon-bird-ui

🐘🐦 Mastodon web UI, but strongly inspired by Twitter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No need for duplicate CSS for simple / advanced layout

Roboron3042 opened this issue · comments

I've fiddled in the past with Mastodon themes and I have had no need to create different CSS for different layouts.

You should be able to save a lot of duplicated CSS code by simply removing .layout-multiple-columns and .layout-single-column from the selectors, and combining both files into one.

If you really need to, you can also add specific rules for each layout at the end of the CSS. But most of the CSS should be valid for both...

@Roboron3042 There couple of reasons why they are in separate files right now:

  1. Some core styles override the defaults if they are not specific enough (although the class could be replaced with body to prevent this)
  2. There are minor differences between advanced view and one column layout and there will be conflicts
  3. My UI theme was originally built for single column only, it was easiest to replace the class to another file instead of trying to figure out the differences on each side (there are some)

Because of Eurovision I wanted to experiment with multi column. I really don't want to combine these two to one because that way I should make sure advanced view always works - since I don't use it, I don't want that. It's better for them being separate for the time being.

I might combine them some day, but for now I don't have time for that. Pull requests welcome.

Also:

  1. Many users prefer my styles in the simple column layout only, but not in advanced layout. This is in fact the case in my own instance. Having them separately allows me to use single column UI for everyone and the rest can choose to use the advanced UI on desktop.

  2. Advanced view is not available in mobile so it can be used with browser extension separately.