[RUBY] [Rails] [bootstrap] I want to change the font size responsively

Premise

Use gem bootstrap

Thing you want to do

Create responsive screens with Rails. At that time, I want to make the size of the characters nicely larger or smaller.

Conclusion

app/assets/stylesheets/application.scss


body, html { font-size: 30px; }
@media screen and (min-width: 576px) and (max-width: 768px) { body, html { font-size: 30px; } }
@media screen and (min-width: 769px) and (max-width: 992px) { body, html { font-size: 30px; } }
@media screen and (min-width: 993px) and (max-width: 1200px) { body, html { font-size: 16px; } }
@media screen and (min-width: 1201px) { body, html { font-size: 20px; } }

OK if you change the above size Looking at various things, it is better not to set with px, so other methods are also under consideration This time it's more about writing scss than Rails

Recommended Posts

[Rails] [bootstrap] I want to change the font size responsively
I tried to introduce Bootstrap 4 to the Rails 6 app [for beginners]
I want to change the log output settings of UtilLoggingJdbcLogger
I want to create a form to select the [Rails] category
I want to change the value of Attribute in Selenium of Ruby
I want to introduce the committee with Rails without getting too dirty
[Rails] I tried to raise the Rails version from 5.0 to 5.2
I tried to organize the session in Rails
I want to var_dump the contents of the intent
The code I used to connect Rails 3 to PostgreSQL 10
I want to play with Firestore from Rails
I want to truncate after the decimal point
[Rails] I want to load CSS with webpacker
I want to get the value in Ruby
[Rails / ActiveRecord] I want to validate the value before the type is converted (_before_type_cast)
Introducing Bootstrap to Rails 5
Introducing Bootstrap to Rails !!
[Java] I want to calculate the difference from the date
I want to embed any TraceId in the log
[Ruby on Rails] How to change the column name
I want to judge the range using the monthly degree
I want to use a little icon in Rails
I want to know the answer of the rock-paper-scissors app
[Rails] I don't know how to use the model ...
I want to display the name of the poster of the comment
I want to dark mode with the SWT app
[Rails] How to change the column name of the table
I want to authenticate users to Rails with Devise + OmniAuth
I want to define a function in Rails Console
I want to call the main method using reflection
[Rough commentary] I want to marry the pluck method
I want to be aware of the contents of variables!
I want to return the scroll position of UITableView!
I want to simplify the log output on Android
I want to add a delete function to the comment function
Rails The concept of view componentization of Rails that I want to convey to those who want to quit
[rails] After option useful when you want to change the order of DB columns
I want to change the path after new registration after logging in with multiple devises.
[Rails] I want to display the link destination of link_to in a separate tab
I want to hit the API with Rails on multiple docker-composes set up locally
[Beginner] I want to modify the migration file-How to use rollback-
I want to set the conditions to be displayed in collection_check_boxes
I want to use screen sharing on the login screen on Ubuntu 18
I want to convert characters ...
(ยด-`) .. oO (I want to easily find the standard output "Hello".
After posting an article with Rails Simple Calendar, I want to reflect it in the calendar.
I want to push an app made with Rails 6 to GitHub
I want to bring Tomcat to the server and start the application
I want to expand the clickable part of the link_to method
I want to call a method and count the number
I want to use the Java 8 DateTime API slowly (now)
I want to use the sanitize method other than View.
I want to get a list of the contents of a zip file and its uncompressed size
I want to change the color of the upper control navigation bar (Control menu) in Liferay 7 / DXP
[Rails] I want to display "XX minutes ago" using created_at!
I want to control the maximum file size in file upload for each URL in Spring Boot
I want to put the JDK on my Mac PC
I want to give a class name to the select attribute
I want to recursively search the class list under the package
I want to distinct the duplicated data with has_many through
When you want to change the MySQL password of docker-compose