Using the latest of everything (12.0.1 Angular/CLI/IgniteUI/etc.).
I'm trying to style a bunch of components in a blue background:
I want them all to match:
I also need the combo/dropdown to be on the same line as the text labeling it (start/end WW) and the current parameter from the scenario details to be selected, which isn't working, even using [(ngModel)]. Here's an image of what I have right now.
My current CSS:
igx-checkbox { color: white; } button { color: #00C7FE !important; background-color: white; margin: 10px; } igx-combo { color: #00C7FE !important; background-color: white; }
I've tried styling by a bunch of different features I can see when I inspect the checkbox and combo, but none of them seem to have any affect.
My current HTML:
<div class="container-fluid" *ngIf="scenario && scenario.name && scenario.name.length > 0"> <div class="row bg-primary text-white"> <div class="col-sm-1"></div> <div class="col-sm-3 d-inline-block"> Scenario: {{scenario.name}} <br/> Families: {{scenario.families}} <br/> Start WW: <igx-combo *ngIf="scenario.active == 'Active' && !scenario.locked && scenario.scenarioType != 'Actual'" [(ngModel)]="scenario.startWw" [data]="workweeks" [igxFocus]="true"></igx-combo> {{scenario.active !== 'Active' || scenario.locked || scenario.scenarioType == 'Actual' ? scenario.startWw : ''}} </div> <div class="col-sm-4 d-inline-block"> <igx-checkbox [checked]="scenario.locked" labelPosition="before">Locked: </igx-checkbox> <br/> Facilities: {{scenario.facilities}} <br/> END WW: <igx-combo *ngIf="scenario.active == 'Active' && !scenario.locked && scenario.scenarioType != 'Actual'" [(ngModel)]="scenario.endWw" [data]="workweeks" [igxFocus]="true"></igx-combo> {{scenario.active !== 'Active' || scenario.locked || scenario.scenarioType == 'Actual' ? scenario.endWw : ''}} </div> <div class="col-sm-3 d-inline-block"> <igx-checkbox [checked]="scenario.private" labelPosition="before">Private: </igx-checkbox> <br/> <button *ngIf="scenario.active == 'Active' && !scenario.locked && scenario.scenarioType != 'Actual'" igxButton (click)="updateHorizon()">Update Horizon</button> </div> </div> </div>
I'm having a similar issue with advanced/excel filtering in removing the blaring pink that shows up everywhere. I'm hoping you guys can give me a way to change it to match the theme of the app I'm building. Those checkboxes don't work for me there, either. Everything else in that frame is fine, though.
Hello Chris,
Thank you for posting on our forums.
Overwriting css classes is not the intended way of styling our components, as it does not guarantee consistency between versions, since some variables might get renamed over the course of code refactoring. The best way to style components would be to use Theming.
I would recommend checking the following pages from our documentation regarding each element, where you can find a sample how to style them:
CheckboxButtonCombo
Regarding the combo being on the same line as the text labeling it, wouldn't you achieve that by not using <br> tag which makes it go on a new line?
Regarding stylig advanced filtering, this is also available on our website here:
Advanced Filtering / Excel Style Filtering
Please let me know if you have any further questions.
Sincerely,Tihomir TonevAssociate Software DeveloperInfragistics
That is highly unhelpful. All the theming is in SCSS and I am attempting to style in CSS, as I mentioned already. Also, if you look at my HTML code again, the "<br/>" is BEFORE the text identifier for the field and there is not another instance before the combo.
Once again, I feel you guys have wasted an attempt to answer something, causing another 24 hours+ before a decent response that might actually help me accomplish what I'm asking for.
Now. Again. I need a CSS solution for styling Checkbox, Button, Combo, Advanced Filtering, Excel Style Filtering. I also need a solution for keeping a Combo on the same line as text within a div. I have Google searched and found nothing that actually works because IGX components are different from the usual ones.
Hello,
IgxCombo uses IgxDropDown as internal component, so in a way we re already using it. I have tested selectItems and there is no error, I updated the sample:
https://stackblitz.com/edit/combobox-cssoverwrite?file=src%2Fapp%2Flists%2Fcombo%2Fcombo-styling%2Fcombo-styling.component.scss
And here is the sample you have linked with same classes used for the dropdown to change the color of the items background and foreground:
https://stackblitz.com/edit/github-tvness?file=src/app/dropdown-sample-4/dropdown-sample-4.component.scss
Can you please post a sample of your code on stackblitz where I can run it and see what the issue with positioning the elements is?
Looking forward to your reply.
Figured out the selected value in Dropdown version using the [selected] property of igx-dropdown-item. Still can't get the Checkbox or dropdown TEXT color to be white.
Was able to change the background color of both, though, using:
igx-input-group.igx-input-group, igx-checkbox.igx-checkbox { background-color: white; }
I don't really want the background color to change, just the black ornaments and text on both.
Maybe you could give me another hint as to how to get the TEXT color to change?
The class for the dropdown items is .igx-drop-down__item, however currently the background is also white, so the text would not be readable. Since the background of the selected items is already light blue, you should change the background to another color which is not light blue(in order to make selection distinct), and have the white foreground visible.
Please let me know if you need further help.
I figured out more of the checkbox:
igx-checkbox.igx-checkbox { --label-color: white; //text color --fill-color: #00c7fe; //inside the checkbox --empty-color: white; //checkbox border --tick-color: white; //the checkmark color }
What is the class applied when it is disabled? I would like to persist the above and change the background to a light grey.
Perhaps you can help in finding similar CSS attributes for the dropdown/combo styling.
I happened upon it by chance. I used the (click) accessor and just console logged the $event from it. In the Path element of the emitted event, I found the igx-checkbox class (knew it existed) and it exposed those and more attributes in the CSS frame.
The :disabled attribute will allow you to set styling when the element is disabled. In the initial sample I have provided, you can observe similar styling for the checkbox, as I have it styled further when it is checked.
Please let me know if you have further questions.