Skip to content

Instantly share code, notes, and snippets.

@gregorynicholas
Forked from jareware/README.md
Created June 7, 2018 04:12
Show Gist options
  • Save gregorynicholas/ea4db7ec2f237f78c940f0f35c8c4073 to your computer and use it in GitHub Desktop.
Save gregorynicholas/ea4db7ec2f237f78c940f0f35c8c4073 to your computer and use it in GitHub Desktop.
Quick PSA on icon fonts and ligatures

Long Live Icon Fonts!

or, a Quick PSA on icon fonts and ligatures.

tl;dr: keep using icon fonts, they are nice, just enable ligatures

These are my talking notes at the http://wwweeklies.com/ on 2015-12-04:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Icon font demo</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<style type="text/css">
section {
margin: 30px;
padding: 15px 30px 30px 30px;
background: white;
border-radius: 5px;
}
input {
margin-bottom: 10px;
}
button i.fa {
font-size: 150% !important;
}
</style>
</head>
<body>
<section>
<h3>Newsletter subscriptions</h3>
<input type="email" class="form-control" placeholder="[email protected]">
<button type="submit" class="btn btn-primary"><i class="fa fa-search"></i></button>
<button type="submit" class="btn btn-danger"><i class="fa fa-trash"></i></button>
</section>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Icon font demo with ligatures</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<style type="text/css">
section {
margin: 30px;
padding: 15px 30px 30px 30px;
background: white;
border-radius: 5px;
}
input {
margin-bottom: 10px;
}
button i.material-icons {
line-height: 1.3 !important;
}
</style>
</head>
<body>
<section>
<h3>Newsletter subscriptions</h3>
<input type="email" class="form-control" placeholder="[email protected]">
<button type="submit" class="btn btn-primary"><i class="material-icons">search</i></button>
<button type="submit" class="btn btn-danger"><i class="material-icons">delete</i></button>
</section>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment