We are in the process of building our own custom theme. We are being careful to use distinct names for all of our custom style class names. But I noticed that when we create custom styles, they don't appear in the wysiwig when editing in the back-end.

Is there an easy way to tell the back-end to import our _custom.less from our custom theme (app/design/frontend/Magento/custom/web/css/sources/_customless) without overriding anything else in the existing backend?


OK, after some more digging, I found a way to apply a _custom.less by dropping it in a neutral directory (lib/web/css/source) and then making a scary looking import in each place preceded by ../../../../etc While it worked, it wasn't ideal. But worked was relative. The tiny_mce seems to load in an iframe when active that has it's own theme and styles. There is apparently support for passing a custom_css parameter when creating it, but I don't see any immediate support for it in the sparse settings for the wysiwig in the back end. While I might be able to find a way to override the javascript and/or the back-end options to allow for it, I'm thinking it might be easier to temporarily cut/paste the url to the compiled styles-l.css file when needed.

just shakes head

c'mon magento. You can't edit the custom css without a third party plugin or a full static content deploy in the backend. You can't see the css in the content editor. I sure hope Adobe fixes some of this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.