Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS map (cssSourceMapping) #1263

Closed
2 of 3 tasks
SventB opened this issue Apr 17, 2023 · 3 comments
Closed
2 of 3 tasks

CSS map (cssSourceMapping) #1263

SventB opened this issue Apr 17, 2023 · 3 comments

Comments

@SventB
Copy link
Contributor

SventB commented Apr 17, 2023

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v10.4 LTS
  • Can you reproduce the problem on TYPO3 v11.5
  • Did you perform a cursory search
    to see if your bug or enhancement is already reported?

Description

I'd like to enable CSS source maps.
I've activated it in TypoScript:

plugin.bootstrap_package.settings.cssSourceMapping = 1

And after some debugging I got it to work.

I had to disable CSS compression and concatenation:

config.compressCss = 0
config.concatenateCss = 0

Description says, this will be done automatically:

CSS source mapping: Create a CSS source map useful to debug CSS in browser developer tools. Note: CSS compression will be disabled.

And in windows environment, the file paths are wrong:

sourcemap

@cumuru
Copy link
Contributor

cumuru commented Jun 5, 2023

I will have a look.

cumuru added a commit to cumuru/bootstrap_package that referenced this issue Jun 6, 2023
The source maps are no longer inlined in the compiled CSS file.
There‘s a .css.map file for the compiled CSS file instead. Sources
are now included into the map file. This means that sources can now
be moved to non-public folders without losing the possibility
to debug your code.

Related: benjaminkott#1263
@cumuru
Copy link
Contributor

cumuru commented Jun 6, 2023

We changed the concept: the source map will now be an external file in the same folder as the compiled CSS file. The source map file will include the sources itself so you‘ll be able to move your SCSS to a private folder and avoid exposing them.
Please note that atm legacy inclusion does not work with TYPO3 v12.

benjaminkott pushed a commit that referenced this issue Jun 6, 2023
The source maps are no longer inlined in the compiled CSS file.
There‘s a .css.map file for the compiled CSS file instead. Sources
are now included in the map file. This means that sources can now
be moved to non-public folders without losing the possibility
to debug your code.

Related: #1263
@benjaminkott benjaminkott moved this from In progress to Done in Code Sprint A11Y Certification Jun 7, 2023
benjaminkott pushed a commit that referenced this issue Jun 22, 2023
The source maps are no longer inlined in the compiled CSS file.
There‘s a .css.map file for the compiled CSS file instead. Sources
are now included in the map file. This means that sources can now
be moved to non-public folders without losing the possibility
to debug your code.

Related: #1263
@SventB
Copy link
Contributor Author

SventB commented Jan 7, 2024

@benjaminkott @cumuru But still, source map is not working. I still have to disable CSS compression and concatenation. Perhaps you should do this with a TypoScript condition in EXT:bootstrap_package:

[{$plugin.bootstrap_package.settings.cssSourceMapping} == 1]
    config.compressCss = 0
    config.concatenateCss = 0
[end]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants