rails/guides
Rafael Mendonça França c48aab17ce
Remove deprecated `ActiveSupport::Notifications::Event#children` and `ActiveSupport::Notifications::Event#parent_of?`
2024-05-01 18:45:46 +00:00
..
assets Document buildkite/docs-preview pipeline 2024-05-01 08:05:36 +09:00
bug_report_templates Pin sqlite3 version in bug_report_templates 2024-04-18 09:48:41 +09:00
rails_guides Fix building guides outside ./guides directory 2024-04-24 09:54:30 +09:00
source Remove deprecated `ActiveSupport::Notifications::Event#children` and `ActiveSupport::Notifications::Event#parent_of?` 2024-05-01 18:45:46 +00:00
.document adds guides/.document to tell rdoc not to process this directory 2013-03-04 22:28:23 +01:00
.rubocop.yml Document `response.parsed_body` in 7.1 release notes 2023-08-23 15:33:52 -04:00
CHANGELOG.md Development of Rails 7.2 starts now 2023-09-27 03:59:11 +00:00
README.md Fixed typo in guides/README.md 2024-03-28 21:51:23 +09:00
Rakefile Use version of importmap that support loading outside of an app 2023-10-27 20:23:42 +00:00
rails_guides.rb Replaces mobi guide with epub for docs because of discontinued support 2022-08-05 00:18:20 +05:30
w3c_validator.rb Use frozen string literal in guides/ 2017-08-13 22:04:09 +09:00

README.md

Rails Guides Redesign 2024

About the Project

The Rails Guides Visual Refresh occurred in Q1 2024, and was intended to bring the visual style of the guides inline with the rubyonrails.org site.

Editing Dependencies

The editing files for the Guides rebuild reside in stylesrc and use SCSS to improve developer experience. The code base relies on include_media (https://eduardoboucas.github.io/include-media/) to enable inline media-queries adjustments. We've also relied on the standard normalize.css (https://necolas.github.io/normalize.css/) to help bring all browsers together.

Building the Guides in Development

To generate new guides into static files, type rake guides:generate from inside the guides folder. If you make changes to the HTML or ERB, you'll need to remove the "output" directory before running this command. The master SCSS files (style.scss, highlight.scss) will compile as part of this process.

FAQ

Why are you not using CSS variables?

Per the MDN documentation on CSS custom properties (https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties), they are not supported in media or container queries at this point (Feb 2024). They may in future releases, and we should pivot to that when they are more wholistically supported. SCSS variables, because they are interpolated at build, serve a similar purpose and allow us the flexibility to support much older browsers.

Why do we include LTR and RTL?

LTR/RTL (Left to right/right to left) is a layout change based on the nature of the language the site is being displayed in. Arabic and Farsi are two well known "RTL" languages. If the site is automatically translated, then the layout will adjust (mirror horizontally) to be more in line with the text.

Why is Dark Mode in a separate file

IncludeMedia does not handle prefers-color-scheme at this time, so it was extracted.