The use of inline CSS is not always prohibited in the AppExchange Security Review, but there are specific guidelines and restrictions:
**When Inline CSS is Acceptable:**
1. **Adherence to Security Practices**: Inline CSS is acceptable if it adheres to secure coding practices and doesn't violate style isolation or security guidelines.
2. **Self-Contained Applications**: In self-contained application components, inline CSS may be acceptable if properly justified and documented.
3. **Safe Hardcoded Values**: Using inline CSS with hardcoded values like "overflow: hidden" is fine as long as it doesn't conflict with style isolation or create security risks.
4. **Specific Use Cases**: For functionality such as overlaying a spinner during save/submit actions, inline CSS can be documented as a false positive if properly justified.
**When Inline CSS is Prohibited:**
1. **Aura and LWC Components**: The use of inline CSS styles, like `position: absolute` or `position: fixed`, is generally prohibited in Aura or LWC components for AppExchange Security Review as these styles can disrupt the usability and layout of other components.
2. **Security Violations**: When inline CSS violates style isolation or creates security vulnerabilities like clickjacking.
3. **Namespace Exposure**: When components are exposed outside their namespace and inline CSS could create security risks.
**Exceptions and Special Cases:**
- **Limited Namespace Exposure**: Exceptions might be allowed if the component is not exposed outside its namespace or is limited to specific pages owned by the namespace.
- **Email Templates**: Special exceptions exist for Visualforce email templates using attributes like `renderUsingSystemContextWithoutSharing`.
**Security Requirements:**
- **Content Security Policy (CSP)**: The framework enforces a strict CSP in Lightning Experience (LEX), which blocks unsafe inline styles.
- **Style Isolation**: Inline CSS must not compromise the isolated sandbox environment of the Salesforce Platform.
- **Namespace Boundaries**: Must not cause breaches in namespace isolation.
**Best Practices:**
- Each case should be evaluated based on its specific implementation and compliance with security standards
- Provide clear justification when inline CSS is necessary
- Consider alternatives like static resources or CSS custom properties
- Document any exceptions with proper business justification
- Ensure compliance with Salesforce's security policies
The key is ensuring that any inline CSS usage doesn't introduce vulnerabilities or compromise the security and isolation principles of the Salesforce platform.