Background color in feature info widget

313
2
04-28-2020 08:02 AM
SIG1SMAAG
New Contributor II

Hello,

Is it possible to set background color for the "Feature info" widget?
I edited the style.ts file for my custom theme like this:

import { css } from 'jimu-core';

const customGlobalStyles = (props) => {
return css`
.esri-feature__size-container {
background-color:transparent;
}
`;
}
export { customGlobalStyles as Global};

But it does not work. See below :

Feature info widget

Tags (1)
0 Kudos
2 Replies
YiweiMa
Esri Contributor

Hi,

Since the FeatureInfo widget has its CSS overrides at the widget level, what you can do is to provide a more specific CSS rule such as:

#app .widget-featureInfo .feature-info-component .esri-feature__size-container {

  background: red;

}

Best,

Yiwei

MatthiasDufour
New Contributor III

Thank you very much, Yiwei Ma.

It is perfect !

0 Kudos