Contents not comply with Theme settings

There are 2 issues with theme (Version 1.3):

  • The table contents don’t resize after changing the Size
  • Content in BrowserFrame does not comply with the dark theme. The background is dark but the letter remains black. I used the contents from the local HTML file.
    Please advise,
    Thanks

Hi,

Table or DataGrid? In my case, Table changes its size. DataGrid doesn’t change its size by design, because it has separate settings like rowHeight, headerRowHeigh so the theme cannot change them.

It seems that this file has own color settings. Make sure that local HTML file has the following color definition: color: var(--text-main-color);

Gleb

Yes, you are right, Table can change, the other tag cannot.

I created a simple html like this
image
but the result is unchanged
image

Could you please attach a small demo project that reproduces the issue?

testtheme.zip (79.2 KB)
I created a simple project. Please check

It appears that iframe cannot see styles prom parent, as a result setting color: var(--text-main-color); has no effect. There is no easy way to get styles from the parent other than using JS code like:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test</title>
    <style>
    </style>
    <script>
        document.addEventListener("DOMContentLoaded", function (event) {
            const parentElement = window.parent.document.getElementsByClassName("v-app")[0];
            const color = getComputedStyle(parentElement, null)["color"];
            window.document.body.style.color = color;
        });
    </script>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>

Screenshot 2023-11-15 at 13.31.14

thank you! it works now. But I have a link a in the HTML and the colour does not change / hard to read. Can you take a look at it?
image

As I was saying, iframe cannot see styles from parent because it is kind of separate page, so you need to implement styles for every element that is used in iframe according to your needs. This is not related to Jmix itself, it’s common practice when working with iframes.