Skip to main content

JavaScript and CSS

  • Chapter
  • First Online:
  • 1259 Accesses

Abstract

JavaScript and CSS (Cascading Style Sheets) are no longer relegated to supporting roles on the Web. They have become first-class citizens, and it would seem pretty strange to build a web application without them. It’s now common to have hundreds or thousands of lines of JavaScript, and just as many lines of style sheets. Rails applications have always supported serving JavaScript and CSS, but it became clear that a better solution was needed. In Rails 3.1, the asset pipeline was introduced. This made JavaScript and CSS a first-class citizen of the Rails application and allowed for proper organization and handling of your scripts and styles. It handles combining and minifying files to support quick download times and provides support for languages that compile down to JavaScript (CoffeeScript) and CSS (SASS).

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Adam Gamble

About this chapter

Cite this chapter

Gamble, A., Carneiro, C., Barazi, R.A. (2013). JavaScript and CSS. In: Beginning Rails 4. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-6035-6_9

Download citation

Publish with us

Policies and ethics