Splunk Search

Changing font and color in the body of a simple table

dspracklen
Path Finder

It doesn't matter if the answer is in CSS or Advanced XML or both. I'm not even certain Advanced XML has access to properties for this though.

The default blue color (and font) is not working well in this instance. I wanted to change the defaults for both in the simple results table, but apparently I can't find the correct CSS combination to do that. The example default CSS file doesn't do this; it only sets the header text color.

Thus far I have tried many combinations of CSS changes including "table.splTable td a {color: #000000;}" and "table.splTable td {color: #000000;}" and gotten nothing to change. I was able to change the header colors, but those are already fine.

Searching for Advanced XML help with module properties leads me exclusively to changing fonts on charts and not tables.

Thanks for any help you can give.

1 Solution

dspracklen
Path Finder

Someone here used Chrome's 'inspect element' to figure out the CSS magic required to fix the colors. The CSS element to do this is:

.SimpleResultsTable table.enableMouseover tr td.d {
color:#000000;
}

Esoteric? Yes. Works? Yes.

View solution in original post

dspracklen
Path Finder

Someone here used Chrome's 'inspect element' to figure out the CSS magic required to fix the colors. The CSS element to do this is:

.SimpleResultsTable table.enableMouseover tr td.d {
color:#000000;
}

Esoteric? Yes. Works? Yes.

ChrisG
Splunk Employee
Splunk Employee

I did a little more research on this. There is a simpleResultsTable.css file that has the setting you found in $SPLUNK_BASE/share/splunk/search_mrsparkle/modules/results. We will update the App Framework Cookbook topic to say more about where the default CSS files are located.

ChrisG
Splunk Employee
Splunk Employee

There's an App Framework Cookbook topic on the dev portal on How to do simple app customizations. If you read down through that topic, you will find a section about how to define your own CSS. It includes an example that (1) changes the default cell background color in the simpleResultsTable module, and (2) highlights a row when you hover your cursor over it. Hope that helps point you in the right direction!

dspracklen
Path Finder

The page does have some good information on it, but sadly none of it really helps to resolve the inability to change text color inside a table. Using their examples I can change the background colors and highlight color. I can even put text decorations on it. I changed the font family and weight, but the text itself steadfastly remains the same blue. I've even made sure this happens for both Firefox and Chrome.

0 Karma
Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...