I work on a community and I have to override the css in the community for that. So (unfortunately) I use a lot of !important. But sometime the div I need to change (or hide) didn't have a class, only a data-aura-class or data-aura-rendered-by, so is there a way to call those tag in the css ?

  • 1
    With query selectors you can do something like this: div[data-aura-rendered-by], but this will apply the style to all the divs whit attribute data-aura-rendered-by.
    – D. Cruz
    Aug 16, 2016 at 12:33

1 Answer 1


I didnt quite understand your question, but to change the CSS in lightning components, you can add your own terms in DIV class and use them in css sheet of lightning component. Like the below DIV

<div class="someClass">


.THIS .someClass{
    display : none;

Also note if its your Main DIV in CSS it will be .THIS.someClass or if its a sub DIV it will be .THIS .someClass (with space in between).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .