CSS isolation policy
The front-end stylesheet (assets/src/frontend/styles.css) follows a strict isolation policy so the plugin never disrupts a theme's design system.
Mandatory rules
- Every selector scoped under
.pfm-embed— no bare element selectors anywhere. - Typography + colour inherit from the theme. Form controls declare
font: inherit; color: inheritso they read the theme's settings. - No
!important. If a theme overrides our rule it wins. - Theme.json variables are consumed with fallbacks for the primary / background / red / green / etc. accent colours (
var(--wp--preset--color--primary, #2271b1)). currentColorand logical properties so RTL themes inherit correctly.- No icon font, no Dashicons — inline SVG only.
- Bundle size target: < 8 KB gzipped CSS, < 60 KB gzipped JS.
Form chrome that themes need to dress themselves (background, border, padding) is left alone — only font, color, width:100% and a min-height for touch targets are enforced.
The honeypot field (used by the anonymous-write hardening) is positioned off-screen with display:none plus position:absolute; inset-inline-start:-10000px as a secondary line of defence in case a theme overrides display.