Skip to content

Conversation

@tbela99
Copy link
Owner

@tbela99 tbela99 commented Nov 12, 2022

No description provided.

tbela99 and others added 19 commits November 11, 2022 22:32
This optimisation disables relative paths when the output path is longer
than the input path - but the result of that is that the generated CSS
ends up pointing to URLs that are relative to the current directory
instead of being relative to the generated CSS file.

input: test-in/style.css
```
.foo { background-image: url("./local.png"); }
```

output: test-out/style.css
```
.foo { background-image: url("../test-in/local.png"); }
```

output: test-out/nested/path/style.css
```
.foo { background-image: url("test-in/local.png"); }
```
I'm getting a ton of error messages in my logs like:
```
Deprecated: Return type of TBela\CSS\Element::offsetUnset($offset) should
either be compatible with ArrayAccess::offsetUnset(mixed $offset): void,
or the #[\ReturnTypeWillChange] attribute should be used to temporarily
suppress the notice in [...]/src/ArrayTrait.php on line 72
```
and
```
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type
string is deprecated in [...]/src/Value.php on line 590
```
…either be compatible with ArrayAccess::offsetSet(mixed , mixed ): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Remove an optimisation which breaks relative URLs
use relative paths in sourcemap
Fix FontFamily unclosed method
Fix deprecations on v.next branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants