Book Image

Creating Interfaces with Bulma

By : Jeremy Thomas, Oleksii Potiekhin, Mikko Lauhakari, Aslam Shah, Dave Berning
Book Image

Creating Interfaces with Bulma

By: Jeremy Thomas, Oleksii Potiekhin, Mikko Lauhakari, Aslam Shah, Dave Berning

Overview of this book

Bulma is a lightweight configurable CSS framework that handles all the hard work of Flexbox for you. Bulma makes creating web interfaces an easy and interesting job. This book begins with an overview of the basics of Bulma ? its terms and its concepts. Then, while designing a login page for your application, you’ll learn how to use the various tools provided by Bulma to create HTML forms and control their layout and flow. In the later chapters, you’ll design an admin area for your application, thus learning to use Bulma’s navigation and menu components. You will also add the components to your user interface for common things such as boxes, lists, and media groups, and then create pagination. As you progress through the book, you’ll create and layout some other components for your interface, including tables, design dropdown lists, and finally to integrate your web application with JavaScript. By the end of this book, you’ll be able to use the features of Bulma to your advantage and build web interfaces quickly and easily.
Table of Contents (15 chapters)
8
8. Creating more tables and selecting dropdowns

Setting up node-sass

Bulma is built with Sass, a CSS preprocessor. Although it’s originally written in Ruby (and available as a Ruby gem), it’s recommended to use the faster C/C++ compiler LibSass.

Most developers actually use node-sass, which provides binding for Node.js to LibSass. This is the library we’re going to use here.

You need to have NodeJS installed on your computer.

Creating package.json

With your terminal, go to the folder where you’ve saved your HTML files (alongside books.html, customers.html, etc.), and type the following:

npm init

Follow the instructions. This will create a package.json file.

Then type the following:

npm i bulma node-sass --save-dev

This will add the dev dependencies to your package.json:

"devDependencies": {
  "bulma": "^0.6.2",
  "node-sass": "^4.7.2"
}

Right now, the list of scripts only has one called test, which simply echos an error message and exits.

Replace that...