Instantly share code, notes, and snippets.
Created
March 28, 2016 08:51
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
-
Save swapnilshrikhande/1cd82669dc1249d01aca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* ------------------------------------------ | |
| * CSS3 GITHUB BUTTONS (Nicolas Gallagher) | |
| * Licensed under Unlicense | |
| * http://github.com/necolas/css3-github-buttons | |
| * --------------------------------------- */ | |
| /* ============================================================================= | |
| Base Button | |
| ========================================================================== */ | |
| .gh-button { | |
| position: relative; | |
| overflow: visible; | |
| display: inline-block; | |
| padding: 0.5em 1em; | |
| border: 1px solid #d4d4d4; | |
| margin: 0; | |
| text-decoration: none; | |
| text-align: center; | |
| text-shadow: 1px 1px 0 #fff; | |
| font:11px/normal sans-serif; | |
| color: #333; | |
| white-space: nowrap; | |
| cursor: pointer; | |
| outline: none; | |
| background-color: #ececec; | |
| background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f4f4f4), to(#ececec)); | |
| background-image: -moz-linear-gradient(#f4f4f4, #ececec); | |
| background-image: -ms-linear-gradient(#f4f4f4, #ececec); | |
| background-image: -o-linear-gradient(#f4f4f4, #ececec); | |
| background-image: linear-gradient(#f4f4f4, #ececec); | |
| -moz-background-clip: padding; /* for Firefox 3.6 */ | |
| background-clip: padding-box; | |
| border-radius: 0.2em; | |
| /* IE hacks */ | |
| zoom: 1; | |
| *display: inline; | |
| } | |
| .gh-button:hover, | |
| .gh-button:focus, | |
| .gh-button:active, | |
| .gh-button.active { | |
| border-color: #3072b3; | |
| border-bottom-color: #2a65a0; | |
| text-decoration: none; | |
| text-shadow: -1px -1px 0 rgba(0,0,0,0.3); | |
| color: #fff; | |
| background-color: #3c8dde; | |
| background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#599bdc), to(#3072b3)); | |
| background-image: -moz-linear-gradient(#599bdc, #3072b3); | |
| background-image: -o-linear-gradient(#599bdc, #3072b3); | |
| background-image: linear-gradient(#599bdc, #3072b3); | |
| } | |
| .gh-button:active, | |
| .gh-button.active { | |
| border-color: #2a65a0; | |
| border-bottom-color: #3884cd; | |
| background-color: #3072b3; | |
| background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3072b3), to(#599bdc)); | |
| background-image: -moz-linear-gradient(#3072b3, #599bdc); | |
| background-image: -ms-linear-gradient(#3072b3, #599bdc); | |
| background-image: -o-linear-gradient(#3072b3, #599bdc); | |
| background-image: linear-gradient(#3072b3, #599bdc); | |
| } | |
| /* overrides extra padding on button elements in Firefox */ | |
| .gh-button::-moz-focus-inner { | |
| padding: 0; | |
| border: 0; | |
| } | |
| /* ============================================================================= | |
| Button icons | |
| ========================================================================== */ | |
| .gh-button.icon:before { | |
| content: ""; | |
| position: relative; | |
| top: 1px; | |
| float:left; | |
| width: 12px; | |
| height: 12px; | |
| margin: 0 0.75em 0 -0.25em; | |
| background: url(gh-icons.png) 0 99px no-repeat; | |
| } | |
| .gh-button.arrowup.icon:before { background-position: 0 0; } | |
| .gh-button.arrowup.icon:hover:before, | |
| .gh-button.arrowup.icon:focus:before, | |
| .gh-button.arrowup.icon:active:before { background-position: -12px 0; } | |
| .gh-button.arrowdown.icon:before { background-position: 0 -12px; } | |
| .gh-button.arrowdown.icon:hover:before, | |
| .gh-button.arrowdown.icon:focus:before, | |
| .gh-button.arrowdown.icon:active:before { background-position: -12px -12px; } | |
| .gh-button.arrowleft.icon:before { background-position: 0 -24px; } | |
| .gh-button.arrowleft.icon:hover:before, | |
| .gh-button.arrowleft.icon:focus:before, | |
| .gh-button.arrowleft.icon:active:before { background-position: -12px -24px; } | |
| .gh-button.arrowright.icon:before { float:right; margin: 0 -0.25em 0 0.5em; background-position: 0 -36px; } | |
| .gh-button.arrowright.icon:hover:before, | |
| .gh-button.arrowright.icon:focus:before, | |
| .gh-button.arrowright.icon:active:before { background-position: -12px -36px; } | |
| .gh-button.approve.icon:before { background-position: 0 -48px; } | |
| .gh-button.approve.icon:hover:before, | |
| .gh-button.approve.icon:focus:before, | |
| .gh-button.approve.icon:active:before { background-position: -12px -48px; } | |
| .gh-button.add.icon:before { background-position: 0 -288px; } | |
| .gh-button.add.icon:hover:before, | |
| .gh-button.add.icon:focus:before, | |
| .gh-button.add.icon:active:before { background-position: -12px -288px; } | |
| .gh-button.remove.icon:before { background-position: 0 -60px; } | |
| .gh-button.remove.icon:hover:before, | |
| .gh-button.remove.icon:focus:before, | |
| .gh-button.remove.icon:active:before { background-position: -12px -60px; } | |
| .gh-button.log.icon:before { background-position: 0 -72px; } | |
| .gh-button.log.icon:hover:before, | |
| .gh-button.log.icon:focus:before, | |
| .gh-button.log.icon:active:before { background-position: -12px -72px; } | |
| .gh-button.calendar.icon:before { background-position: 0 -84px; } | |
| .gh-button.calendar.icon:hover:before, | |
| .gh-button.calendar.icon:focus:before, | |
| .gh-button.calendar.icon:active:before { background-position: -12px -84px; } | |
| .gh-button.chat.icon:before { background-position: 0 -96px; } | |
| .gh-button.chat.icon:hover:before, | |
| .gh-button.chat.icon:focus:before, | |
| .gh-button.chat.icon:active:before { background-position: -12px -96px; } | |
| .gh-button.clock.icon:before { background-position: 0 -108px; } | |
| .gh-button.clock.icon:hover:before, | |
| .gh-button.clock.icon:focus:before, | |
| .gh-button.clock.icon:active:before { background-position: -12px -108px; } | |
| .gh-button.settings.icon:before { background-position: 0 -120px; } | |
| .gh-button.settings.icon:hover:before, | |
| .gh-button.settings.icon:focus:before, | |
| .gh-button.settings.icon:active:before { background-position: -12px -120px; } | |
| .gh-button.comment.icon:before { background-position: 0 -132px; } | |
| .gh-button.comment.icon:hover:before, | |
| .gh-button.comment.icon:focus:before, | |
| .gh-button.comment.icon:active:before { background-position: -12px -132px; } | |
| .gh-button.fork.icon:before { background-position: 0 -144px; } | |
| .gh-button.fork.icon:hover:before, | |
| .gh-button.fork.icon:focus:before, | |
| .gh-button.fork.icon:active:before { background-position: -12px -144px; } | |
| .gh-button.like.icon:before { background-position: 0 -156px; } | |
| .gh-button.like.icon:hover:before, | |
| .gh-button.like.icon:focus:before, | |
| .gh-button.like.icon:active:before { background-position: -12px -156px; } | |
| .gh-button.favorite.icon:before { background-position: 0 -348px; } | |
| .gh-button.favorite.icon:hover:before, | |
| .gh-button.favorite.icon:focus:before, | |
| .gh-button.favorite.icon:active:before { background-position: -12px -348px; } | |
| .gh-button.home.icon:before { background-position: 0 -168px; } | |
| .gh-button.home.icon:hover:before, | |
| .gh-button.home.icon:focus:before, | |
| .gh-button.home.icon:active:before { background-position: -12px -168px; } | |
| .gh-button.key.icon:before { background-position: 0 -180px; } | |
| .gh-button.key.icon:hover:before, | |
| .gh-button.key.icon:focus:before, | |
| .gh-button.key.icon:active:before { background-position: -12px -180px; } | |
| .gh-button.lock.icon:before { background-position: 0 -192px; } | |
| .gh-button.lock.icon:hover:before, | |
| .gh-button.lock.icon:focus:before, | |
| .gh-button.lock.icon:active:before { background-position: -12px -192px; } | |
| .gh-button.unlock.icon:before { background-position: 0 -204px; } | |
| .gh-button.unlock.icon:hover:before, | |
| .gh-button.unlock.icon:focus:before, | |
| .gh-button.unlock.icon:active:before { background-position: -12px -204px; } | |
| .gh-button.loop.icon:before { background-position: 0 -216px; } | |
| .gh-button.loop.icon:hover:before, | |
| .gh-button.loop.icon:focus:before, | |
| .gh-button.loop.icon:active:before { background-position: -12px -216px; } | |
| .gh-button.search.icon:before { background-position: 0 -228px; } | |
| .gh-button.search.icon:hover:before, | |
| .gh-button.search.icon:focus:before, | |
| .gh-button.search.icon:active:before { background-position: -12px -228px; } | |
| .gh-button.mail.icon:before { background-position: 0 -240px; } | |
| .gh-button.mail.icon:hover:before, | |
| .gh-button.mail.icon:focus:before, | |
| .gh-button.mail.icon:active:before { background-position: -12px -240px; } | |
| .gh-button.move.icon:before { background-position: 0 -252px; } | |
| .gh-button.move.icon:hover:before, | |
| .gh-button.move.icon:focus:before, | |
| .gh-button.move.icon:active:before { background-position: -12px -252px; } | |
| .gh-button.edit.icon:before { background-position: 0 -264px; } | |
| .gh-button.edit.icon:hover:before, | |
| .gh-button.edit.icon:focus:before, | |
| .gh-button.edit.icon:active:before { background-position: -12px -264px; } | |
| .gh-button.pin.icon:before { background-position: 0 -276px; } | |
| .gh-button.pin.icon:hover:before, | |
| .gh-button.pin.icon:focus:before, | |
| .gh-button.pin.icon:active:before { background-position: -12px -276px; } | |
| .gh-button.reload.icon:before { background-position: 0 -300px; } | |
| .gh-button.reload.icon:hover:before, | |
| .gh-button.reload.icon:focus:before, | |
| .gh-button.reload.icon:active:before { background-position: -12px -300px; } | |
| .gh-button.rss.icon:before { background-position: 0 -312px; } | |
| .gh-button.rss.icon:hover:before, | |
| .gh-button.rss.icon:focus:before, | |
| .gh-button.rss.icon:active:before { background-position: -12px -312px; } | |
| .gh-button.tag.icon:before { background-position: 0 -324px; } | |
| .gh-button.tag.icon:hover:before, | |
| .gh-button.tag.icon:focus:before, | |
| .gh-button.tag.icon:active:before { background-position: -12px -324px; } | |
| .gh-button.trash.icon:before { background-position: 0 -336px; } | |
| .gh-button.trash.icon:hover:before, | |
| .gh-button.trash.icon:focus:before, | |
| .gh-button.trash.icon:active:before { background-position: -12px -336px; } | |
| .gh-button.user.icon:before { background-position: 0 -360px; } | |
| .gh-button.user.icon:hover:before, | |
| .gh-button.user.icon:focus:before, | |
| .gh-button.user.icon:active:before { background-position: -12px -360px; } | |
| /* ============================================================================= | |
| Button extensions | |
| ========================================================================== */ | |
| /* Primary button | |
| ========================================================================== */ | |
| .gh-button.primary { | |
| font-weight: bold; | |
| } | |
| /* Danger button | |
| ========================================================================== */ | |
| .gh-button.danger { | |
| color: #900; | |
| } | |
| .gh-button.danger:hover, | |
| .gh-button.danger:focus, | |
| .gh-button.danger:active { | |
| border-color: #b53f3a; | |
| border-bottom-color: #a0302a; | |
| color: #fff; | |
| background-color: #dc5f59; | |
| background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#dc5f59), to(#b33630)); | |
| background-image: -moz-linear-gradient(#dc5f59, #b33630); | |
| background-image: -ms-linear-gradient(#dc5f59, #b33630); | |
| background-image: -o-linear-gradient(#dc5f59, #b33630); | |
| background-image: linear-gradient(#dc5f59, #b33630); | |
| } | |
| .gh-button.danger:active, | |
| .gh-button.danger.active { | |
| border-color: #a0302a; | |
| border-bottom-color: #bf4843; | |
| background-color: #b33630; | |
| background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b33630), to(#dc5f59)); | |
| background-image: -moz-linear-gradient(#b33630, #dc5f59); | |
| background-image: -ms-linear-gradient(#b33630, #dc5f59); | |
| background-image: -o-linear-gradient(#b33630, #dc5f59); | |
| background-image: linear-gradient(#b33630, #dc5f59); | |
| } | |
| /* Pill button | |
| ========================================================================== */ | |
| .gh-button.pill { | |
| border-radius: 50em; | |
| } | |
| /* Disabled button | |
| ========================================================================== */ | |
| .gh-button.disable { | |
| opacity: 0.5; | |
| } | |
| /* Big button | |
| ========================================================================== */ | |
| .gh-button.big { | |
| font-size: 14px; | |
| } | |
| .gh-button.big.icon:before { | |
| top: 0; | |
| } | |
| /* ============================================================================= | |
| Button groups | |
| ========================================================================== */ | |
| /* Standard group | |
| ========================================================================== */ | |
| .gh-button-group { | |
| display: inline-block; | |
| list-style: none; | |
| padding: 0; | |
| margin: 0; | |
| /* IE hacks */ | |
| zoom: 1; | |
| *display: inline; | |
| } | |
| .gh-button + .gh-button, | |
| .gh-button + .gh-button-group, | |
| .gh-button-group + .gh-button, | |
| .gh-button-group + .gh-button-group { | |
| margin-left: 15px; | |
| } | |
| .gh-button-group li { | |
| float: left; | |
| padding: 0; | |
| margin: 0; | |
| } | |
| .gh-button-group .gh-button { | |
| float: left; | |
| margin-left: -1px; | |
| } | |
| .gh-button-group > .gh-button:not(:first-child):not(:last-child), | |
| .gh-button-group li:not(:first-child):not(:last-child) .gh-button { | |
| border-radius: 0; | |
| } | |
| .gh-button-group > .gh-button:first-child, | |
| .gh-button-group li:first-child .gh-button { | |
| margin-left: 0; | |
| border-top-right-radius: 0; | |
| border-bottom-right-radius: 0; | |
| } | |
| .gh-button-group > .gh-button:last-child, | |
| .gh-button-group li:last-child > .gh-button { | |
| border-top-left-radius: 0; | |
| border-bottom-left-radius: 0; | |
| } | |
| /* Minor group | |
| ========================================================================== */ | |
| .gh-button-group.minor-group .gh-button { | |
| border: 1px solid #d4d4d4; | |
| text-shadow: none; | |
| background-image: none; | |
| background-color: #fff; | |
| } | |
| .gh-button-group.minor-group .gh-button:hover, | |
| .gh-button-group.minor-group .gh-button:focus { | |
| background-color: #599bdc; | |
| } | |
| .gh-button-group.minor-group .gh-button:active, | |
| .gh-button-group.minor-group .gh-button.active { | |
| background-color: #3072b3; | |
| } | |
| .gh-button-group.minor-group .gh-button.icon:before { | |
| opacity: 0.8; | |
| } | |
| /* ============================================================================= | |
| Button container (mixing buttons and groups, e.g., nav bar) | |
| ========================================================================== */ | |
| .gh-button-container .gh-button, | |
| .gh-button-container .gh-button-group { | |
| vertical-align: top; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| .gh-button { | |
| color: #333 !important; | |
| padding: 0.5em 1em !important; | |
| background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f4f4f4), to(#ececec)); | |
| background-image: -moz-linear-gradient(#f4f4f4, #ececec); | |
| background-image: -ms-linear-gradient(#f4f4f4, #ececec); | |
| background-image: -o-linear-gradient(#f4f4f4, #ececec); | |
| text-decoration: none !important; | |
| width: 50%; | |
| } | |
| .gh-button-group { | |
| width: 50%; | |
| } | |
| .gh-button:hover, | |
| .gh-button:focus, | |
| .gh-button:active, | |
| .gh-button.active{ | |
| color : #f5f5f5 !important; | |
| } | |
| </style> | |
| <div class="gh-button-group"> | |
| <a href="#" class="gh-button primary btn-sm"> | |
| <i class="fa fa-code-fork"></i> | |
| Clone Data | |
| </a> | |
| <a href="#" class="gh-button primary btn-sm"> | |
| <i class="fa fa-paper-plane-o"></i> | |
| Move Data | |
| </a> | |
| </div> | |
| var initGroupButtonToggle = function(){ | |
| $("body").on("click",".gh-button-group .gh-button",function(event){ | |
| $(this).closest(".gh-button-group").find(".gh-button").removeClass("active"); | |
| $(this).addClass("active"); | |
| return false; | |
| }); | |
| }; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment