]> git.openstreetmap.org Git - rails.git/commit
Avoid using sprockets for combining stylesheets
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 12 Jul 2023 16:46:01 +0000 (17:46 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 12 Jul 2023 16:54:51 +0000 (17:54 +0100)
commite108ec6d48e4e2ec5f7c6451fde7328adcb1c7cd
tree447b706a9b017805529e2a1accbb7bb23d5924a2
parent17b18fcb816f26953a05742d2101cef99df87d30
Avoid using sprockets for combining stylesheets

There are two options for combining stylesheets, using sprockets
(via `require` statements) or using sass (via `@import` statements).

This commit switches to using `@import` statements throughout, to
avoid a bug with libsass that prevents us from using bootstrap 5.2+

See https://github.com/sass/sassc-rails/issues/174

Since R2 is not triggered when `@import`ing a file, we need to
switch the top-level stylesheet names to include the extension. We
can also take the opportunity to remove a level of indirection,
along with removing symlinks which cause problems on some platforms.

* https://github.com/openstreetmap/openstreetmap-website/issues/3984
* https://github.com/openstreetmap/openstreetmap-website/issues/3422
app/assets/stylesheets/ltr/common.scss [deleted symlink]
app/assets/stylesheets/print-ltr.css [deleted file]
app/assets/stylesheets/print-ltr.scss [new file with mode: 0644]
app/assets/stylesheets/print-rtl.css [deleted file]
app/assets/stylesheets/print-rtl.r2.scss [new file with mode: 0644]
app/assets/stylesheets/print.scss [moved from app/assets/stylesheets/print.css with 100% similarity]
app/assets/stylesheets/rtl/common.r2.scss [deleted symlink]
app/assets/stylesheets/screen-ltr.css [deleted file]
app/assets/stylesheets/screen-ltr.scss [new file with mode: 0644]
app/assets/stylesheets/screen-rtl.css [deleted file]
app/assets/stylesheets/screen-rtl.r2.scss [new file with mode: 0644]