]> git.openstreetmap.org Git - rails.git/commitdiff
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)
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]

diff --git a/app/assets/stylesheets/ltr/common.scss b/app/assets/stylesheets/ltr/common.scss
deleted file mode 120000 (symlink)
index 85037a3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../common.scss
\ No newline at end of file
diff --git a/app/assets/stylesheets/print-ltr.css b/app/assets/stylesheets/print-ltr.css
deleted file mode 100644 (file)
index 162c6f2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/*
- *= require print
- */
diff --git a/app/assets/stylesheets/print-ltr.scss b/app/assets/stylesheets/print-ltr.scss
new file mode 100644 (file)
index 0000000..ced65cf
--- /dev/null
@@ -0,0 +1 @@
+@import "print";
diff --git a/app/assets/stylesheets/print-rtl.css b/app/assets/stylesheets/print-rtl.css
deleted file mode 100644 (file)
index 162c6f2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/*
- *= require print
- */
diff --git a/app/assets/stylesheets/print-rtl.r2.scss b/app/assets/stylesheets/print-rtl.r2.scss
new file mode 100644 (file)
index 0000000..ced65cf
--- /dev/null
@@ -0,0 +1 @@
+@import "print";
diff --git a/app/assets/stylesheets/rtl/common.r2.scss b/app/assets/stylesheets/rtl/common.r2.scss
deleted file mode 120000 (symlink)
index 85037a3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../common.scss
\ No newline at end of file
diff --git a/app/assets/stylesheets/screen-ltr.css b/app/assets/stylesheets/screen-ltr.css
deleted file mode 100644 (file)
index a0890d1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/*
- *= require ltr/common
- */
diff --git a/app/assets/stylesheets/screen-ltr.scss b/app/assets/stylesheets/screen-ltr.scss
new file mode 100644 (file)
index 0000000..c525060
--- /dev/null
@@ -0,0 +1 @@
+@import "common";
diff --git a/app/assets/stylesheets/screen-rtl.css b/app/assets/stylesheets/screen-rtl.css
deleted file mode 100644 (file)
index c0f4d79..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/*
- *= require rtl/common
- */
diff --git a/app/assets/stylesheets/screen-rtl.r2.scss b/app/assets/stylesheets/screen-rtl.r2.scss
new file mode 100644 (file)
index 0000000..c525060
--- /dev/null
@@ -0,0 +1 @@
+@import "common";