Book Image

Build Applications with Meteor

Book Image

Build Applications with Meteor

Overview of this book

This book starts with the basic installation and overview of the main components in Meteor. You’ll get hands-on multiple versatile applications covering a wide range of topics from adding a front-end views with the hottest rendering technology React to implementing a microservices oriented architecture.All the code is written with ES6/7 which is the latest significantly improved JavaScript language. We’ll also look at real-time data streaming, server to server data exchange, responsive styles on the front-end, full-text search functionality, and integration of many third-party libraries and APIs using npm. By the end of the book, you’ll have the skills to quickly prototype and even launch your next app idea in a matter of days.
Table of Contents (16 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
8
Build a Chatbot with Facebook’s Messenger Platform

Modular CSS with LESS


All class names and IDs in CSS are global, which makes it extremely difficult to maintain in large-scale projects. No matter how well you specify your naming conventions, vanilla CSS is a pretty messy language to work with.

Some of the ways we can solve that problem, or at least minimize it, is by implementing CSS preprocessor frameworks, such as Sass and LESS. Both of them are allowing us to separate the style sheets into logical modules (files), create variables, mix in classes, and generate CSS with loops and conditions. At the end of the development cycle, we can compile all the files into one or many plain CSS files before moving the styles to production.

Let's set up a simple Meteor app and implement the same grid with LESS.

In the terminal, run the following command:

>> meteor create less_app;

We need to add the less package, as follows, to allow Meteor to compile the LESS files into CSS:

>> meteor add less;

Here's a screenshot of the folders and files...