From 31723cdcc4ce95b8fdc29b29287614626083587c Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Thu, 27 Feb 2014 12:33:50 -0500 Subject: [PATCH] Replaced custom social button styles with bootstrap-social css library --- public/css/lib/bootstrap-social.less | 140 +++++++++++++++++++++++++++ public/css/styles.less | 52 +--------- 2 files changed, 143 insertions(+), 49 deletions(-) create mode 100755 public/css/lib/bootstrap-social.less diff --git a/public/css/lib/bootstrap-social.less b/public/css/lib/bootstrap-social.less new file mode 100755 index 0000000000..c46b1bab28 --- /dev/null +++ b/public/css/lib/bootstrap-social.less @@ -0,0 +1,140 @@ +/* + * Social Buttons for Bootstrap + * + * Copyright 2013-2014 Panayiotis Lipiridis + * Licensed under the MIT License + * + * https://github.com/lipis/bootstrap-social + */ + +.btn-social { + @bs-height-base: (@line-height-computed + @padding-base-vertical * 2); + @bs-height-lg: (floor(@font-size-large * @line-height-base) + @padding-large-vertical * 2); + @bs-height-sm: (floor(@font-size-small * 1.5) + @padding-small-vertical * 2); + @bs-height-xs: (floor(@font-size-small * 1.2) + @padding-small-vertical + 1); + + position: relative; + padding-left: @bs-height-base + @padding-base-horizontal; + text-align: left; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + :first-child { + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: @bs-height-base; + line-height: (@bs-height-base + 2); + font-size: 1.6em; + text-align: center; + border-right: 1px solid rgba(0, 0, 0, 0.2); + } + &.btn-lg { + padding-left: @bs-height-lg + @padding-large-horizontal; + :first-child { + line-height: @bs-height-lg; + width: @bs-height-lg; + font-size: 1.8em; + } + } + &.btn-sm { + padding-left: @bs-height-sm + @padding-small-horizontal; + :first-child { + line-height: @bs-height-sm; + width: @bs-height-sm; + font-size: 1.4em; + } + } + &.btn-xs { + padding-left: @bs-height-xs + @padding-small-horizontal; + :first-child { + line-height: @bs-height-xs; + width: @bs-height-xs; + font-size: 1.2em; + } + } +} + +.btn-social-icon { + .btn-social; + height: (@bs-height-base + 2); + width: (@bs-height-base + 2); + padding: 0; + :first-child { + border: none; + text-align: center; + width: 100% !important; + } + &.btn-lg { + height: @bs-height-lg; + width: @bs-height-lg; + padding-left: 0; + padding-right: 0; + } + &.btn-sm { + height: (@bs-height-sm + 2); + width: (@bs-height-sm + 2); + padding-left: 0; + padding-right: 0; + } + &.btn-xs { + height: (@bs-height-xs + 2); + width: (@bs-height-xs + 2); + padding-left: 0; + padding-right: 0; + } +} + +.btn-social(@color-bg, @color: white) { + background-color: @color-bg; + .button-variant(@color, @color-bg, rgba(0, 0, 0, 0.2)); +} + +.btn-bitbucket { + .btn-social(#205081); +} + +.btn-dropbox { + .btn-social(#1087dd); +} + +.btn-facebook { + .btn-social(#3b5998); +} + +.btn-flickr { + .btn-social(#ff0084); +} + +.btn-foursquare { + .btn-social(#0072b1); +} + +.btn-github { + .btn-social(#444444); +} + +.btn-google-plus { + .btn-social(#dd4b39); +} + +.btn-instagram { + .btn-social(#3f729b); +} + +.btn-linkedin { + .btn-social(#007bb6); +} + +.btn-tumblr { + .btn-social(#2c4762); +} + +.btn-twitter { + .btn-social(#55acee); +} + +.btn-vk { + .btn-social(#587ea3); +} diff --git a/public/css/styles.less b/public/css/styles.less index 76eac541d3..8762fe87a7 100644 --- a/public/css/styles.less +++ b/public/css/styles.less @@ -1,6 +1,7 @@ @import (less) "lib/animate.css"; @import (less) "lib/font-awesome.min.css"; @import "lib/bootstrap/bootstrap"; +@import "lib/bootstrap-social"; @import "themes/default"; // Scaffolding @@ -52,55 +53,8 @@ body { // Social Buttons // ------------------------- - -.btn-facebook { - color: #fff; - background: #3b5998; - border: 1px solid rgba(0, 0, 0, 0.07); - - &:hover { - color: #fff; - } -} - -.btn-twitter { - color: #fff; - background: #00aced; - border: 1px solid rgba(0, 0, 0, 0.07); - - &:hover { - color: #fff; - } -} - -.btn-google-plus { - color: #fff; - background: #dd4b39; - border: 1px solid rgba(0, 0, 0, 0.07); - - &:hover { - color: #fff; - } -} - -.btn-github { - color: #fff; - background: #333; - border: 1px solid rgba(0, 0, 0, 0.07); - - &:hover { - color: #fff; - } -} - -.btn-linkedin { - color: #fff; - background: #007bb6;; - border: 1px solid rgba(0, 0, 0, 0.07); - - &:hover { - color: #fff; - } +.btn-social { + border-radius: 4px; } // Extra space between font-awesome icons and text