Review main Merged

47251[BUGFIX] Ensure correct order of @-rules in CSS

Andreas Kienast CR +2 V +2 Normal +43 −10 updated 03/21/16, 09:34

Commit message

The ResourceCompressor must ensure the correct order of
@-rules, which is:
1. charset
2. namespace
3. import

If the concatenated CSS contains multiple @charset rules, only
the first one is taken into account.

Review

  • Code review CR +2
    • Andreas Kienast +2
    • Jigal van Hemert +1
    • Michael Oehlhof +1
  • Verified V +2
    • Andreas Kienast +2
    • Riccardo De Contardi +1
    • Jigal van Hemert +1

Issues 1

Files 4

Review log 17

  1. Andreas Kienast uploaded patch set 1 03/14/16, 13:39

  2. Andreas Kienast uploaded patch set 2 03/14/16, 13:40

  3. Andreas Kienast commented on patch set 2 V -1 03/14/16, 14:01

    Somehow, @charset is missing in the CSS file although it's in the generated string in cssFixStatements.
  4. Andreas Kienast uploaded patch set 3 03/14/16, 14:48

  5. Jigal van Hemert uploaded patch set 4 03/17/16, 00:16

  6. Jigal van Hemert commented on patch set 4 CR +1 V +1 03/17/16, 00:17

    A simpler alternative to sort out the different at-rules.
  7. Andreas Kienast voted on patch set 4 CR +1 V +1 03/17/16, 07:23

  8. Frank Nägler voted on patch set 4 CR +1 V +1 03/18/16, 16:59

  9. Frank Nägler commented on patch set 4 CR 0 V 0 03/18/16, 17:08

    ResourceCompressor.php:545

    this let win the first charset which is found. Sure, different charset make no sense, but could happen. I have no idea how to find the correct charset.
  10. Jigal van Hemert commented on patch set 4 03/18/16, 20:36

    ResourceCompressor.php:545 Reply

    There is no "correct charset" in such cases. But what can you do? There can only be a single @charset and it must be before other at-rules and selectors. Within the current implementation of a concatenator the only option is to pick one. The first one is as good a choice as any.
  11. Michael Oehlhof commented on patch set 4 03/18/16, 21:32

    ResourceCompressor.php:541

    is the 1 correct? Mustn't it be 0?
  12. Andreas Kienast commented on patch set 4 03/18/16, 21:33

    ResourceCompressor.php:541 Reply

    Yes, because [1] holds the matches of the first group, in this case (charset|import|namespace)
  13. Michael Oehlhof commented on patch set 4 CR +1 03/18/16, 21:37

    ResourceCompressor.php:541 Reply

    OK, i see.
  14. Riccardo De Contardi voted on patch set 4 V +1 03/19/16, 16:11

  15. Andreas Kienast voted on patch set 4 CR +2 V +2 03/21/16, 09:34

  16. Gerrit merged patch set 4 03/21/16, 09:34

  17. Andreas Kienast commented on patch set 5 03/21/16, 09:34

    Cherry Picked This patchset was cherry picked to branch TYPO3_7-6 as commit 3c31ed357d2230219dea4c0e730b0c94ea8d70a1