apache / apache/royale-compiler
CSS processing order matters
- Dominant language
- Java
- Stars
- 113
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
while doing Jewel SimpleLoader component I discover the following css rule:
```
.jewel.loader {
border: 16px solid #f3f3f3
border-radius: 50%
border-top: 16px solid #3498db
}
```
doesn't work as expected. The "border-top" is output before "border" and this make it border takes precedence, while if we left the current order, the browser finds first border and then border-top so making the border top blue instead of grey.
Workaround for now is:
```
.jewel.loader {
border: 16px solid #f3f3f3
border-radius: 50%
}
.jewel.loader.segment {
border-top: 16px solid #3498db
}
```
butis very limiting and cumbersome.
I think we're doing some kind of rule ordering while processing, since no matter how I define the CSS, I get always the same order. I think we should prevent any ordering to avoid this kind of problems that are valid CSS and becomes invalid.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Jewel SimpleLoader CSS case and trace the compiler's CSS rule-processing path to find where declaration order changes. Done means valid CSS preserves the intended order so border-top is emitted after border, with a regression test for the reported input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, java
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100