Bootstrap for Rails
上QQ阅读APP看书,第一时间看更新

Challenges in styling a Rails application traditionally

The application which we have created was so basic that we did not write a single line of code for its logic part. We didn't even touch the HTML layout of the application. You have seen how complex the CSS styling can be at some places, such as designing a link. The CSS which we have written here is very poorly organized. We have a target element level selector at many places to apply styles to them. This is considered as a very poor way of designing.

Our CSS code was not segregated into various, smaller parts. All the styles were written directly in one file, styles.css. In the coming chapters, we will see how we can use SASS to apply styles to our Rails applications. Using SASS, we can bring logic to the CSS codes.

We will also overcome the difficulties of styling each and every element in our Rails application using Bootstrap. You will realize how easy it can become for a Non-CSS developer to design a high-end application using Bootstrap. You won't write a single piece of CSS code when using Bootstrap. Its developers have written a bunch of CSS codes for you.