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