Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom CSS #50

Closed
bartebor opened this issue Mar 1, 2019 · 6 comments
Closed

Custom CSS #50

bartebor opened this issue Mar 1, 2019 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bartebor
Copy link

bartebor commented Mar 1, 2019

It would be great if teams-for-linux allowed to define custom stylesheet for MS Teams.
As we know, the layout is not "optimal" and there are some attempts to improve that - use full screen width or make conversations less space-hungry.

An option to pass a custom CSS file (ideally compatible with those used by Stylus plugin) would be really useful.

@IsmaelMartinez IsmaelMartinez added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Mar 1, 2019
@IsmaelMartinez
Copy link
Owner

Hi @bartebor. That sounds like a great idea.

I don't really have much time lately but I am happy to try to help/support someone implementing it.

It will be really helpful if you got an example of css to inject that you could put in here.

There is an open suggestion in the Microsoft forum, but it seems to have been there for more than a year, so I will assume Microsoft is not really going to be doing it.

https://microsoftteams.uservoice.com/forums/555103-public/suggestions/19749625-css-themes

@bartebor
Copy link
Author

bartebor commented Mar 6, 2019

I thought of an option to pass user specified CSS file to inject instead of hardcoding it into application.
That way we could use CSS meant for Stylus plugin, such as this one: https://userstyles.org/styles/164546/compact-microsoft-teams-for-dark-theme

For the sake of testing one could use simple style such as

.ts-message-thread-body .padded-content {
    background-color: green !important;
}

@IsmaelMartinez
Copy link
Owner

I think, at this moment in time, the best that we can do is to add a config.option to load a css file into the app.

Integrating with Stylus will take a bit longer as I will need to add https://www.npmjs.com/package/stylus.

I might provide both options... not a big one and, as now I have a couple of options on how to test it, I might be able to do a bit of work tomorrow.

It might make it part or all into 0.1.15 that is just been baked. Thanks for the suggestion and info. I hope you are finding this client useful. I will update with more info as it comes.

@bartebor
Copy link
Author

bartebor commented Mar 7, 2019

@IsmaelMartinez A config option to load custom CSS file would be great, thanks!

@IsmaelMartinez
Copy link
Owner

I added the option. I have tried a few of the ones from the list that you provided but couldn't really get them to work... but the example that you provided does work.

You can enable it by using the following command. Provide the full file location.
teams --customCSSLocation filename.css

Thanks for opening the issue and helping to solve it. Hope helps!

@bartebor
Copy link
Author

bartebor commented Mar 8, 2019

@IsmaelMartinez It works, thanks!

To have CSS designed for Stylus working minor tweaking is needed:

  • remove @-moz-document domain(teams.microsoft.com) { }
  • add !important to CSS rules

Refresh option in system tray menu is extremely useful while testing CSS changes.
Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants