RocketChat / RocketChat/Rocket.Chat

Adding !important to CSS makes it impossible to do custom CSS

Open
#20,130 7 comments 2 reactions 1 assignee View on GitHub

@tassoevan is already working on this.

Since Feb 17, 2021.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

As of recently many of the CSS rules have "!important" added to them, with these rules breaking custom CSS changes our team has put hard work into making to give our server a custom look and feel. Adding !important makes it impossible to make changes to these rules and breaks our custom CSS, along with the custom CSS of other people we have found on github, e.g: https://github.com/linusg/rocketchat-dark

Steps to reproduce:
  1. Attempt to change a rule in CSS like the color of the text on the top header bar under .rcx-css-ps0pgs
  2. Changes cannot be made due to !important
Expected behavior:

Custom CSS works as intended and allows you to make changes to all of the CSS, the custom CSS our team has worked hard to create does not break due to constant changes in the core CSS after every other update, with !important placed before these changes making it impossible for us to revert the changes.

Actual behavior:

It is seemingly impossible to add custom CSS for a large portion of the server due to !important rules:

Clipboard - January 9, 2021 11 31 AM

Server Setup Information:
  • Version of Rocket.Chat Server: 3.10.3
  • Operating System: Ubuntu
  • Deployment Method: docker
  • Number of Running Instances: 1
  • MongoDB Version: v3.6.3
Client Setup Information
  • Desktop App or Browser Version: 3.1.1
  • Operating System: Windows 10, Fedora, Arch Linux

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.