benjaminkott / benjaminkott/bootstrap_package

Allow using SCSS files for contentsCss stylesheets

Open
#1,427 0 comments 1 reaction 0 assignees View on GitHub
feature
Dominant language
PHP
Stars
355
Forks
212
Avg merge
1h 4m
Merged PRs (30d)
31

Description

# Feature Request

In the current setup, the `ScssParser` is able to automatically catch and compile SCSS to CSS if configured for page stylesheets. However, this does not seem to work for the RTE stylesheet, thus an additional build step is needed there. Ideally, we could define SCSS anywhere and parse to CSS as we do for pages.

This would allow to keep frontend and rte stylesheets in sync more easily, does not force the developer to add a custom build step after changing styles and reduce confusion around this issue (people manually changing css in the compiled version...).

## Is your feature request related to a problem? Please describe

Configuring an SCSS file for `contentsCss` in the RTE config does trigger the `ScssParser` but `@imports` are not being resolved and it throws `file not found` errors. Seems to me this almost _should_ work?!

## Describe the solution you'd like

Allow setting
```
// Default.yaml
config.editor.contentsCss = 'EXT:bootstrap_package/Resources/Public/Scss/bootstrap5/rte.scss'
```
-> `ScssParser` compiles the resource to CSS automatically

## Describe alternatives you've considered

Adding a manual / automatic build step to create `rte.css` after some trigger.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how contentsCss from Default.yaml reaches the ScssParser, using the rte.scss example as the reproduction case. Compare that path with page stylesheet handling, then verify that SCSS imports resolve and the RTE receives compiled CSS without a manual build step.

Written by the indexing model from the issue text.

Assessment

Tech stack
scss
Domain
build-system, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.