-1
I am creating a modal on a page, and as usual I want that when the modal is being rendered, the screen that is "underneath" it is blurred, dark. I have a class that represents my modal, and in it the _conteiner attribute contains exactly the HTML element that is rendered as modal and I did the following tweak to try to put the focus effect on the modal:
I diminished the brightness of the body, and tried to increase only the brightness of the modal, but the modal becomes dark because the style of the body overlaps his. I wonder if it is possible to ignore the inheritance for this property, or force the value used in the property (something similar to !Important in CSS files) to be what I define.
Use a div with position Fixed that is hidden just before closing the body, and when the modal opens put the styles on it, and not directly on the body
– hugocsl