├── VERSION.txt
├── icons
├── hackernews.min.svg
├── join.min.svg
├── README.md
├── join.svg
├── print.min.svg
├── youtube.min.svg
├── print.svg
├── delicious.min.svg
├── tumblr.min.svg
├── hackernews.svg
├── X.min.svg
├── phone.min.svg
├── facebook.min.svg
├── X.svg
├── googleplus.min.svg
├── tumblr.svg
├── linkedin.min.svg
├── twitter.min.svg
├── delicious.svg
├── youtube.svg
├── pinterest.min.svg
├── pocket.min.svg
├── instagram.min.svg
├── email.min.svg
├── github.min.svg
├── email.svg
├── linkedin.svg
├── googleplus.svg
├── twitter.svg
├── pinterest.svg
├── vk.min.svg
├── whatsapp.min.svg
├── facebook.svg
├── instagram.svg
├── github.svg
├── whatsapp.svg
├── reddit.min.svg
├── pocket.svg
├── vk.svg
└── reddit.svg
├── composer.json
├── css
├── rrssb.css
├── rrssb.css.map
└── rrssb.buttons.css
├── LICENSE.md
├── Gulpfile.js
├── js
├── rrssb.min.js
├── rrssb.js
└── vendor
│ └── jquery-1.4.4.min.js
├── README.md
├── scss
└── rrssb.scss
└── index.html
/VERSION.txt:
--------------------------------------------------------------------------------
1 | 0.5.x
--------------------------------------------------------------------------------
/icons/hackernews.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/join.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/README.md:
--------------------------------------------------------------------------------
1 | These are for reference only. This folder is not needed in the build. Copy and paste the minimized version directly into your markup.
2 |
3 | To add a new icon, drag it to this folder, then restart gulp and it will be minimized. Used minimized code in markup.
4 |
--------------------------------------------------------------------------------
/icons/join.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/print.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/youtube.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/print.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/delicious.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/tumblr.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/hackernews.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/icons/X.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/phone.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/facebook.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/X.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/icons/googleplus.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/tumblr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/linkedin.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/twitter.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/delicious.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/icons/youtube.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
--------------------------------------------------------------------------------
/icons/pinterest.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/pocket.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/instagram.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/email.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/github.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/email.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rrssb/rrssb-plus",
3 | "type": "drupal-library",
4 | "authors": [
5 | {
6 | "name" : "Adam Shepherd"
7 | },
8 | {
9 | "name" : "Joshua Tuscan",
10 | "email" : "hello@joshuatuscan.com"
11 | },
12 | {
13 | "name" : "Daniel Box",
14 | "email" : "daniel@kurtnoble.com"
15 | }
16 | ],
17 | "description": "Ridiculously Responsive Social Sharing Buttons Plus",
18 | "keywords": [
19 | "RRSSB",
20 | "rrssb",
21 | "ridiculously",
22 | "responsive",
23 | "social",
24 | "sharing",
25 | "buttons",
26 | "plus"
27 | ],
28 | "support": {
29 | "issues": "https://github.com/AdamPS/rrssb-plus/issues",
30 | "source": "https://github.com/AdamPS/rrssb-plus",
31 | "docs": "https://github.com/AdamPS/rrssb-plus/README.md"
32 | },
33 | "license": "MIT",
34 | "homepage": "http://www.albanyweb.co.uk/rrssb-plus"
35 | }
36 |
--------------------------------------------------------------------------------
/icons/linkedin.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
--------------------------------------------------------------------------------
/icons/googleplus.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
--------------------------------------------------------------------------------
/icons/twitter.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
--------------------------------------------------------------------------------
/icons/pinterest.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
--------------------------------------------------------------------------------
/icons/vk.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/whatsapp.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/css/rrssb.css:
--------------------------------------------------------------------------------
1 | .rrssb{font-size:14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:bold}.rrssb .rrssb-buttons{box-sizing:border-box;display:inline-block;margin:.15em 0;padding:0;width:100%}.rrssb li{box-sizing:border-box;display:inline-block;padding:.15em}.rrssb a{background-color:#ccc;border-radius:.2em;box-sizing:border-box;display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:100%;position:relative;text-align:center;text-decoration:none;text-transform:uppercase;transition:background-color 0.2s ease-in-out;width:100%}.rrssb a:active{box-shadow:inset 1px 3px 15px 0 rgba(22,0,0,0.25)}.rrssb .rrssb-icon{display:block;box-sizing:border-box;left:0.5em;position:absolute;top:15%;height:70%;width:1.75em}.rrssb .rrssb-text{color:#fff;padding:0 1em 0 2.75em;line-height:2.5em}.rrssb .rrssb-prefix{padding-right:0.6em}.rrssb.no-label a{width:2.5em;height:2.5em}.rrssb.no-label .rrssb-icon{position:relative;left:15%}.rrssb.no-label .rrssb-text{position:absolute !important;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;word-wrap:normal}
2 |
3 | /*# sourceMappingURL=rrssb.css.map */
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | # The MIT License
2 |
3 | Copyright (C) 2014-2015 Daniel Box and Joshua Tuscan
4 | Copyright (C) 2016 Adam Shepherd
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 |
8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 |
10 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 |
--------------------------------------------------------------------------------
/icons/facebook.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/instagram.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
--------------------------------------------------------------------------------
/icons/github.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
15 |
--------------------------------------------------------------------------------
/icons/whatsapp.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/Gulpfile.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp'),
2 | sass = require('gulp-sass'),
3 | uglify = require('gulp-uglify'),
4 | autoprefixer = require('gulp-autoprefixer'),
5 | minifyCss = require('gulp-minify-css'),
6 | rename = require('gulp-rename'),
7 | filter = require('gulp-filter'),
8 | util = require('gulp-util'),
9 | imagemin = require('gulp-imagemin'),
10 | browserSync = require('browser-sync').create();
11 |
12 | gulp.task('build', ['sass', 'uglify', 'svg']);
13 |
14 | gulp.task('serve', ['sass', 'uglify', 'svg'], function() {
15 |
16 | browserSync.init(['**/*.html', '**/*.css', '**/*.js'], {
17 | server: "."
18 | });
19 |
20 | gulp.watch('scss/**/*.scss', ['sass']);
21 | gulp.watch('js/rrssb.js', ['uglify']);
22 |
23 | });
24 |
25 | gulp.task('sass', function() {
26 | gulp.src(['scss/**/*.scss'])
27 | .pipe(sass())
28 | .on('error', util.log)
29 | .pipe(autoprefixer())
30 | .pipe(minifyCss())
31 | .pipe(gulp.dest('css/'));
32 | });
33 |
34 | gulp.task('uglify', function() {
35 | gulp.src(['js/rrssb.js'])
36 | .pipe(uglify())
37 | .on('error', util.log)
38 | .pipe(rename({
39 | extname: '.min.js'
40 | }))
41 | .pipe(gulp.dest('js'));
42 | });
43 |
44 | gulp.task('svg', function() {
45 | gulp.src(['icons/**/*.svg', '!icons/**/*.min.svg'])
46 | .pipe(imagemin())
47 | .on('error', util.log)
48 | .pipe(rename({
49 | extname: '.min.svg'
50 | }))
51 | .pipe(gulp.dest('icons/'));
52 | });
53 |
54 | gulp.task('default', ['serve']);
55 |
--------------------------------------------------------------------------------
/css/rrssb.css.map:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "file": "rrssb.css",
4 | "sources": [
5 | "../scss/rrssb.scss"
6 | ],
7 | "names": [],
8 | "mappings": "AAkBA,AAAA,MAAM,AAAC,CACL,SAAS,CAZO,IAAI,CAapB,WAAW,CANK,gBAAgB,CAAE,SAAS,CAAE,KAAK,CAAE,UAAU,CAO9D,WAAW,CAAE,IAAI,CAyFlB,AA5FD,AAKE,MALI,CAKJ,cAAc,AAAC,CACb,UAAU,CAAE,UAAU,CACtB,OAAO,CAAE,YAAY,CACrB,MAAM,CAdM,KAAM,CAcK,CAAC,CACxB,OAAO,CAAE,CAAC,CACV,KAAK,CAAE,IAAI,CACZ,AAXH,AAaE,MAbI,CAaJ,EAAE,AAAC,CACD,UAAU,CAAE,UAAU,CACtB,OAAO,CAAE,YAAY,CACrB,OAAO,CAtBK,KAAM,CAuBnB,AAjBH,AAmBE,MAnBI,CAmBJ,CAAC,AAAC,CACA,gBAAgB,CAAE,IAAI,CACtB,aAAa,CAlCK,IAAK,CAmCvB,UAAU,CAAE,UAAU,CACtB,OAAO,CAAE,KAAK,CAEd,uBAAuB,CAAE,SAAS,CAClC,sBAAsB,CAAE,WAAW,CACnC,MAAM,CAAE,IAAI,CACZ,QAAQ,CAAE,QAAQ,CAClB,UAAU,CAAE,MAAM,CAClB,eAAe,CAAE,IAAI,CACrB,cAAc,CAAE,SAAS,CACzB,UAAU,CAAE,iCAAiC,CAC7C,KAAK,CAAE,IAAI,CAKZ,AAtCH,AAmCI,MAnCE,CAmBJ,CAAC,AAgBE,OAAO,AAAC,CACP,UAAU,CAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAmB,CACrD,AArCL,AAwCE,MAxCI,CAwCJ,WAAW,AAAC,CACV,OAAO,CAAE,KAAK,CACd,UAAU,CAAE,UAAU,CACtB,IAAI,CAAE,KAAK,CACX,QAAQ,CAAE,QAAQ,CAGlB,GAAG,CAjDQ,GAA4B,CAkDvC,MAAM,CAvDS,GAAG,CAyDlB,KAAK,CAAE,MAA+C,CACvD,AAnDH,AAqDE,MArDI,CAqDJ,WAAW,AAAC,CACV,KAAK,CArEW,IAAI,CAwEpB,OAAO,CAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAqD,CAItE,WAAW,CAtEO,KAAK,CAuExB,AA9DH,AAgEE,MAhEI,CAgEJ,aAAa,AAAC,CACZ,aAAa,CAAE,KAAK,CACrB,AAlEH,AAsEI,MAtEE,AAoEH,SAAS,CAER,CAAC,AAAC,CAGA,KAAK,CAlFW,KAAK,CAmFrB,MAAM,CAnFU,KAAK,CAoFtB,AA3EL,AA6EI,MA7EE,AAoEH,SAAS,CASR,WAAW,AAAC,CACV,QAAQ,CAAE,QAAQ,CAClB,IAAI,CAjFK,GAA4B,CAkFtC,AAhFL,AAkFI,MAlFE,AAoEH,SAAS,CAcR,WAAW,AAAC,CAEV,QAAQ,CAAE,mBAAmB,CAC7B,QAAQ,CAAE,MAAM,CAChB,IAAI,CAAE,wBAAwB,CAC9B,KAAK,CAAE,GAAG,CACV,MAAM,CAAE,GAAG,CACX,SAAS,CAAE,MAAM,CAClB"
9 | }
--------------------------------------------------------------------------------
/icons/reddit.min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/pocket.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
--------------------------------------------------------------------------------
/icons/vk.svg:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/icons/reddit.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/js/rrssb.min.js:
--------------------------------------------------------------------------------
1 | +function(i,t,e){"use strict";var s={size:{min:.1,max:10,default:1},shrink:{min:.2,max:1,default:.8},regrow:{min:.2,max:1,default:.8},minRows:{min:1,max:99,default:1},maxRows:{min:1,max:99,default:2},prefixReserve:{min:0,max:.8,default:.3},prefixHide:{min:.1,max:10,default:2},alignRight:{type:"boolean",default:!1}},n=function(){var i=t.fn.jquery.split(".");return 1==i[0]&&i[1]<8}();i.rrssbConfigAll=function(i){t(".rrssb").each(function(){t(this).rrssbConfig(i)})},t.fn.rrssbConfig=function(i){if(!t(this).data("settings")||i){var e={};for(var n in s)e[n]=s[n].default,i&&("boolean"==s[n].type?e[n]=Boolean(i[n]):isNaN(parseFloat(i[n]))||(e[n]=Math.min(s[n].max,Math.max(s[n].min,i[n]))));t(this).data("settings",e),h.call(this)}};var r,a=function(){t(".rrssb").each(h)},h=function(){var i=t(this).data("orig");i||(i=function(){var i=t(".rrssb-prefix",this),e=i.length?i.clone().css({visibility:"hidden","white-space":"nowrap",display:"inline"}).appendTo(this):null;t("ul").contents().filter(function(){return this.nodeType===Node.TEXT_NODE}).remove();var s={width:0,buttons:0,height:t("li",this).innerHeight(),fontSize:parseFloat(t(this).css("font-size")),prefixWidth:e?e.innerWidth():0};return t("li",this).each(function(){s.width=Math.max(s.width,t(this).innerWidth()),s.buttons++}),t(this).data("orig",s),e&&e.remove(),s}.call(this));var e=t(this).data("settings"),s=i.width*e.size,r=i.buttons,a=t(this).innerWidth()-1,h=ao*e.prefixHide?(l=0,t(".rrssb-prefix",this).css("display","none")):t(".rrssb-prefix",this).css("display","");var c=l<=a*e.prefixReserve?o-l:o,f=Math.floor(c/s);f*e.maxRows1?Math.max(1,Math.ceil(r/(e.minRows-1))-1):r;f=Math.min(f,d),f=Math.ceil(r/Math.ceil(r/f)),d=Math.ceil(r/Math.ceil(r/d));var u=Math.floor(1e4/f)/100;t("li",this).css("max-width",u+"%");var m=s*f+l;m>o&&(m-=l,l=0);var p=f=.999*p){var M=Math.floor(1e4*(a-m*g*1.02)/a)/100;t(this).css(w,M+"%")}else t(this).css(w,"")},o=function(i){r&&clearTimeout(r),r=setTimeout(a,i||200)};t(document).ready(function(){t(".rrssb-buttons a.popup").click(function(e){!function(t,e,s,n){var r=void 0!==i.screenLeft?i.screenLeft:screen.left,a=void 0!==i.screenTop?i.screenTop:screen.top,h=(i.innerWidth?i.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width)/2-s/2+r,o=(i.innerHeight?i.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height)/3-n/3+a,l=i.open(t,e,"scrollbars=yes, width="+s+", height="+n+", top="+o+", left="+h);l&&l.focus&&l.focus()}(t(this).attr("href"),t(this).find(".rrssb-text").html(),580,470),e.preventDefault()}),t(i).resize(o),t(document).ready(function(){rrssbConfigAll()})})}(window,jQuery);
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Ridiculously Responsive Social Sharing Buttons Plus
2 | Social sharing buttons that you can drop into any website with attractive SVG-based icons, small download, and browser compatibility.
3 | RRSSB+ automatically adjusts to different screen sizes by tweaking sizes, splitting buttons evenly onto multiple rows and hiding the labels.
4 |
5 | The library offers consistently styled buttons for all sites. No 3rd-party scripts (such as from Facebook), with the inherent overheads and different button designs.
6 |
7 |   
8 |
9 | Developed by [**AlbanyWeb**](http://www.albanyweb.co.uk/).
10 | Based on [**RRSSB**](https://github.com/kni-labs/rrssb) "Ridiculously Responsive Social Sharing Buttons" by [**KNI**](http://www.kurtnoble.com).
11 |
12 | ## Installation instructions
13 | If you use the Drupal CMS then you can automatically install this library with a [module](https://www.drupal.org/project/rrssb) — see [demo](https://www.albanyweb.co.uk/rrssb-plus). If you use Backdrop CMS you can install a [module which bundles this library](https://github.com/backdrop-contrib/rrssb) through the Project Installer interface.
14 |
15 | Otherwise, you can examine the source of the demo page to see how to do it. Search for `
` to find the HTML for the buttons. You need to load `rrssb.min.js` and `rrssb.css`. To configure this library, make a call to `rrssbConfigAll`.
16 |
17 | ## Main changes from RRSSB
18 | - Allow buttons to split onto multiple rows, ensuring the rows stay even.
19 | - Buttons size automatically stays usable and clear. As a rule we don't want huge buttons on a huge screen or tiny ones on a tiny screen, which you can get with RRSSB.
20 | RRSSB+ offers a configurable default size, and a configurable percentage allowable shrink.
21 | - Whitespace around icons and text is consistent at all sizes. With RRSSB, the spacing varies with button size. At "normal width" there is lots of space, hence smaller fonts and icons that are harder to read.
22 | Grow the screen, and you see the "large format", and it's different — and we think a better balance.
23 | By default, RRSSB is similar to the large format, but with slightly larger icons.
24 | - Uniform responsiveness applied simultaneously to all buttons. In contrast RRSSB hides the labels one-by-one.
25 | That's not an approach we are familiar with on mainstream websites, and we feel it looks odd, as if there is a bug.
26 | - Support button prefix text such as "Share this page". The RRSSB demo page has text like that although not responsive,
27 | and hard-coded into the page rather than being part of the library.
28 | - Configurable settings to control appearance.
29 |
30 | ## Performance changes
31 | - Use background image instead of inline SVG. Gives smaller page sizes, reduced server load and smaller caches.
32 | - Smaller JS and CSS files for faster download.
33 | - Simpler script executes a lot less lines of code for smoother resizing.
34 | - Reduced DOM size: store working data as data() not attr().
35 |
36 | ## Compatibility changes
37 | - Compatible with older releases of jQuery - remove specific requirement for jQuery 1.10
38 | - Designed for integration into a CMS such as [Drupal](https://www.drupal.org/project/rrssb) and [Backdrop](https://backdropcms.org/project/rrssb).
39 |
--------------------------------------------------------------------------------
/scss/rrssb.scss:
--------------------------------------------------------------------------------
1 | // Ridiculously Responsive Social Sharing Buttons Plus
2 | //
3 | // Compile command:
4 | // node-sass --output-style compressed --source-map true scss/rrssb.scss css/rrssb.css
5 |
6 | // Button text colour
7 | $rrssb-txt: #fff !default;
8 | // Border radius for the buttons
9 | $rrssb-border-radius: 0.2em !default;
10 | // Default font size (can shrink somewhat to fit available width)
11 | $rrssb-font-size: 14px !default;
12 | // Button height as a multiple of font size.
13 | $rrssb-button-height: 2.5em !default;
14 | // Icon height as a proportion of button height.
15 | $rrssb-icon-ratio: 70% !default;
16 | $rrssb-spacing: 0.15em !default;
17 |
18 | $rrssb-main-font: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
19 |
20 | $rrssb-border: (100% - $rrssb-icon-ratio)/2;
21 |
22 | .rrssb {
23 | font-size: $rrssb-font-size;
24 | font-family: $rrssb-main-font;
25 | font-weight: bold;
26 |
27 | .rrssb-buttons {
28 | box-sizing: border-box;
29 | display: inline-block;
30 | margin: $rrssb-spacing 0;
31 | padding: 0;
32 | width: 100%;
33 | }
34 |
35 | li {
36 | box-sizing: border-box;
37 | display: inline-block;
38 | padding: $rrssb-spacing;
39 | }
40 |
41 | a {
42 | background-color: #ccc;
43 | border-radius: $rrssb-border-radius;
44 | box-sizing: border-box;
45 | display: block;
46 | /*@@overflow: hidden;*/
47 | -moz-osx-font-smoothing: grayscale;
48 | -webkit-font-smoothing: antialiased;
49 | height: 100%;
50 | position: relative;
51 | text-align: center;
52 | text-decoration: none;
53 | text-transform: uppercase;
54 | transition: background-color 0.2s ease-in-out;
55 | width: 100%;
56 |
57 | &:active {
58 | box-shadow: inset 1px 3px 15px 0 rgba(22, 0, 0, .25);
59 | }
60 | }
61 |
62 | .rrssb-icon {
63 | display: block;
64 | box-sizing: border-box;
65 | left: 0.5em;
66 | position: absolute;
67 | /* Margin top and bottom.
68 | /* But we need to specify a height rather than top+bottom else the icon disappears when there is no label. */
69 | top: $rrssb-border;
70 | height: $rrssb-icon-ratio;
71 | /* Need explicit width for IE (default is 300px), same as height. */
72 | width: ($rrssb-icon-ratio/100%) * $rrssb-button-height;
73 | }
74 |
75 | .rrssb-text {
76 | color: $rrssb-txt;
77 | /* Left space to match the width of the icon. */
78 | /* Left and right space 1em to leave gaps either side of text. */
79 | padding: 0 1em 0 ($rrssb-icon-ratio/100%) * $rrssb-button-height + 1em;
80 |
81 | /* Line height based on font-size so everything scales in proportion. */
82 | /* This will in turn set height large enough to contain text giving text that is centred vertically. */
83 | line-height: $rrssb-button-height;
84 | }
85 |
86 | .rrssb-prefix {
87 | padding-right: 0.6em;
88 | }
89 |
90 | &.no-label {
91 |
92 | a {
93 | /* Label has gone, so can't rely on line height. */
94 | /* Need to bound the width for IE, else it goes to max available. */
95 | width: $rrssb-button-height;
96 | height: $rrssb-button-height;
97 | }
98 |
99 | .rrssb-icon {
100 | position: relative;
101 | left: $rrssb-border;
102 | }
103 |
104 | .rrssb-text {
105 | // Copied from Drupal .visually-hidden class.
106 | position: absolute !important;
107 | overflow: hidden;
108 | clip: rect(1px, 1px, 1px, 1px);
109 | width: 1px;
110 | height: 1px;
111 | word-wrap: normal;
112 | }
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Ridiculously Responsive Social Sharing Buttons Plus by AlbanyWeb
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |