• Stars
    star
    577
  • Rank 77,363 (Top 2 %)
  • Language
    CSS
  • License
    MIT License
  • Created over 13 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple CSS to recreate the appearance of Facebook's buttons and toolbars.

CSS3 Facebook-style Buttons

unmaintained

Facebook-style buttons and button groups. Default and large sizes.

Buttons

To create the default "button" add a class of uibutton to any appropriate element. To create the blue variant include the additional class confirm. To create the green variant include an additional class special.

<a class="uibutton" href="#">Button</a>
<button class="uibutton" type="submit">Button</button>
<input class="uibutton" type="submit" value="Button">

Larger buttons

To create larger buttons include an additional class of large

<a class="uibutton large" href="#button">Search</a>

Grouped buttons

To created grouped buttons wrap them in an element, or use a list, given the class uibutton-group.

<div class="uibutton-group">
    <a href="#button" class="uibutton">Dashboard</a>
    <a href="#button" class="uibutton">Inbox</a>
    <a href="#button" class="uibutton">Account</a>
    <a href="#button" class="uibutton">Logout</a>
</div>

<ul class="uibutton-group">
    <li><a href="#button" class="uibutton">Dashboard</a></li>
    <li><a href="#button" class="uibutton">Inbox</a></li>
    <li><a href="#button" class="uibutton">Account</a></li>
    <li><a href="#button" class="uibutton">Logout</a></li>
</ul>

Mixed groups

To display a toolbar of buttons and grouped buttons, use a wrapping element given the class uibutton-toolbar.

<div class="uibutton-toolbar">
    <a href="#button" class="uibutton">Mark as unread</a>

    <div class="uibutton-group">
        <a href="#button" class="uibutton">Report spam</a>
        <a href="#button" class="uibutton">Delete</a>
    </div>

    <a href="#button" class="uibutton">Unsubscribe</a>
</div>

Buttons with icons

A range of icons can be added (only for links and buttons) by adding a class of icon and any one of the provided icon classes.

<a href="#" class="button icon add">New message</a>

Browser support

  • Firefox 3.5+
  • Google Chrome
  • Safari 4+
  • IE 6+
  • Opera 11.10+

Note: Some CSS3 enhancements are not supported in older versions of Opera and IE. The use of icons is not supported in IE 6 or IE 7.

More Repositories

1

normalize.css

A modern alternative to CSS resets
CSS
52,285
star
2

react-native-web

Cross-platform React UI packages
JavaScript
21,553
star
3

idiomatic-css

Principles of writing consistent, idiomatic CSS.
6,641
star
4

dotfiles

OS X dotfiles: bash, git, vim, etc.
Shell
785
star
5

idiomatic-html

Principles of writing consistent, idiomatic HTML.
525
star
6

css3-social-signin-buttons

CSS3 Social Sign-in Buttons with icons. Small and large sizes.
CSS
475
star
7

issue-guidelines

A set of guidelines for submitting issues and pull requests on projects
426
star
8

griddle

A CSS grid constructor
CSS
367
star
9

styleq

styleQ is a quick, small JavaScript runtime for merging the HTML class names produced by CSS compilers.
JavaScript
185
star
10

icon-builder-example

JavaScript
148
star
11

xdm.js

JSON-RPC 2.0 cross-domain communication over postMessage
JavaScript
89
star
12

emitter.js

A simple JavaScript event-emitter
JavaScript
85
star
13

jekyll-boilerplate

A jekyll starting point.
HTML
73
star
14

generator-jsmodule

A Yeoman generator to scaffold out a simple JS module for Node.js or the browser
JavaScript
68
star
15

chrome-tab-limit

Chrome browser extension that limits you to 20 open tabs
JavaScript
53
star
16

suit-grid-layouts

DEPRECATED
HTML
45
star
17

delegate.js

DOM event delegation component
JavaScript
45
star
18

project-euler

JavaScript solutions to the Project Euler problems.
JavaScript
44
star
19

custom-tweet-button-for-wordpress

A fully customisable HTML and CSS Tweet Button for Wordpress. Built using PHP; no JavaScript requirement. Uses the bit.ly and Twitter APIs.
PHP
36
star
20

dom-shims

Complete and well-tested shims / polyfills for various DOM API's missing in not-so-modern browsers
JavaScript
34
star
21

eraser.css

CSS `!important`-fueled bulldozer
CSS
29
star
22

newsriver-ui

User interface for displaying a river of news generated by Dave Winer's River2 software.
JavaScript
27
star
23

dom-closest

For a given DOM element, find the first ancestor that matches a given CSS selector.
JavaScript
22
star
24

event-shim.js

A W3C DOM Event API shim for IE 8
JavaScript
20
star
25

dom-matches

Check if a DOM element matches a given selector.
JavaScript
19
star
26

dom-insert-html

HTML-string DOM insertion methods using 'insertAdjacentHTML'
JavaScript
13
star
27

matches.js

DEPRECATED
JavaScript
12
star
28

dom-siblings

Find a DOM element's siblings, optionally filtered by a CSS selector.
JavaScript
11
star
29

dom-insert

DOM insertion methods.
JavaScript
10
star
30

dom-responder-events

4
star
31

flight-mustache

A Flight component for rendering Mustache templates with mustache.js
JavaScript
2
star
32

webpack-bugs

JavaScript
1
star