Styled Button Colors - Mattermost Dark


Themed button colors in Mattermost’s default dark theme are mismatched.
Mattermost Version: 5.27.0

Steps to reproduce

Use a mattermost client with the default dark theme active. Submit a post containing a button in an attachment, setting “style” to “danger” or “primary” in the button’s configuration (like Slack).

Expected behavior

Button is unstyled (like previous versions), or button is styled according to the Mattermost theme

Observed behavior

The mattermost dark theme has the buttons styled rather brightly! :blush:


(Can’t post danger example - new users can only post one attachment)

Opened a ticket:


Devs would need some help with reproducing this: Where should we set the button configuration? And how do we submit a button as a post? Do you mean an html snippet?

The button is created as part of an attachment of a message, created via. the Mattermost API -

Example payload to create a message with a button with a themed color:

    "channel_id": "...",
    "message": "",
    "props": {
        "attachments": [
                "actions": [
                        "name": "Button Label",
                        "integration": {
                            "url": "...",
                            "context": {},
                        "type": "button",
                        "style": "primary"