Use CSS Outside Components

The Salesforce Platform tries to ensure that each namespace is an isolated sandbox, but isolation can’t always be guaranteed. Where a namespace isolation breach occurs, one component can steal clicks from another component, or otherwise interfere with another component’s intended use. To prevent this type of abuse, don’t use CSS directives known to be incompatible with style isolation in your components.

CSS Example

This CSS code is vulnerable because it uses absolute positioning, which is incompatible with style isolation.
#some_element {
   position: absolute;
   right: 80px;
   top: 160px;
}
This CSS code prevents the vulnerability by using relative positioning.
#some_element_revised {
   position: relative;
   right: 80px;
   top: 160px;
}

For more information, see Tips for CSS in Components in the Lightning Aura Components Developer Guide.