css changes not getting applied to mendix

0
hi team,   my requirement is to always keep width constant of reference selector irrespective of dropdown data.i am trying to change css of reference selector and i have done changes in my theme.compiled.css file as width:8px; for that class but it doesn't get reflected when i check browser and inspect that reference selector changes are not reflected.any help appreciated to how we can resolve this issue.
asked
2 answers
1

Hi Nikhil,

 

Don't change the compiled css file. Instead, I would advice in creating your own stylesheet and import that stylesheet in your main.scss. Also, check the documentation and specifically paragraph 2.3.

 

Creating the following class in your own stylesheet and adding it to the appearance tab of your refselectors should do the trick:

 

.refselectorfixedwidth {
    .mx-compound-control {
        (include your styling here)
    }
}

I tested this for you and it works perfectly.

 

Hope this helps!

answered
0

Hello Nikhil,

Create a custom CSS or SASS file and add respective file in Main.css/Main.scss

Add the parent class name and below add below code 

scenario 1:

.mx-referenceselector{

  .select.form-control{

       add your styles;

 }

}

 

scenario 2:

.reference-selector-dropdown{

     .select.form-control{

            add your styles;

 }

}

 

scenario 3:

still it not work add !important to your styles. it will work

 

Mainly will work first 2 scenarios, if not try 3rd one.

answered