CSS Framework Alternatives: Explore Five Lightweight Alternatives To Bootstrap and Foundation With Project Examples Aravind Shenoy
CSS Framework Alternatives: Explore Five Lightweight Alternatives To Bootstrap and Foundation With Project Examples Aravind Shenoy
CSS Framework Alternatives: Explore Five Lightweight Alternatives To Bootstrap and Foundation With Project Examples Aravind Shenoy
https://textbookfull.com/product/alternatives-to-conventional-
food-processing-andrew-proctor/
https://textbookfull.com/product/jumpstart-uikit-learn-to-build-
enterprise-level-feature-rich-websites-that-work-elegantly-with-
minimum-fuss-aravind-shenoy/
https://textbookfull.com/product/practical-bootstrap-learn-to-
develop-responsively-with-one-of-the-most-popular-css-frameworks-
panos-matsinopoulos/
https://textbookfull.com/product/alternatives-in-regulated-river-
management-first-edition-gore/
Enabling Urban Alternatives: Crises, Contestation, and
Cooperation Jens Kaae Fisker
https://textbookfull.com/product/enabling-urban-alternatives-
crises-contestation-and-cooperation-jens-kaae-fisker/
https://textbookfull.com/product/our-energy-future-resources-
alternatives-and-the-environment-second-edition-natowitz/
https://textbookfull.com/product/alternatives-to-suicide-beyond-
risk-and-toward-a-life-worth-living-1st-edition-andrew-page/
https://textbookfull.com/product/contrastiveness-in-information-
structure-alternatives-and-scalar-implicatures-1st-edition-
chungmin-lee/
https://textbookfull.com/product/postdevelopment-in-practice-
alternatives-economies-ontologies-1st-edition-elise-klein-editor/
CSS Framework
Alternatives
Explore Five Lightweight Alternatives
to Bootstrap and Foundation with
Project Examples
—
Aravind Shenoy
Anirudh Prabhu
CSS Framework
Alternatives
Explore Five Lightweight
Alternatives to Bootstrap and
Foundation with Project
Examples
Aravind Shenoy
Anirudh Prabhu
CSS Framework Alternatives
Aravind Shenoy Anirudh Prabhu
Mumbai, Maharashtra, India Mumbai, India
v
Table of Contents
vi
Table of Contents
Index�������������������������������������������������������������������������������������������������169
vii
About the Authors
Aravind Shenoy A marketing expert by
profession, Aravind’s core interests are
technical writing, content writing, content
development, web design, and business
analysis. He was born and raised in Mumbai
and still resides there. A music buff, he
loves listening to rock ’n’ roll and rap. Oasis,
R.E.M., The Doors, Dire Straits, Coldplay,
Jimi Hendrix, and Michael Jackson rule his
playlists.
He firmly believes in this motto: “We are here for a good time, not a
long time. Be happy perennially.”
ix
About the Technical Reviewer
Ferit Topcu is a software developer who has
spent the last few years working and exploring
the Web and JavaScript. He’s been in web
development for more than five years and has
worked in different areas including research
topics, social media analytics, and the Internet
of Things. He recently joined one of Europe’s
biggest e-commerce companies, Zalando.
At Zalando, he is developing web applications
to improve its whole retail process.
Ferit has a master’s degree in computer engineering from TU Berlin
and is a father of two. His free time is spent with family and friends and
contributing to open source projects.
xi
Acknowledgments
As I stride through this journey of life, I want to take this opportunity to
thank every person who has stood by me, especially those who believed
in me when others said “Don’t encourage him.” Well, life is like that, and
indeed life is beautiful. It couldn’t have been better. Thanks to everyone
who provided the right support when I needed it the most.
—Aravind Shenoy
xiii
CHAPTER 1
Choosing Lightweight
Frameworks for
Intuitive Web Design
When it comes to web design, Bootstrap, Foundation, and Materialize are
probably the first frameworks that come to a designer’s mind, given their
massive range of components and attributes. However, when talking about
light web projects, you do not usually need a comprehensive framework
like Bootstrap or Foundation (again, depending on the complexity of your
project). Usually, to build a small web site, lightweight frameworks can do
the job effectively and cut down the bulk, or noise, associated with massive
frameworks. For example, if your web site merely needs something like a
grid or some popular components commonly found in most frameworks,
then you should consider a lightweight framework.
Moreover, developing web sites and web applications from scratch is
quite a tedious process as it involves writing a sizeable amount of code.
Maintaining that code while the web site evolves adds to the complexity.
Coding from scratch (as we like to call it) is quite an endeavor, and a
framework can help you write a few lines of code and incorporate reusable
sets of commonly used code that you can maintain quite easily. Clean
coding and upkeep are tasks easily achieved using a framework.
2
Chapter 1 Choosing Lightweight Frameworks for Intuitive Web Design
In this book, you will get a glimpse into front-end frameworks, which
basically are pre-prepared packages containing the structure of files and
folders of Hypertext Markup Language (HTML) and CSS documents (some
with JavaScript functions), which help designers and developers build
interactive and immersive web sites.
Frameworks allow you to use a common standardized structure that
cuts out much of the groundwork of writing code from scratch and helps
you reuse components, modules, and libraries, freeing you up to focus on
core tasks at a high level.
• Typography elements
• Cross-browser compatibility
• Utility classes
• Navigational elements
3
Chapter 1 Choosing Lightweight Frameworks for Intuitive Web Design
• Cross-browser compatibility
• Grid-based design
• Easy-to-build prototypes
• Solid documentation
• Accessibility
A budding developer can find it difficult to build web sites just based
on pure HTML, CSS, and JavaScript. In addition, grid-based layouts help
budding designers to position, structure, and design the layout quite easily.
You do not have to reinvent the wheel, meaning you can get some hands-
on experience without the intricacies and dilemmas that you will come
across when you code from scratch. Good and clean coding practices are
imperative when you grow as a web designer, and frameworks are all about
awesome cohesiveness and consistent coding that will hold you in good
stead in times to come.
4
Chapter 1 Choosing Lightweight Frameworks for Intuitive Web Design
B
ootstrap
Bootstrap is the most popular mobile-first framework in web design; it’s
used extensively by developers across the globe (Figure 1-1). You can find
more information on the official web site at http://getbootstrap.com/.
5
Chapter 1 Choosing Lightweight Frameworks for Intuitive Web Design
F oundation
Foundation was the earliest responsive framework and is as massive and
advanced as Bootstrap for building web products and services (Figure 1-2).
Foundation comes with cool features such as Flex Grid and Motion UI. The
latest version, Foundation 6, is quicker, is lighter in size compared to its
earlier versions, and is a solid front-end framework for designing beautiful
web sites, e-mails, and apps that look good on any device. You can find more
information on the official web site at http://foundation.zurb.com/.
6
Chapter 1 Choosing Lightweight Frameworks for Intuitive Web Design
M
aterialize
Materialize is a modern front-end framework based on Google’s Material
Design philosophy that helps developers build and design immersive web
sites (Figure 1-3). You can find more information on the official web site at
http://materializecss.com/.
7
Chapter 1 Choosing Lightweight Frameworks for Intuitive Web Design
S
keleton
As mentioned earlier, sometimes you don’t need a large framework,
especially if you are embarking on a small project. Skeleton is a simple,
responsive boilerplate and is extremely lightweight with 400 lines of code
and with a mobile-based philosophy (Figure 1-4). You can find more
information on the official web site at http://getskeleton.com/.
8
Chapter 1 Choosing Lightweight Frameworks for Intuitive Web Design
M
illigram
Milligram is a minimalistic framework with just enough styles for small
and interactive web sites (Figure 1-5). Its zipped file size is only 2KB. It
comes with a mobile-first philosophy and supports the modern browser
versions of Chrome, Firefox, Safari, IE, and Opera. Its cutting-edge features
include the FlexBox grid system, and it is a simple, top-notch framework
from a usability point of view. You can find more information on the
official web site at http://milligram.io/.
9
Chapter 1 Choosing Lightweight Frameworks for Intuitive Web Design
U
Ikit
UIkit is a light and modular front-end framework for developing faster and
powerful web interfaces (Figure 1-6). It has a massive collection of HTML,
CSS, and JavaScript components and modules that can be extended with
themes. It is flexible because it can be customized to give a unique feel to
your web sites. You can find more information on the official web site at
https://getuikit.com/v2/.
10
Chapter 1 Choosing Lightweight Frameworks for Intuitive Web Design
S
usy
In today’s era of agile development and constant changes, the layout
designs are crucial and cannot be restricted to a single framework,
especially if your web site is intricate design-wise. With Susy (Figure 1-8),
the settings are not set in stone, meaning you can use its integrated
Sass-based libraries to create immersive layouts with potent structural
designs. Susy is not a typical framework but more of a UI utility as it
simplifies and streamlines the task of designing intricate grid layouts.
You can find more information on the official web site at http://susy.
oddbird.net/.
11
Chapter 1 Choosing Lightweight Frameworks for Intuitive Web Design
Choosing a Framework
As you can see, we have covered many popular frameworks. Choosing
the right framework is quite important and depends on the needs and
requirement of your projects. Some frameworks are bloated, meaning
they have too many built-in styles, which might not be required for a small
project.
The following are some of the factors that you should consider when
choosing a framework:
12
Chapter 1 Choosing Lightweight Frameworks for Intuitive Web Design
There are several other factors such as the ease of use, speed of
configuration, usability, features, widgets, components, long-term support,
and reliability that you need to consider when choosing a framework. In
summary, you need to choose your framework based on the requirements
and needs of the project; especially when choosing lightweight front-end
kits for small projects, given the bloat and bulk associated with massive
frameworks.
Concept of Grids
A grid system allows you to structure and stack content horizontally and
vertically in an easy manner. It is easily adaptable for any web site or web
application and has a lot of advantages. It is usually responsive, meaning
it adjusts itself based on the browser or device width. So, it displays the
content appropriately in a mobile device, a laptop, a tablet, or a desktop
depending on the size of the device. Plus, you have media queries, which
help you define the grid layout based on the device width.
Grids are usually 12-column containers in many frameworks but can
be customized using methods specific to the framework. You can have
flexible layouts wherein you can divide the page into several regions and
place content using the markup.
Another concept catching on in CSS designs is the FlexBox. The
difference between a grid and FlexBox layout is that grid layouts are two-
dimensional, while a FlexBox is usually one-dimensional wherein you can
lay out content in a row or a column.
The choice of using a grid layout or a FlexBox depends on how you
want to structure your content. With a FlexBox you space out the content
and build a structure using that content. Suppose you have certain items; it
is up to you to decide how much space each item should take. Grid layouts,
on the other hand, are content-agnostic. In grid layouts, you create a layout
and place the content into rows and columns.
13
Chapter 1 Choosing Lightweight Frameworks for Intuitive Web Design
In most modern frameworks, both the grid and the FlexBox are
supported. While the usability of the grid layout is awesome, a FlexBox can
help you place things more aesthetically.
For a detailed explanation of the grid concept, you can refer the
Mozilla developer network web site, specifically the following web page,
for in-depth information: https://developer.mozilla.org/en-US/docs/
Web/CSS/CSS_Grid_Layout.
S
ummary
In this chapter, we gave you an overview of some popular CSS frameworks.
We also covered the benefits of using a CSS framework. CSS frameworks
are comprised of components, modules, libraries, navigational elements,
typography, media queries, tailor-made widgets, and grid layouts that
make web design a breeze. We also gave you an overview of grid and
FlexBox layouts.
We will now dedicate a chapter for each of the frameworks mentioned
in the introduction of the chapter, starting with Skeleton. With each
chapter, we use a progressive approach, meaning the next framework is
more extensive and a framework’s resourcefulness increases as you move
through the book.
14
CHAPTER 2
Building a Landing
Page with Skeleton
Skeleton is an intuitive framework for lightweight projects. It is extremely
lightweight with a handful of HTML elements and was developed with
a mobile-first philosophy. In this chapter, you will learn how to install
Skeleton. You will also learn about its grid system and attributes; Finally,
we will build a landing web page with Skeleton.
I nstalling Skeleton
To get started, go to the Skeleton web site at http://getskeleton.com/.
You will see the Download button, which is highlighted in a red box in
Figure 2-1.
The css folder is where you save your CSS files. By default, the css
folder contains the Normalize and Skeleton style sheets.
16
Chapter 2 Building a Landing Page with Skeleton
<!DOCTYPE html>
<html lang="en">
<head>
<!—FONT –––––––––––––––––––––––––––––––––––––––––––––-–– -->
<link href="//fonts.googleapis.com/css?family=
Raleway:400,300,600" rel="stylesheet" type="text/css">
<!—CSS –––––––-––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/skeleton.css">
17
Chapter 2 Building a Landing Page with Skeleton
<!—Favicon ––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="icon" type="image/png" href="images/favicon.png">
</head>
<body>
Now click the index.html file to display the web page, as shown in
Figure 2-3.
18
Chapter 2 Building a Landing Page with Skeleton
19
Another random document with
no related content on Scribd:
sea could no longer bear the strain, and so had parted in this sudden
and demonstrative way. In brief, it was an earthquake—just such an
one as is peculiar to this region, and such as caused the incoming
wave which overwhelmed Hiro-mura in 1855. This, however, was
only a small quake; although the building shook under the first blow
upon its foundations. Nor was there any perceptible disturbance of
“Peaceful Bay” to follow. And if there had been, it would not easily
have surmounted the high and broad earth-works, with their avenue
of stately trees, which were a half-century ago made the guardians
of the future safety of the village.
After tiffin it was necessary almost immediately to return to the
school for the address to the teachers of Hiro-mura, Yuasa, and the
country districts far around. Nearly five hundred of these teachers
were present at the afternoon meeting. The subject of the address
was “The Ideals of the Teacher.” Here, as quite uniformly in the
country at large, the speaker’s heart went out to the audience with
warm feelings of respect, sympathy, and even pity.
I have been in more or less familiar intercourse for nearly twenty
years with thousands of this class in Japan. In spite of the sincere
and largely intelligent interest which both Government and people
take in matters of education, the public-school teachers of the
country are heavily overworked and lamentably underpaid. But the
ideal of His Majesty’s celebrated Imperial Rescript is steadily held up
before them—namely, that there shall be no household in the land,
and no member of any household, to whom the benefits of education
shall not have been supplied in liberal measure. To realise this ideal,
Japan must have an entire generation or more of peace and of
peaceful development. At present its Normal Schools, Higher
Schools (those of the so-called Koto grade), and Universities, can
scarcely provide for more than one-tenth of those who are desirous
of fitting themselves for advanced positions and larger influence in
the service of the nation. As a result, in many of the country places
the scholastic training of the teachers cannot be of a high grade. But
the eagerness with which these humble men (for, unlike-the case
with us, the great majority of the common-school teachers are
males,—many of them in middle life and beyond) avail themselves of
every opportunity to see and hear anything which may help them in
their work, is both encouraging and pathetic. Where in the United
States, for example, could a voluntary class of more than eight
hundred teachers be held together for twenty hours of lectures on
education,—each session more than filling up the period between
four and six o’clock of the afternoon, during the busiest part of term-
time? Yet—as I have already said—this was readily done in Kyoto,
the ancient capital, in the Winter of 1907.