CSS Class on Data Grid Not Rendering?

0
Hi – I’m trying to add a custom CSS class to a data grid and it’s not working. Any ideas what I could be doing wrong? Below are steps I am doing per tips provided in  https://community.mendix.com/link/questions/8614 Properties of the data grid column Copy-paste following into the “Class” field under "Appearance” tab →   .MyClass :before { content: '$'; left: -5px; }   There is also mention of a “Content” property, but I’m not seeing it. At risk of being redundant, I’ve also added this question as a commentto one of my other posts but decided to make this its own separate thread. Thanks and sorry for the simple questions!
asked
6 answers
1

“Copy-paste following into the “Class” field under "Appearance” tab →   .MyClass :before { content: '$'; left: -5px; }”

I’m a little confused about this – are you pasting that whole thing into the “class” field? The class field lets you assign a CSS class that you can then reference in the custom CSS for your theme, using SASS.

http://www.mxblog.nl/2016/03/using-sass-with-mendix/

So you’d put only “MyClass” in the class box of the column that needs $s, and the full CSS in your SCSS file. You might need to do something like put “tbody” before the “.MyClass” to prevent the header from also getting a $ before it. The file structure of the theme folder changed a little in Mendix 8 – I’ve been putting my custom CSS in the “app” folder instead of in “custom”. 

If I’ve misunderstood, can you explain a little more about what’s happening?

answered
0

You did remove the dot before the classname didn't you?

answered
0

Yes – sorry same result (no dice)

answered
0

Thanks for the clarification. I wasn’t aware I needed a SCSS “file” … I thought I could just get this done via Properties of the data grid column. I see the blog uses Koala … Is this a separate download I assume (and once downloaded locally, will carry over just fine in my app in the cloud)?

answered
0

If you don’t want to modify the theme, you could add the CSS using <style> tags in an HTML snippet widget. I think modifying the theme would be a better choice if you are making a lot of custom changes, or if you need SASS features (theme coloring variables, etc).

Yes, you would need to download a program like Koala to compile your SCSS files into regular CSS files. After you compile, you won’t need to do anything special to commit/deploy to the cloud. If you have team members they won’t need Koala unless they also want to make changes to the theme.

If you modify your theme you will need to migrate your custom changes each time you update the Atlas UI package. To make this easier, I keep all my customizations in separate files and avoid modifying Atlas’s files directly.

answered
0

Hi – when I apply the class to the “Class” property, it applies it to the label as well. Any workaround to this?

answered