Solved
How to Load clientlibs-author.css Only in AEM Author, Not in Publish?
I’m trying to include an author-only client library in AEM so that it loads only on Author and never on Publish. Right now, it’s getting loaded on Publish unless I manually disable it with ?wcmmode=disabled, which isn’t ideal.
I've tried Checking wcmmode (Edit/Design Mode)
<sly data-sly-test="${wcmMode.edit || wcmMode.design}">
<sly data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html"/>
<sly data-sly-call="${clientlib.css @ categories='mySite.author'}"/>
</sly>
This only works when ?wcmmode=disabled is used, but I need something that actually detects if it’s Author vs. Publish.