Skip to content

Conversation

@Sereza7
Copy link
Contributor

@Sereza7 Sereza7 commented Nov 18, 2025

Jira URL

https://jira.xwiki.org/browse/XWIKI-23655

Changes

Description

  • Moved the content of print.less to print.css
  • Deleted print.less
  • Updated bootstrap.less to accept compiling without any print styles (for XS they are handled completely on flamingo's side now)
  • Improved codestyle of the migrated LESS.
  • Added a LICENSE to the updated CSS file.

Clarifications

  • The file print.less is declared in flamingo BUT it's used by bootstrap.less in the bootstrap module. bootstrap.less is used in style.less.vm from flamingo.
  • print.less did not contain variable or mixin declaration, removing it will not break other LESS files from bootstrap in unexpected ways.
  • There's already a file called print.css (that probably existed before we used bootstrap). This makes it so that just renaming the file would be confusing. Instead of creating two files print.css in slightly different places, I decided to move the code previously in print.less in the existing file.
  • The LESS compilation of bootstrap styles in flamingo includes all of its LESS files, except print.less which was overridden by the flamingo one. Since we now have access to our own bootstrap fork, it's easy to set an (optional) tag on the print.less import so that we don't have to keep an empty file in flamingo.
  • We add the rulesets coming from LESS before the ones defined in the original .css file because the resources were loaded in this order. This allows to keep the **Order of appearance** criteria of the CSS cascade the same as it was and avoid unexpected regressions.
  • print.css uses the media attribute of the link element to load the stylesheet only in print mode. On the other hand, print.less was always loaded but a print media query was above all of its blocks. As far as I understand from https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Media_queries/Printing , there is no difference in the result so we might as well use the same method for both and put them together.

Screenshots & Video

Here is a screenshot of the updated source on my local instance (I removed the minimized version to make the change, the fact that it's not getting the minimized version is normal).
Screenshot From 2025-11-18 10-17-46

Executed Tests

Manual tests on my local instance, see screenshot above.
Successfully built mvn clean install -f xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources -Pquality and mvn clean install -f xwiki-platform-core/xwiki-platform-bootstrap/ -Pquality.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • None.

* Moved the content of the file
* Deleted the file
* Updated bootstrap.less to accept compiling without any print styles (they are handled completely on flamingo's side now)
* Improved codestyle of the migrated LESS.
* Added a LICENSE to the updated CSS file.
* Added a horizontal ruler to make the structure hopefully a bit better...
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.

1 participant