rails/guides/assets
Jonathan Hefner 23d0cd6f6f Unify LTR / RTL CSS for guides
When `main.css` is updated, it is easy for `main.rtl.css` to be
overlooked (see #45423).

This commit eliminates `main.rtl.css` in favor of a unified approach to
LTR / RTL styling in `main.css`.  To accomplish this, the `<body>`
element is rendered with a [`dir` attribute][] (which has the same
effect as setting the CSS `direction` property), and LTR- / RTL-specific
styles are prefixed with `:where(body[dir="..."])` selectors.  (The
[`:where()` pseudo-class][] ensures that selector specificity is not
changed.)

This change also paves the way for automatic detection and application
of LTR / RTL styles when the [`:dir()` pseudo-class][] gains widespread
browser support.

[`dir` attribute]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir
[`:where()` pseudo-class]: https://developer.mozilla.org/en-US/docs/Web/CSS/:where
[`:dir()` pseudo-class]: https://developer.mozilla.org/en-US/docs/Web/CSS/:dir
2022-06-22 16:42:48 -05:00
..
images Use the CSS badge for the API docs as well 2022-05-10 21:05:59 +02:00
javascripts Show Guides Index as selected for / on small screens [ci-skip] 2022-06-06 19:05:51 +02:00
stylesheets Unify LTR / RTL CSS for guides 2022-06-22 16:42:48 -05:00
robots.txt Just adding an allow all robots.txt file 2021-02-23 18:14:05 +00:00