← All tasks
javascriptcssnano/cssnano #1502Not a task: already works

[Bug]: Borders rules with logical properties are not ordered correctly.

envgap__cssnano__cssnano-1502

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
7384c019ff03478499ca9ef6a33da9c1a8b9dbd8
Manifest
packages/cssnano-preset-default/package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

cssnano/cssnano #1502 · read the original issue
### Describe the bug



When using `border-end-start-radius` with `border-radius` the declarations are ordered incorrectly.



```css

.selector {

  border-radius: 5px;

  border-end-start-radius: 0;

  border-end-end-radius: 0;

}

```



Becomes:



```css

.selector{

  border-end-end-radius:0;

  border-end-start-radius:0;

  border-radius:5px;

}

```



The shorthand overrides the longhand and the outcome is incorrect border radii.





### Expected behaviour



The declaration order should follow something similar to what is done with other border longhand rules in relationship to the shorthand and always have the shorthand at the beginning. This currently happens with illogical properties (`bottom-right` and `bottom-left`):



```css

.selector {

  border-radius: 5px;

  border-bottom-left-radius: 0;

  border-bottom-right-radius: 0;

}

```



Becomes 



```css

.selector{

  border-radius:5px;

  border-bottom-left-radius:0;

  border-bottom-right-radius:0;

}

```



### Steps to reproduce



1. Visit https://cssnano.co/playground/

2. Apply the following sample code:

    ```css

    .selector {

      border-radius: 5px;

      border-end-start-radius: 0;

      border-end-end-radius: 0;

    }

    ```

3. See the output.



### Version



All



### Preset



default



### Environment



```shell

Playground site, et al.

```





### Package details



```shell

Playground site, et al.



`cssnano@>5.0.15`

```





### Additional context



_No response_
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]