Skip to content

rebase relative stylesheet assets when using preprocessors #17537

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

Merged
merged 3 commits into from
Apr 27, 2020

Conversation

clydin
Copy link
Member

@clydin clydin commented Apr 24, 2020

Previously, when using a preprocessor, resources (e.g., url(./my-image.jpg)) referenced in a stylesheet that was imported into another stylesheet would retain the exact URL. This would be problematic as the resource would not be at the relative location within the new combined stylesheet. With this change the resource URLs will now be adjusted to reference the origin location of the resource. This allows the resources to be found without any additional changes to the application or build process.
CSS and Less already functioned in this manner. This change brings Sass and Stylus to parity.

Fixes: #12797

@clydin clydin added the target: major This PR is targeted for the next major release label Apr 24, 2020
@clydin clydin changed the title Style fixes rebase relative stylesheet assets when using preprocessors Apr 24, 2020
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, can you add the closes clause in the commit commit? As this, solved #12797

@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Apr 27, 2020
clydin added 3 commits April 27, 2020 10:14
…s when using preprocessors

Previously, when using a preprocessor, resources (e.g., `url(./my-image.jpg)`) referenced in a stylesheet that was imported into another stylesheet would retain the exact URL.  This would be problematic as the resource would not be at the relative location within the new combined stylesheet.  With this change the resource URLs will now be adjusted to reference the origin location of the resource.  This allows the resources to be found without any additional changes to the application or build process.
CSS and Less already functioned in this manner. This change brings Sass and Stylus to parity.

Fixes: angular#12797
@mgechev mgechev merged commit 254994d into angular:master Apr 27, 2020
@clydin clydin deleted the style-fixes branch April 27, 2020 18:09
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't use relative paths in url() in scss files
4 participants