tinymce icon indicating copy to clipboard operation
tinymce copied to clipboard

Sass compiling error

Open dmitrue opened this issue 1 year ago • 8 comments

Hi there,

Compiling tinymce with Sass giving the following error now:

Screenshot 2024-08-17 at 12 28 24

dmitrue avatar Aug 17 '24 05:08 dmitrue

Hi @dmitrue. Here is the relevant source code: https://github.com/tinymce/tinymce/blob/24555233fc0531ee201fa438d327dd46822cfe3b/modules/oxide/src/less/theme/components/toolbar/toolbar.less#L20.

TinyMCE doesnt use Sass, so I assume you meant LESS. What version of LESS are you using?

lostkeys avatar Aug 19 '24 08:08 lostkeys

Hi @lostkeys! I'm using https://github.com/rails/cssbundling-rails with Bootstrap Sass

dmitrue avatar Aug 19 '24 08:08 dmitrue

Alright, problem solved, you need to use a LESS compiler, not a Sass compiler. Here is the documentation for how to customize the skins: https://www.tiny.cloud/docs/tinymce/latest/creating-a-skin/

lostkeys avatar Aug 19 '24 08:08 lostkeys

How is this solved? Not everyone using less. I don't need to customize skins, I'm only importing them because it doesn't work without it.

dmitrue avatar Aug 19 '24 08:08 dmitrue

You are right sorry, I missunderstood the question. Can you help debug a bit and simply add px after the zero in the calc() so the line becomes background-size: calc (100% - 11px * 2) calc (100% - 0px) ; and recompile to see if that is what is tripping up the Sass compiler.

lostkeys avatar Aug 19 '24 09:08 lostkeys

Thanks for reopening this issue. Yep, if I set calc (100% - 0px); everything compiles properly

dmitrue avatar Aug 19 '24 12:08 dmitrue

Thanks for verifying! I'll arrange having that function always use a unit suffix in a future version of TinyMCE.

lostkeys avatar Aug 19 '24 13:08 lostkeys

Same problem here with webpack and css-loader:

ERROR in ./node_modules/tinymce/skins/ui/oxide-dark/skin.css (./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/tinymce/skins/ui/oxide-dark/skin.css)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
100% and 0 are incompatible.
     ╷
3864 │   background-size: calc(100% - 11px * 2) calc(100% - 0);

EDIT: our solution is to downgrade to 7.2.1 ... error appears only since 7.3.0

petschki avatar Aug 20 '24 06:08 petschki

Hi @dmitrue @petschki

Thank you for reporting this issue. We're pleased to inform you that it has been addressed in TinyMCE version 7.4, which is now available.

To resolve the problem, please upgrade to the latest version of TinyMCE.

ArvinJ-H avatar Oct 09 '24 06:10 ArvinJ-H