About Logical CSS Selectors
In CSS you can combine the :is()
and :not()
pseudo classes to filter or filter out elements that belong or don't belong to a certain container:
img:is(.content *) {
/* analogous to `.content img` */
max-width: 100%;
}
img:not(.content *) {
/* all <img>s that are not within .content */
max-width: none;
}
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent app
For Django websites that use cookies.
Django App for You