diff --git a/source/wp-content/themes/wporg-themes-2024/package.json b/source/wp-content/themes/wporg-themes-2024/package.json
index 3ce52d2..72b2b31 100644
--- a/source/wp-content/themes/wporg-themes-2024/package.json
+++ b/source/wp-content/themes/wporg-themes-2024/package.json
@@ -6,7 +6,8 @@
"license": "GPL-2.0-or-later",
"private": true,
"devDependencies": {
- "@wordpress/scripts": "27.6.0"
+ "@wordpress/scripts": "27.6.0",
+ "rtlcss-webpack-plugin": "4.0.7"
},
"eslintConfig": {
"extends": "../../../../.eslintrc.js"
diff --git a/source/wp-content/themes/wporg-themes-2024/src/ratings-bars/style.scss b/source/wp-content/themes/wporg-themes-2024/src/ratings-bars/style.scss
index 43d62bc..a52b6aa 100644
--- a/source/wp-content/themes/wporg-themes-2024/src/ratings-bars/style.scss
+++ b/source/wp-content/themes/wporg-themes-2024/src/ratings-bars/style.scss
@@ -42,7 +42,8 @@
.wporg-ratings-bars__bar-foreground {
position: absolute;
- inset: 0 auto 0 0;
+ inset: 0;
+ right: auto;
background-color: var(--wp--custom--wporg-ratings-stars--color--fill);
}
diff --git a/source/wp-content/themes/wporg-themes-2024/src/ratings-stars/render.php b/source/wp-content/themes/wporg-themes-2024/src/ratings-stars/render.php
index bfbdbe4..3a0a7e7 100644
--- a/source/wp-content/themes/wporg-themes-2024/src/ratings-stars/render.php
+++ b/source/wp-content/themes/wporg-themes-2024/src/ratings-stars/render.php
@@ -20,11 +20,11 @@
';
+ echo '';
} else if ( $i + 0.5 === $display_rating ) {
- echo '';
+ echo '';
} else {
- echo '';
+ echo '';
}
}
?>
diff --git a/source/wp-content/themes/wporg-themes-2024/src/ratings-stars/style.scss b/source/wp-content/themes/wporg-themes-2024/src/ratings-stars/style.scss
index 659eb70..bffd76a 100644
--- a/source/wp-content/themes/wporg-themes-2024/src/ratings-stars/style.scss
+++ b/source/wp-content/themes/wporg-themes-2024/src/ratings-stars/style.scss
@@ -12,6 +12,11 @@
margin-inline-start: -6px;
fill: var(--wp--custom--wporg-ratings-stars--color--fill);
}
+
+ // Flip the half-star for RTL views.
+ .rtl & .is-star-half {
+ transform: rotateY(-180deg);
+ }
}
.wporg-ratings-stars__label {
diff --git a/source/wp-content/themes/wporg-themes-2024/webpack.config.js b/source/wp-content/themes/wporg-themes-2024/webpack.config.js
new file mode 100644
index 0000000..bf22173
--- /dev/null
+++ b/source/wp-content/themes/wporg-themes-2024/webpack.config.js
@@ -0,0 +1,27 @@
+const RtlCssPlugin = require( 'rtlcss-webpack-plugin' );
+const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
+
+// When using `--experimental-modules`, the config comes as two objects,
+// one for plain scripts and one for module scripts.
+// Add the RTL config to both.
+if ( Array.isArray( defaultConfig ) ) {
+ module.exports = defaultConfig.map( ( config ) => ( {
+ ...config,
+ plugins: [
+ ...config.plugins,
+ new RtlCssPlugin( {
+ filename: `[name]-rtl.css`,
+ } ),
+ ],
+ } ) );
+} else {
+ module.exports = {
+ ...defaultConfig,
+ plugins: [
+ ...defaultConfig.plugins,
+ new RtlCssPlugin( {
+ filename: `[name]-rtl.css`,
+ } ),
+ ],
+ };
+}
diff --git a/yarn.lock b/yarn.lock
index ddbb876..2754926 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3953,6 +3953,14 @@ babel-preset-jest@^29.6.3:
babel-plugin-jest-hoist "^29.6.3"
babel-preset-current-node-syntax "^1.0.0"
+babel-runtime@~6.25.0:
+ version "6.25.0"
+ resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.25.0.tgz#33b98eaa5d482bb01a8d1aa6b437ad2b01aec41c"
+ integrity sha512-zeCYxDePWYAT/DfmQWIHsMSFW2vv45UIwIAMjGvQVsTd47RwsiRH0uK1yzyWZ7LDBKdhnGDPM6NYEO5CZyhPrg==
+ dependencies:
+ core-js "^2.4.0"
+ regenerator-runtime "^0.10.0"
+
balanced-match@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
@@ -4635,6 +4643,11 @@ core-js-pure@^3.25.1:
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.25.2.tgz#44a4fd873bdd4fecf6ca11512bcefedbe87e744a"
integrity sha512-ItD7YpW1cUB4jaqFLZXe1AXkyqIxz6GqPnsDV4uF4hVcWh/WAGIqSqw5p0/WdsILM0Xht9s3Koyw05R3K6RtiA==
+core-js@^2.4.0:
+ version "2.6.12"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
+ integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
+
core-js@^3.31.0:
version "3.36.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.36.1.tgz#c97a7160ebd00b2de19e62f4bbd3406ab720e578"
@@ -8136,6 +8149,11 @@ nanoid@^3.3.4:
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
+nanoid@^3.3.7:
+ version "3.3.7"
+ resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
+ integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
+
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
@@ -8965,6 +8983,15 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0:
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
+postcss@^8.3.11:
+ version "8.4.38"
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e"
+ integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==
+ dependencies:
+ nanoid "^3.3.7"
+ picocolors "^1.0.0"
+ source-map-js "^1.2.0"
+
postcss@^8.4.16, postcss@^8.4.5, postcss@^8.4.7:
version "8.4.16"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.16.tgz#33a1d675fac39941f5f445db0de4db2b6e01d43c"
@@ -9273,6 +9300,11 @@ regenerate@^1.4.2:
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==
+regenerator-runtime@^0.10.0:
+ version "0.10.5"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658"
+ integrity sha512-02YopEIhAgiBHWeoTiA8aitHDt8z6w+rQqNuIftlM+ZtvSl/brTouaU7DW6GO/cHtvxJvS4Hwv2ibKdxIRi24w==
+
regenerator-runtime@^0.13.4:
version "0.13.9"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52"
@@ -9471,6 +9503,24 @@ robots-parser@^3.0.0:
resolved "https://registry.yarnpkg.com/robots-parser/-/robots-parser-3.0.1.tgz#3d8a3cdfa8ac240cbb062a4bd16fcc0e0fb9ed23"
integrity sha512-s+pyvQeIKIZ0dx5iJiQk1tPLJAWln39+MI5jtM8wnyws+G5azk+dMnMX0qfbqNetKKNgcWWOdi0sfm+FbQbgdQ==
+rtlcss-webpack-plugin@4.0.7:
+ version "4.0.7"
+ resolved "https://registry.yarnpkg.com/rtlcss-webpack-plugin/-/rtlcss-webpack-plugin-4.0.7.tgz#38b1708029f890f2db14bee510f25e57faf81669"
+ integrity sha512-ouSbJtgcLBBQIsMgarxsDnfgRqm/AS4BKls/mz/Xb6HSl+PdEzefTR+Wz5uWQx4odoX0g261Z7yb3QBz0MTm0g==
+ dependencies:
+ babel-runtime "~6.25.0"
+ rtlcss "^3.5.0"
+
+rtlcss@^3.5.0:
+ version "3.5.0"
+ resolved "https://registry.yarnpkg.com/rtlcss/-/rtlcss-3.5.0.tgz#c9eb91269827a102bac7ae3115dd5d049de636c3"
+ integrity sha512-wzgMaMFHQTnyi9YOwsx9LjOxYXJPzS8sYnFaKm6R5ysvTkwzHiB0vxnbHwchHQT65PTdBjDG21/kQBWI7q9O7A==
+ dependencies:
+ find-up "^5.0.0"
+ picocolors "^1.0.0"
+ postcss "^8.3.11"
+ strip-json-comments "^3.1.1"
+
run-async@^2.4.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
@@ -9857,6 +9907,11 @@ socks@^2.7.1:
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
+source-map-js@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af"
+ integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==
+
source-map-loader@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-3.0.1.tgz#9ae5edc7c2d42570934be4c95d1ccc6352eba52d"