PluginProbe
Social Share Buttons / 1.30
Social Share Buttons v1.30
trunk 0.9 1.0 1.1 1.1.1 1.1.2 1.10 1.11 1.12 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.3 1.30 1.4 1.5 1.6 1.7 1.8 1.9
← All changes | classes/class-style.php +35 -13 1.01.30 View file →
@@ -43,8 +43,9 @@
43 43 'clear' => 'both',
44 44 'z-index' => 9999,
45 45 'position' => 'relative',
46 46 'width' => '100%',
47 + 'max-width' => 'none',
47 48 'line-height' => '1.1',
48 49 'box-sizing' => 'border-box',
49 50 ),
50 51 // 'hover' => '',
@@ -57,10 +58,8 @@
57 58 'box-sizing' => 'border-box',
58 59 'position' => 'relative',
59 60 'line-height' => 'inherit',
60 61 'text-align' => 'center',
61 - 'margin' => '10px 0',
62 -
63 62 ),
64 63 ),
65 64 'mb-social' => array('normal' => // the button
66 65 array ( 'display' => 'flex',
@@ -169,12 +168,9 @@
169 168 $css = $this->addCSS($normcss, false, 'mb-icon-wrapper', 'normal', $css);
170 169 $css = $this->addCSS('transform', 'translateY(0)', 'mb-icon-wrapper', 'normal', $css);
171 170 $css = $this->addCSS('position', 'absolute', 'mb-icon-wrapper', 'normal', $css);
172 171
173 - /* $css['mb-label']['hover']['transform'] = 'translateY(0)';
174 - $css['mb-share-count']['hover']['transform'] = 'translateY(0)';
175 - $css['mb-icon-wrapper']['hover']['transform'] = 'translateY(0)';
176 -*/
172 +
177 173 $hoverCSS = array(
178 174 // 'display' => 'flex',
179 175 'align-items' => 'center',
180 176 'justify-content' => 'center',
@@ -189,11 +185,10 @@
189 185
190 186
191 187 break;
192 188 case 'hover';
193 - /*$color = $css['mb-social']['normal']['background-color'];
194 - $css = $this->addCSS('background-color', 'darken(' . $color . ', 20%)', 'mb-social', 'hover', $css);
195 -*/
189 +
190 +
196 191 break;
197 192 case 'lift':
198 193 $line_height = intval($args['line_height']) * 1.5;
199 194
@@ -321,8 +316,18 @@
321 316 protected function addStretch($css, $args)
322 317 {
323 318 $css = $this->addCSS('display', 'flex', 'maxsocial', 'normal', $css);
324 319
320 + $orientation = (isset($args['orientation'])) ? $args['orientation'] : false;
321 + $is_static = (isset($args['is_static'])) ? $args['is_static'] : false;
322 +
323 +
324 + if ($orientation == 'vertical')
325 + {
326 + $css = $this->addCSS('flex-direction', 'column', 'maxsocial', 'normal', $css);
327 + }
328 +
329 +
325 330 $css = $this->addCSS('flex', '1.2', 'mb-item', 'hover', $css);
326 331
327 332 $itemcss = array(
328 333 'flex' => 1,
@@ -332,9 +337,9 @@
332 337 'transition' => 'all .2s linear',
333 338 );
334 339 $css = $this->addCSS($itemcss, '','mb-item', 'normal', $css);
335 340
336 - $css = $this->addCSS ( array (
341 + $linkcss = array (
337 342 'display' => 'block',
338 343 'display' => '-webkit-box',
339 344 'display' => '-webkit-flex',
340 345 'display' => '-moz-box',
@@ -344,12 +349,22 @@
344 349 '-webkit-flex-flow' => 'row wrap',
345 350 '-ms-flex-flow' => 'row wrap',
346 351 'flex-flow' => 'row wrap',
347 352 'width' => '100%',
348 - ),
353 + );
354 +
355 + // Changing width on horizontal items will mess the size
356 + if ( true === $is_static)
357 + {
358 + unset($linkcss['width']);
359 + }
360 +
361 +
362 + $css = $this->addCSS ($linkcss ,
349 363 '',
350 364 'mb-social', 'normal', $css);
351 365
366 +
352 367 $css = $this->addCSS('flex', '1.2', 'mb-social', 'hover', $css);
353 368
354 369 // the label
355 370 $css = $this->addCSS ( array (
@@ -438,13 +453,15 @@
438 453 $margin = maxUtils::strip_px($layoutBlock->getValue('button_spacing'));
439 454
440 455 if ($this->collection->orientation == 'vertical')
441 456 {
442 - $width = '100%';
457 + $width = $width . 'px';
458 + $height = '100%';
443 459 }
444 460 else { // horizontal
445 461 $width = ($width + $margin) * 2;
446 462 $width = $width . 'px';
463 + $height = $height . 'px';
447 464 }
448 465
449 466 // attempt to auto-custmz.
450 467 $count_size = (isset($css['mb-share-count']['normal']['font-size'])) ? $css['mb-share-count']['normal']['font-size'] : '13';
@@ -454,9 +471,9 @@
454 471
455 472
456 473 $css = $this->addCSS ( array(
457 474 'width' => $width,
458 - 'height' => $height . 'px',
475 + 'height' => $height,
459 476 'display' => 'flex',
460 477 'align-items' => 'center',
461 478 'justify-content' => 'center',
462 479 //'font-size' => '16px',
@@ -631,8 +648,9 @@
631 648
632 649 $statement = 'inline-block';
633 650
634 651 $css = $this->addCSS('display',$statement, $this->items[$i], $pseudo, $css);
652 + // $css = $this->addCSS('opacity','1', $this->items[$i], $pseudo, $css);
635 653 unset($hides[$i]);
636 654 break;
637 655 }
638 656 }
@@ -646,8 +664,9 @@
646 664 unset($hides[$i]);
647 665 $statement = 'inline-block';
648 666
649 667 $css = $this->addCSS('display', $statement, $this->items[$i], $pseudo, $css);
668 + //$css = $this->addCSS('opacity', '1', $this->items[$i], $pseudo, $css);
650 669 }
651 670 }
652 671 else { // if display list is just one item.
653 672 $hides = $this->items;
@@ -654,14 +673,17 @@
654 673 unset($hides[$item]);
655 674
656 675 $statement = 'inline-block';
657 676
677 +
658 678 $css = $this->addCSS('display',$statement,$this->items[$item], $pseudo, $css);
679 + //$css = $this->addCSS('opacity','1',$this->items[$item], $pseudo, $css);
659 680 }
660 681
661 682 foreach($hides as $name => $cname)
662 683 {
663 684 $css = $this->addCSS('display','none', $cname, $pseudo, $css);
685 + //$css = $this->addCSS('opacity','0', $cname, $pseudo, $css);
664 686 }
665 687
666 688 }
667 689