Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Mario Sanchez Carrion mariobox

🎯
Focusing
View GitHub Profile
@mariobox
mariobox / fastcss.md
Last active Jun 2, 2020
Optimizing CSS Style Sheet
View fastcss.md

Optimizing CSS Style Sheet

I have a custom CSS sheet for my personal site mariosanchez.org. I decided to make some changes to optimize for speed without altering the look and feel of the site too much. The main idea is to take advantage of browsers' default settings as much as possible, and only add custom styling to parts of the site where we want a distinct look (e.g. navigation, image gallery, icons).

Some of the things I've changed are:

  • Remove custom font: I'm using the standard browser font font-family: "DejaVu Sans", sans-serif; to eliminate the server call to Google Fonts.
  • Remove font size declaration: I'm removing the font-size declaration we will use the default browser font size
  • Remove all Heading styling: I'm removing all style declarations from my headings and letting the browser defaults control them.
  • Remove all ul and li styling: Except making the bullet points square
  • Remove hr styling
@mariobox
mariobox / index.html
Last active Oct 19, 2017
Last Updated Statement in User-Friendly Format
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Timestamp</title>
</head>
<!-- Start Page -->
<body>
<div>
<p id="lastUpdated"></p>
</div>
You can’t perform that action at this time.