mirror of https://github.com/rails/rails
23d0cd6f6f
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 |
||
---|---|---|
.. | ||
markdown | ||
generator.rb | ||
helpers.rb | ||
kindle.rb | ||
markdown.rb |