Skip to content

ungoldman/top-bar.css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

top-bar.css

A top bar navigation pattern.

npm travis downloads

Install

npm install top-bar.css

Usage

<!DOCTYPE html>
<html>
  <head>
    ...
    <link rel="stylesheet" href="path/to/top-bar.css">
    ...
  </head>
  <body>
    ...
    <nav class="top-bar">
      <a href="#" class="top-bar-title">site title</a>
      <a href="#" class="top-bar-link">some nav link</a>
      <a href="#" class="top-bar-link">another one</a>
      <a href="#" class="top-bar-link current-page">current page</a>

      <div class="top-bar-right">
        <a href="#" class="top-bar-link">this one's on the right</a>
      </div>
    </nav>
    ...
  </body>
</html>

Everything is scoped to .top-bar.

Compatible with css-via-npm workflows.

Sass

You can also use this as a Sass library.

@import '../node_modules/top-bar.css/source/top-bar';

You can set the font family like so:

$top-bar-family: 'Comic Sans';
@import '../node_modules/top-bar.css/source/top-bar';

License

ISC