question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Javascript][Theming] Allow custom styles for containers

See original GitHub issue

Platform

  • JavaScript

Author or host

I’m both, but I think this might apply to the authoring side.

Version of SDK

npm 2.3.0

Details

I wasn’t sure whether to put this as a bug or feature request, have gone for bug.

Container.style is defined as string | undefined, this to me suggests that we could put our own custom styles in and have that custom style represented in the hostconfig on my renderer. The problem is, if it isn’t one of the official styles, the style property appears to be ignored and not included in the json.

On my rendering side, in my host-config file, I have a containerStyle set for my custom theme, and adaptiveCards.allowCustomStyles is set to true, but none of that will matter if the server doesn’t send that custom style when it’s serialized.

So either:

  • I’m doing something wrong to enable custom container styles
  • It should work as I expected, but isn’t
  • The styles for containers should be fixed to a type to remove ambiguity for the dev.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
dclauxcommented, Sep 24, 2020

@matthidinger FYI @scottlovegrove I hear you. We’ll discuss internally, but I wouldn’t hold my breath…

0reactions
paulcam206commented, Dec 2, 2021

This is implemented in the Javascript renderer, but is not on our roadmap to implement on other platforms at the moment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Future of Themes with CSS Container Style Queries
These kinds of queries let us check the value of a custom property for a container, and apply styles to elements inside the...
Read more >
Using CSS custom properties to apply themes in ...
Let's work through the steps and build up a dynamically loaded theme for ourselves. <a name="building-a-custom-theme-machine"></a>Building a ...
Read more >
Defining and Applying UI Themes Using the Mimcss ...
Theming UI refers to the ability to perform a change in visual styles in a consistent manner that defines the “look and feel”...
Read more >
Applying Custom CSS and JavaScript to a Page
Click the Containers tab and drag a panel container onto the page. With the panel selected, open the Properties panel. In the text...
Read more >
Using CSS custom properties (variables) - MDN Web Docs
Custom properties allow a value to be stored in one place, then referenced in multiple other places. An additional benefit is semantic ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found