Skip to content

The behaviour of rebasing URLs when an output is given should be overwriteable #87

Description

@Lenni009

You sometimes don't want to rebase the URLs, for example when everything stays in the same directory. So if I previously had a folder src/css/ and in it a file with this CSS:

@import 'fonts.css'

clean-css-cli does this:

@import 'src/css/fonts.css'

Now the style breaks because there is no adjacent src folder to the CSS file.

On the contrary, this would be fine (added slash in front of path to make it absolute):

@import '/src/css/fonts.css'

Solutions:

  • Either fix the rebase algorithm to add a / to the rebased URL to make it absolute
  • Give the user an option to overwrite this behaviour. I tried version 4.3, which still had --skip-rebase enabled, and that worked (but threw a bunch of other errors/warnings, so can't use it in prod)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions