A
A
Anastasia2021-01-15 10:34:10
css
Anastasia, 2021-01-15 10:34:10

How to properly access the desired selector, having access to the selector adjacent to it?

You need to change the display property of the .lm_maximize selector to hide the resize icon of the tab. I can’t directly access .lm_maximise, because there are a lot of such icons for the project, and you need to hide only in this place, it’s impossible to transfer any distinctive attributes for this particular icon. It turned out to refer to the neighboring tag by its title attribute - .lm_tab[title='Settings']. And from it I thought to turn to the common parent and then to the .lm_maximise selector I needed, but this entry does not work. Tell me how to write correctly?

.lm_header:has(.lm_tab[title='Настройка']) {
  .lm_maximise {
    display: none !important;
  }
}


6001444514cf4554669483.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim, 2021-01-15
@KnopkaNen

Let's go in order:

  • has is not supported yet.
  • You can't access the parent using css.
  • Why not make such a selector . And if it produces unnecessary elements, then complicate it through the parent? Like this:.lm_maximise[title="Увеличить"]
    .lm_header > .lm_controls > .lm_maximise[title="Увеличить"]

  • Violated rule 3.8

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question