[BUGFIX] Apply CKEditor5 CSS scoping client-side
Download CSS via fetch() and apply CSS scoping and URL rebasing on the client in order to avoid the need for a server side SASS wrapper that: * can not relocate relative paths * can not easily check if the resource is web accessible * had to use regex-replacements instead of straight forward replacements on a properly parsed syntax tree Commands executed: composer remove scssphp/scssphp composer remove scssphp/scssphp -d typo3/sysext/core --no-update cd Build npm install --save css-tree npm install --save-dev @types/css-tree npm run build Resolves: #101918 Resolves: #100768 Resolves: #101380 Releases: main, 12.4 Change-Id: I34dfd76c07584a482f9012de1c693f0e7f9a2cb8 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81295 Tested-by:core-ci <typo3@b13.com> Reviewed-by:
Benjamin Kott <benjamin.kott@outlook.com> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
Benjamin Kott <benjamin.kott@outlook.com> Tested-by:
Benjamin Franzke <ben@bnf.dev> Reviewed-by:
Benjamin Franzke <ben@bnf.dev> Tested-by:
Oliver Hader <oliver.hader@typo3.org>
Showing
- Build/Gruntfile.js 1 addition, 0 deletionsBuild/Gruntfile.js
- Build/Sources/TypeScript/rte_ckeditor/ckeditor5.ts 40 additions, 4 deletionsBuild/Sources/TypeScript/rte_ckeditor/ckeditor5.ts
- Build/Sources/TypeScript/rte_ckeditor/css-prefixer.ts 92 additions, 0 deletionsBuild/Sources/TypeScript/rte_ckeditor/css-prefixer.ts
- Build/Sources/TypeScript/rte_ckeditor/tests/css-prefixer-test.ts 266 additions, 0 deletions...ources/TypeScript/rte_ckeditor/tests/css-prefixer-test.ts
- Build/package-lock.json 51 additions, 9 deletionsBuild/package-lock.json
- Build/package.json 2 additions, 0 deletionsBuild/package.json
- Build/web-test-runner.config.mjs 1 addition, 0 deletionsBuild/web-test-runner.config.mjs
- composer.json 0 additions, 1 deletioncomposer.json
- composer.lock 1 addition, 81 deletionscomposer.lock
- typo3/sysext/core/Configuration/JavaScriptModules.php 1 addition, 0 deletionstypo3/sysext/core/Configuration/JavaScriptModules.php
- typo3/sysext/core/Resources/Public/JavaScript/Contrib/css-tree.js 11 additions, 0 deletions...sext/core/Resources/Public/JavaScript/Contrib/css-tree.js
- typo3/sysext/core/composer.json 0 additions, 1 deletiontypo3/sysext/core/composer.json
- typo3/sysext/rte_ckeditor/Classes/Controller/ResourceController.php 0 additions, 87 deletions...xt/rte_ckeditor/Classes/Controller/ResourceController.php
- typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php 0 additions, 20 deletions...ext/rte_ckeditor/Classes/Form/Element/RichTextElement.php
- typo3/sysext/rte_ckeditor/Classes/Service/ScssProcessor.php 0 additions, 67 deletionstypo3/sysext/rte_ckeditor/Classes/Service/ScssProcessor.php
- typo3/sysext/rte_ckeditor/Configuration/Backend/Routes.php 0 additions, 5 deletionstypo3/sysext/rte_ckeditor/Configuration/Backend/Routes.php
- typo3/sysext/rte_ckeditor/Configuration/Services.yaml 0 additions, 12 deletionstypo3/sysext/rte_ckeditor/Configuration/Services.yaml
- typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/ckeditor5.js 2 additions, 2 deletions...ext/rte_ckeditor/Resources/Public/JavaScript/ckeditor5.js
- typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/css-prefixer.js 13 additions, 0 deletions.../rte_ckeditor/Resources/Public/JavaScript/css-prefixer.js
- typo3/sysext/rte_ckeditor/Tests/Unit/Fixtures/compiled.css 0 additions, 114 deletionstypo3/sysext/rte_ckeditor/Tests/Unit/Fixtures/compiled.css
Please register or sign in to comment