Yes, there are exceptions to the rule against inline styles for components like email templates in Salesforce. For example, in Visualforce email templates, the attribute `renderUsingSystemContextWithoutSharing` can be used. This allows the template to render in System Context, enabling it to function even if the user does not have access to the related records. This is specifically designed for scenarios where access to records is restricted but sending emails is still required.
**For Visualforce Email Templates:**
To use CSS in Visualforce Email Templates without violating the "inline CSS" security rule:
1. Save the CSS in a **static resource**.
2. Reference the static resource in the email template.
This ensures compliance with security policies by avoiding inline CSS. Additionally, you can use the `renderUsingSystemContextWithoutSharing` attribute in the Visualforce email template to render it in System Context, which helps address access-related issues.
**Handling Inline CSS Requirements:**
To handle inline CSS requirements in Visualforce email templates, you can use the attribute `renderUsingSystemContextWithoutSharing` set to `true` in the template markup. This allows the Visualforce email template to render in System Context, enabling the email to be sent successfully even if the guest user does not have access to the related records.