Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

207
Vistas
Reduce brightness on background without 1 child element

I need to reduce the background brightness when 1 DIV element is shown. However i manage to reduce the background using filter: brightness(0.5) but then the DIV element have reduced brightness as well

I've try it to use :not() operator but not successfully

This is how the css looks like:

#app {
  width: 360px;
  height: 600px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow: hidden;

  &:not(.getting-started-overlay) {
    filter: brightness(0.5);
  }
}

And this is how the DOM structure looks like: Dom structure

How not to apply brightness on div with class getting-started-overlay

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Add a space to your rule:& :not(.getting-started-overlay) to target the children of #app instead of #app

EDIT You might be able to make use of the :empty pseudo class, which targets elements with no children, though in your case, your #app is the element that holds the properties you want changing.

Why not add a .empty class to the app and add append your populating function with a classlist.remove('empty')

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda